globaloffensive
Version:
Exposes a simple API for interacting with the Counter-Strike: Global Offensive/CS2 game coordinator
30,549 lines • 1.52 MB
JavaScript
/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
(function(global, factory) { /* global define, require, module */
/* AMD */ if (typeof define === 'function' && define.amd)
define(["protobufjs/minimal"], factory);
/* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports)
module.exports = factory(require("protobufjs/minimal"));
})(this, function($protobuf) {
"use strict";
// Common aliases
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
// Exported root namespace
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
/**
* GCProtoBufMsgSrc enum.
* @exports GCProtoBufMsgSrc
* @enum {number}
* @property {number} GCProtoBufMsgSrc_Unspecified=0 GCProtoBufMsgSrc_Unspecified value
* @property {number} GCProtoBufMsgSrc_FromSystem=1 GCProtoBufMsgSrc_FromSystem value
* @property {number} GCProtoBufMsgSrc_FromSteamID=2 GCProtoBufMsgSrc_FromSteamID value
* @property {number} GCProtoBufMsgSrc_FromGC=3 GCProtoBufMsgSrc_FromGC value
* @property {number} GCProtoBufMsgSrc_ReplySystem=4 GCProtoBufMsgSrc_ReplySystem value
*/
$root.GCProtoBufMsgSrc = (function() {
var valuesById = {}, values = Object.create(valuesById);
values[valuesById[0] = "GCProtoBufMsgSrc_Unspecified"] = 0;
values[valuesById[1] = "GCProtoBufMsgSrc_FromSystem"] = 1;
values[valuesById[2] = "GCProtoBufMsgSrc_FromSteamID"] = 2;
values[valuesById[3] = "GCProtoBufMsgSrc_FromGC"] = 3;
values[valuesById[4] = "GCProtoBufMsgSrc_ReplySystem"] = 4;
return values;
})();
$root.CMsgProtoBufHeader = (function() {
/**
* Properties of a CMsgProtoBufHeader.
* @exports ICMsgProtoBufHeader
* @interface ICMsgProtoBufHeader
* @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
* @property {number|Long|null} [job_id_source] CMsgProtoBufHeader job_id_source
* @property {number|Long|null} [job_id_target] CMsgProtoBufHeader job_id_target
* @property {string|null} [target_job_name] CMsgProtoBufHeader target_job_name
* @property {number|null} [eresult] CMsgProtoBufHeader eresult
* @property {string|null} [error_message] CMsgProtoBufHeader error_message
* @property {number|null} [ip] CMsgProtoBufHeader ip
* @property {GCProtoBufMsgSrc|null} [gc_msg_src] CMsgProtoBufHeader gc_msg_src
* @property {number|null} [gc_dir_index_source] CMsgProtoBufHeader gc_dir_index_source
*/
/**
* Constructs a new CMsgProtoBufHeader.
* @exports CMsgProtoBufHeader
* @classdesc Represents a CMsgProtoBufHeader.
* @implements ICMsgProtoBufHeader
* @constructor
* @param {ICMsgProtoBufHeader=} [properties] Properties to set
*/
function CMsgProtoBufHeader(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgProtoBufHeader client_steam_id.
* @member {number|Long} client_steam_id
* @memberof CMsgProtoBufHeader
* @instance
*/
CMsgProtoBufHeader.prototype.client_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* CMsgProtoBufHeader client_session_id.
* @member {number} client_session_id
* @memberof CMsgProtoBufHeader
* @instance
*/
CMsgProtoBufHeader.prototype.client_session_id = 0;
/**
* CMsgProtoBufHeader source_app_id.
* @member {number} source_app_id
* @memberof CMsgProtoBufHeader
* @instance
*/
CMsgProtoBufHeader.prototype.source_app_id = 0;
/**
* CMsgProtoBufHeader job_id_source.
* @member {number|Long} job_id_source
* @memberof CMsgProtoBufHeader
* @instance
*/
CMsgProtoBufHeader.prototype.job_id_source = $util.Long ? $util.Long.fromBits(-1,2147483647,false) : 9223372036854776000;
/**
* CMsgProtoBufHeader job_id_target.
* @member {number|Long} job_id_target
* @memberof CMsgProtoBufHeader
* @instance
*/
CMsgProtoBufHeader.prototype.job_id_target = $util.Long ? $util.Long.fromBits(-1,2147483647,false) : 9223372036854776000;
/**
* CMsgProtoBufHeader target_job_name.
* @member {string} target_job_name
* @memberof CMsgProtoBufHeader
* @instance
*/
CMsgProtoBufHeader.prototype.target_job_name = "";
/**
* CMsgProtoBufHeader eresult.
* @member {number} eresult
* @memberof CMsgProtoBufHeader
* @instance
*/
CMsgProtoBufHeader.prototype.eresult = 2;
/**
* CMsgProtoBufHeader error_message.
* @member {string} error_message
* @memberof CMsgProtoBufHeader
* @instance
*/
CMsgProtoBufHeader.prototype.error_message = "";
/**
* CMsgProtoBufHeader ip.
* @member {number} ip
* @memberof CMsgProtoBufHeader
* @instance
*/
CMsgProtoBufHeader.prototype.ip = 0;
/**
* CMsgProtoBufHeader gc_msg_src.
* @member {GCProtoBufMsgSrc} gc_msg_src
* @memberof CMsgProtoBufHeader
* @instance
*/
CMsgProtoBufHeader.prototype.gc_msg_src = 0;
/**
* CMsgProtoBufHeader gc_dir_index_source.
* @member {number} gc_dir_index_source
* @memberof CMsgProtoBufHeader
* @instance
*/
CMsgProtoBufHeader.prototype.gc_dir_index_source = 0;
/**
* Creates a new CMsgProtoBufHeader instance using the specified properties.
* @function create
* @memberof CMsgProtoBufHeader
* @static
* @param {ICMsgProtoBufHeader=} [properties] Properties to set
* @returns {CMsgProtoBufHeader} CMsgProtoBufHeader instance
*/
CMsgProtoBufHeader.create = function create(properties) {
return new CMsgProtoBufHeader(properties);
};
/**
* Encodes the specified CMsgProtoBufHeader message. Does not implicitly {@link CMsgProtoBufHeader.verify|verify} messages.
* @function encode
* @memberof CMsgProtoBufHeader
* @static
* @param {ICMsgProtoBufHeader} 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) {
if (!writer)
writer = $Writer.create();
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"))
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"))
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"))
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"))
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"))
writer.uint32(/* id 12, wireType 2 =*/98).string(message.target_job_name);
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"))
writer.uint32(/* id 14, wireType 2 =*/114).string(message.error_message);
if (message.ip != null && Object.hasOwnProperty.call(message, "ip"))
writer.uint32(/* id 15, wireType 0 =*/120).uint32(message.ip);
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"))
writer.uint32(/* id 201, wireType 0 =*/1608).uint32(message.gc_dir_index_source);
return writer;
};
/**
* Encodes the specified CMsgProtoBufHeader message, length delimited. Does not implicitly {@link CMsgProtoBufHeader.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgProtoBufHeader
* @static
* @param {ICMsgProtoBufHeader} 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();
};
/**
* Decodes a CMsgProtoBufHeader message from the specified reader or buffer.
* @function decode
* @memberof CMsgProtoBufHeader
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgProtoBufHeader} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgProtoBufHeader();
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 15: {
message.ip = reader.uint32();
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);
break;
}
}
return message;
};
/**
* Decodes a CMsgProtoBufHeader message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgProtoBufHeader
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgProtoBufHeader} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgProtoBufHeader message.
* @function verify
* @memberof CMsgProtoBufHeader
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgProtoBufHeader.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.client_steam_id != null && message.hasOwnProperty("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 (!$util.isInteger(message.client_session_id))
return "client_session_id: integer expected";
if (message.source_app_id != null && message.hasOwnProperty("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 (!$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 (!$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 (!$util.isString(message.target_job_name))
return "target_job_name: string expected";
if (message.eresult != null && message.hasOwnProperty("eresult"))
if (!$util.isInteger(message.eresult))
return "eresult: integer expected";
if (message.error_message != null && message.hasOwnProperty("error_message"))
if (!$util.isString(message.error_message))
return "error_message: string expected";
if (message.ip != null && message.hasOwnProperty("ip"))
if (!$util.isInteger(message.ip))
return "ip: integer expected";
if (message.gc_msg_src != null && message.hasOwnProperty("gc_msg_src"))
switch (message.gc_msg_src) {
default:
return "gc_msg_src: enum value expected";
case 0:
case 1:
case 2:
case 3:
case 4:
break;
}
if (message.gc_dir_index_source != null && message.hasOwnProperty("gc_dir_index_source"))
if (!$util.isInteger(message.gc_dir_index_source))
return "gc_dir_index_source: integer expected";
return null;
};
/**
* Creates a CMsgProtoBufHeader message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgProtoBufHeader
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgProtoBufHeader} CMsgProtoBufHeader
*/
CMsgProtoBufHeader.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgProtoBufHeader)
return object;
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;
else if (typeof object.client_steam_id === "string")
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();
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;
else if (typeof object.job_id_source === "string")
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();
if (object.job_id_target != null)
if ($util.Long)
(message.job_id_target = $util.Long.fromValue(object.job_id_target)).unsigned = false;
else if (typeof object.job_id_target === "string")
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();
if (object.target_job_name != null)
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);
if (object.ip != null)
message.ip = object.ip >>> 0;
switch (object.gc_msg_src) {
default:
if (typeof object.gc_msg_src === "number") {
message.gc_msg_src = object.gc_msg_src;
break;
}
break;
case "GCProtoBufMsgSrc_Unspecified":
case 0:
message.gc_msg_src = 0;
break;
case "GCProtoBufMsgSrc_FromSystem":
case 1:
message.gc_msg_src = 1;
break;
case "GCProtoBufMsgSrc_FromSteamID":
case 2:
message.gc_msg_src = 2;
break;
case "GCProtoBufMsgSrc_FromGC":
case 3:
message.gc_msg_src = 3;
break;
case "GCProtoBufMsgSrc_ReplySystem":
case 4:
message.gc_msg_src = 4;
break;
}
if (object.gc_dir_index_source != null)
message.gc_dir_index_source = object.gc_dir_index_source >>> 0;
return message;
};
/**
* Creates a plain object from a CMsgProtoBufHeader message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgProtoBufHeader
* @static
* @param {CMsgProtoBufHeader} message CMsgProtoBufHeader
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgProtoBufHeader.toObject = function toObject(message, options) {
if (!options)
options = {};
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;
} else
object.client_steam_id = options.longs === String ? "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;
} else
object.job_id_source = options.longs === String ? "9223372036854775807" : 9223372036854776000;
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;
} else
object.job_id_target = options.longs === String ? "9223372036854775807" : 9223372036854776000;
object.target_job_name = "";
object.eresult = 2;
object.error_message = "";
object.ip = 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;
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_session_id = message.client_session_id;
if (message.source_app_id != null && message.hasOwnProperty("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;
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;
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.target_job_name = message.target_job_name;
if (message.eresult != null && message.hasOwnProperty("eresult"))
object.eresult = message.eresult;
if (message.error_message != null && message.hasOwnProperty("error_message"))
object.error_message = message.error_message;
if (message.ip != null && message.hasOwnProperty("ip"))
object.ip = message.ip;
if (message.gc_msg_src != null && message.hasOwnProperty("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 && message.hasOwnProperty("gc_dir_index_source"))
object.gc_dir_index_source = message.gc_dir_index_source;
return object;
};
/**
* Converts this CMsgProtoBufHeader to JSON.
* @function toJSON
* @memberof CMsgProtoBufHeader
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgProtoBufHeader.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgProtoBufHeader
* @function getTypeUrl
* @memberof CMsgProtoBufHeader
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgProtoBufHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgProtoBufHeader";
};
return CMsgProtoBufHeader;
})();
$root.CMsgWebAPIKey = (function() {
/**
* Properties of a CMsgWebAPIKey.
* @exports ICMsgWebAPIKey
* @interface ICMsgWebAPIKey
* @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
*/
/**
* Constructs a new CMsgWebAPIKey.
* @exports CMsgWebAPIKey
* @classdesc Represents a CMsgWebAPIKey.
* @implements ICMsgWebAPIKey
* @constructor
* @param {ICMsgWebAPIKey=} [properties] Properties to set
*/
function CMsgWebAPIKey(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgWebAPIKey status.
* @member {number} status
* @memberof CMsgWebAPIKey
* @instance
*/
CMsgWebAPIKey.prototype.status = 255;
/**
* CMsgWebAPIKey account_id.
* @member {number} account_id
* @memberof CMsgWebAPIKey
* @instance
*/
CMsgWebAPIKey.prototype.account_id = 0;
/**
* CMsgWebAPIKey publisher_group_id.
* @member {number} publisher_group_id
* @memberof CMsgWebAPIKey
* @instance
*/
CMsgWebAPIKey.prototype.publisher_group_id = 0;
/**
* CMsgWebAPIKey key_id.
* @member {number} key_id
* @memberof CMsgWebAPIKey
* @instance
*/
CMsgWebAPIKey.prototype.key_id = 0;
/**
* CMsgWebAPIKey domain.
* @member {string} domain
* @memberof CMsgWebAPIKey
* @instance
*/
CMsgWebAPIKey.prototype.domain = "";
/**
* Creates a new CMsgWebAPIKey instance using the specified properties.
* @function create
* @memberof CMsgWebAPIKey
* @static
* @param {ICMsgWebAPIKey=} [properties] Properties to set
* @returns {CMsgWebAPIKey} CMsgWebAPIKey instance
*/
CMsgWebAPIKey.create = function create(properties) {
return new CMsgWebAPIKey(properties);
};
/**
* Encodes the specified CMsgWebAPIKey message. Does not implicitly {@link CMsgWebAPIKey.verify|verify} messages.
* @function encode
* @memberof CMsgWebAPIKey
* @static
* @param {ICMsgWebAPIKey} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.account_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"))
writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.key_id);
if (message.domain != null && Object.hasOwnProperty.call(message, "domain"))
writer.uint32(/* id 5, wireType 2 =*/42).string(message.domain);
return writer;
};
/**
* Encodes the specified CMsgWebAPIKey message, length delimited. Does not implicitly {@link CMsgWebAPIKey.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgWebAPIKey
* @static
* @param {ICMsgWebAPIKey} 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();
};
/**
* Decodes a CMsgWebAPIKey message from the specified reader or buffer.
* @function decode
* @memberof CMsgWebAPIKey
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgWebAPIKey} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgWebAPIKey message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgWebAPIKey
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgWebAPIKey} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgWebAPIKey message.
* @function verify
* @memberof CMsgWebAPIKey
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgWebAPIKey.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.status != null && message.hasOwnProperty("status"))
if (!$util.isInteger(message.status))
return "status: integer expected";
if (message.account_id != null && message.hasOwnProperty("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 (!$util.isInteger(message.publisher_group_id))
return "publisher_group_id: integer expected";
if (message.key_id != null && message.hasOwnProperty("key_id"))
if (!$util.isInteger(message.key_id))
return "key_id: integer expected";
if (message.domain != null && message.hasOwnProperty("domain"))
if (!$util.isString(message.domain))
return "domain: string expected";
return null;
};
/**
* Creates a CMsgWebAPIKey message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgWebAPIKey
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgWebAPIKey} CMsgWebAPIKey
*/
CMsgWebAPIKey.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgWebAPIKey)
return object;
var message = new $root.CMsgWebAPIKey();
if (object.status != null)
message.status = object.status >>> 0;
if (object.account_id != null)
message.account_id = object.account_id >>> 0;
if (object.publisher_group_id != null)
message.publisher_group_id = object.publisher_group_id >>> 0;
if (object.key_id != null)
message.key_id = object.key_id >>> 0;
if (object.domain != null)
message.domain = String(object.domain);
return message;
};
/**
* Creates a plain object from a CMsgWebAPIKey message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgWebAPIKey
* @static
* @param {CMsgWebAPIKey} message CMsgWebAPIKey
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgWebAPIKey.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.status = 255;
object.account_id = 0;
object.publisher_group_id = 0;
object.key_id = 0;
object.domain = "";
}
if (message.status != null && message.hasOwnProperty("status"))
object.status = message.status;
if (message.account_id != null && message.hasOwnProperty("account_id"))
object.account_id = message.account_id;
if (message.publisher_group_id != null && message.hasOwnProperty("publisher_group_id"))
object.publisher_group_id = message.publisher_group_id;
if (message.key_id != null && message.hasOwnProperty("key_id"))
object.key_id = message.key_id;
if (message.domain != null && message.hasOwnProperty("domain"))
object.domain = message.domain;
return object;
};
/**
* Converts this CMsgWebAPIKey to JSON.
* @function toJSON
* @memberof CMsgWebAPIKey
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgWebAPIKey.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgWebAPIKey
* @function getTypeUrl
* @memberof CMsgWebAPIKey
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgWebAPIKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgWebAPIKey";
};
return CMsgWebAPIKey;
})();
$root.CMsgHttpRequest = (function() {
/**
* Properties of a CMsgHttpRequest.
* @exports ICMsgHttpRequest
* @interface ICMsgHttpRequest
* @property {number|null} [request_method] CMsgHttpRequest request_method
* @property {string|null} [hostname] CMsgHttpRequest hostname
* @property {string|null} [url] CMsgHttpRequest url
* @property {Array.<CMsgHttpRequest.IRequestHeader>|null} [headers] CMsgHttpRequest headers
* @property {Array.<CMsgHttpRequest.IQueryParam>|null} [get_params] CMsgHttpRequest get_params
* @property {Array.<CMsgHttpRequest.IQueryParam>|null} [post_params] CMsgHttpRequest post_params
* @property {Uint8Array|null} [body] CMsgHttpRequest body
* @property {number|null} [absolute_timeout] CMsgHttpRequest absolute_timeout
*/
/**
* Constructs a new CMsgHttpRequest.
* @exports CMsgHttpRequest
* @classdesc Represents a CMsgHttpRequest.
* @implements ICMsgHttpRequest
* @constructor
* @param {ICMsgHttpRequest=} [properties] Properties to set
*/
function CMsgHttpRequest(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)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgHttpRequest request_method.
* @member {number} request_method
* @memberof CMsgHttpRequest
* @instance
*/
CMsgHttpRequest.prototype.request_method = 0;
/**
* CMsgHttpRequest hostname.
* @member {string} hostname
* @memberof CMsgHttpRequest
* @instance
*/
CMsgHttpRequest.prototype.hostname = "";
/**
* CMsgHttpRequest url.
* @member {string} url
* @memberof CMsgHttpRequest
* @instance
*/
CMsgHttpRequest.prototype.url = "";
/**
* CMsgHttpRequest headers.
* @member {Array.<CMsgHttpRequest.IRequestHeader>} headers
* @memberof CMsgHttpRequest
* @instance
*/
CMsgHttpRequest.prototype.headers = $util.emptyArray;
/**
* CMsgHttpRequest get_params.
* @member {Array.<CMsgHttpRequest.IQueryParam>} get_params
* @memberof CMsgHttpRequest
* @instance
*/
CMsgHttpRequest.prototype.get_params = $util.emptyArray;
/**
* CMsgHttpRequest post_params.
* @member {Array.<CMsgHttpRequest.IQueryParam>} post_params
* @memberof CMsgHttpRequest
* @instance
*/
CMsgHttpRequest.prototype.post_params = $util.emptyArray;
/**
* CMsgHttpRequest body.
* @member {Uint8Array} body
* @memberof CMsgHttpRequest
* @instance
*/
CMsgHttpRequest.prototype.body = $util.newBuffer([]);
/**
* CMsgHttpRequest absolute_timeout.
* @member {number} absolute_timeout
* @memberof CMsgHttpRequest
* @instance
*/
CMsgHttpRequest.prototype.absolute_timeout = 0;
/**
* Creates a new CMsgHttpRequest instance using the specified properties.
* @function create
* @memberof CMsgHttpRequest
* @static
* @param {ICMsgHttpRequest=} [properties] Properties to set
* @returns {CMsgHttpRequest} CMsgHttpRequest instance
*/
CMsgHttpRequest.create = function create(properties) {
return new CMsgHttpRequest(properties);
};
/**
* Encodes the specified CMsgHttpRequest message. Does not implicitly {@link CMsgHttpRequest.verify|verify} messages.
* @function encode
* @memberof CMsgHttpRequest
* @static
* @param {ICMsgHttpRequest} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 2 =*/18).string(message.hostname);
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();
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();
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"))
writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.body);
if (message.absolute_timeout != null && Object.hasOwnProperty.call(message, "absolute_timeout"))
writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.absolute_timeout);
return writer;
};
/**
* Encodes the specified CMsgHttpRequest message, length delimited. Does not implicitly {@link CMsgHttpRequest.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgHttpRequest
* @static
* @param {ICMsgHttpRequest} 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();
};
/**
* Decodes a CMsgHttpRequest message from the specified reader or buffer.
* @function decode
* @memberof CMsgHttpRequest
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgHttpRequest} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgHttpRequest message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgHttpRequest
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgHttpRequest} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgHttpRequest message.
* @function verify
* @memberof CMsgHttpRequest
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgHttpRequest.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.request_method != null && message.hasOwnProperty("request_method"))
if (!$util.isInteger(message.request_method))
return "request_method: integer expected";
if (message.hostname != null && message.hasOwnProperty("hostname"))
if (!$util.isString(message.hostname))
return "hostname: string expected";
if (message.url != null && message.hasOwnProperty("url"))
if (!$util.isString(message.url))
return "url: string expected";
if (message.headers != null && message.hasOwnProperty("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]);
if (error)
return "headers." + error;
}
}
if (message.get_params != null && message.hasOwnProperty("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]);
if (error)
return "get_params." + error;
}
}
if (message.post_params != null && message.hasOwnProperty("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]);
if (error)
return "post_params." + error;
}
}
if (message.body != null && message.hasOwnProperty("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 (!$util.isInteger(message.absolute_timeout))
return "absolute_timeout: integer expected";
return null;
};
/**
* Creates a CMsgHttpRequest message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgHttpRequest
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgHttpRequest} CMsgHttpRequest
*/
CMsgHttpRequest.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgHttpRequest)
return object;
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);
if (object.url != null)
message.url = String(object.url);
if (object.headers) {
if (!Array.isArray(object.headers))
throw TypeError(".CMsgHttpRequest.headers: array expected");
message.headers = [];
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 (object.get_params) {
if (!Array.isArray(object.get_params))
throw TypeError(".CMsgHttpRequest.get_params: array expected");
message.get_params = [];
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 (object.post_params) {
if (!Array.isArray(object.post_params))
throw TypeError(".CMsgHttpRequest.post_params: array expected");
message.post_params = [];
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 (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 >= 0)
message.body = object.body;
if (object.absolute_timeout != null)
message.absolute_timeout = object.absolute_timeout >>> 0;
return message;
};
/**
* Creates a plain object from a CMsgHttpRequest message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgHttpRequest
* @static
* @param {CMsgHttpRequest} message CMsgHttpRequest
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgHttpRequest.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults) {
object.headers = [];
object.get_params = [];
object.post_params = [];
}
if (options.defaults) {
object.request_method = 0;
object.hostname = "";
object.url = "";
if (options.bytes === String)
object.body = "";
else {
object.body = [];
if (options.bytes !== Array)
object.body = $util.newBuffer(object.body);
}
object.absolute_timeout = 0;
}
if (message.request_method != null && message.hasOwnProperty("request_method"))
object.request_method = message.request_method;
if (message.hostname != null && message.hasOwnProperty("hostname"))
object.hostname = message.hostname;
if (message.url != null && message.hasOwnProperty("url"))
object.url = message.url;
if (message.headers && message.headers.length) {
object.headers = [];
for (var j = 0; j < message.headers.length; ++j)
object.headers[j] = $root.CMsgHttpRequest.RequestHeader.toObject(message.headers[j], options);
}
if (message.get_params && message.get_params.length) {
object.get_params = [];
for (var j = 0; j < message.get_params.length; ++j)
object.get_params[j] = $root.CMsgHttpRequest.QueryParam.toObject(message.get_params[j], options);
}
if (message.post_params && message.post_params.length) {
object.post_params = [];
for (var j = 0; j < message.post_params.length; ++j)
object.post_params[j] = $root.CMsgHttpRequest.QueryParam.toObject(message.post_params[j], 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.absolute_timeout != null && message.hasOwnProperty("absolute_timeout"))
object.absolute_timeout = message.absolute_timeout;
return object;
};
/**
* Converts this CMsgHttpRequest to JSON.
* @function toJSON
* @memberof CMsgHttpRequest
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgHttpRequest.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgHttpRequest
* @function getTypeUrl
* @memberof CMsgHttpRequest
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgHttpRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgHttpRequest";
};
CMsgHttpRequest.RequestHeader = (function() {
/**
* Properties of a RequestHeader.
* @memberof CMsgHttpRequest
* @interface IRequestHeader
* @property {string|null} [name] RequestHeader name
* @property {string|null} [value] RequestHeader value
*/
/**
* Constructs a new RequestHeader.
* @memberof CMsgHttpRequest
* @classdesc Represents a RequestHeader.
* @implements IRequestHeader
* @constructor
* @param {CMsgHttpRequest.IRequestHeader=} [properties] Properties to set
*/
function RequestHeader(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* RequestHeader name.
* @member {string} name
* @memberof CMsgHttpRequest.RequestHeader
* @instance
*/
RequestHeader.prototype.name = "";
/**
* RequestHeader value.
* @member {string} value
* @memberof CMsgHttpRequest.RequestHeader
* @instance
*/
RequestHeader.prototype.value = "";
/**
* Creates a new RequestHeader instance using the specified properties.
* @function create
* @memberof CMsgHttpRequest.RequestHeader
* @static
* @param {CMsgHttpRequest.IRequestHeader=} [properties] Properties to set
* @returns {CMsgHttpRequest.RequestHeader} RequestHeader instance
*/
RequestHeader.create = function create(properties) {
return new RequestHeader(properties);
};
/**
* Encodes the specified RequestHeader message. Does not implicitly {@link CMsgHttpRequest.RequestHeader.verify|verify} messages.
* @function encode
* @memberof CMsgHttpRequest.RequestHeader
* @static
* @param {CMsgHttpRequest.IRequestHeader} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 2 =*/18).string(message.value);
return writer;
};
/**
* Encodes the specified RequestHeader message, length delimited. Does not implicitly {@link CMsgHttpRequest.RequestHeader.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgHttpRequest.RequestHeader
* @static
* @param {CMsgHttpRequest.IRequestHeader} 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();
};
/**
* Decodes a RequestHeader message from the specified reader or buffer.
* @function decode
* @memberof CMsgHttpRequest.RequestHeader
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgHttpRequest.RequestHeader} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a RequestHeader message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgHttpRequest.RequestHeader
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgHttpRequest.RequestHeader} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a RequestHeader message.
* @function verify
* @memberof CMsgHttpRequest.RequestHeader
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
RequestHeader.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.name != null && message.hasOwnProperty("name"))
if (!$util.isString(message.name))
return "name: string expected";
if (message.value != null && message.hasOwnProperty("value"))
if (!$util.isString(message.value))
return "value: string expected";
return null;
};
/**
* Creates a RequestHeader message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgHttpRequest.RequestHeader
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgHttpRequest.RequestHeader} RequestHeader
*/
RequestHeader.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgHttpRequest.RequestHeader)
return object;
var message = new $root.CMsgHttpRequest.RequestHeader();
if (object.name != null)
message.name = String(object.name);
if (object.value != null)
message.value = String(object.value);
return message;
};
/**
* Creates a plain object from a RequestHeader message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgHttpRequest.RequestHeader
* @static
* @param {CMsgHttpRequest.RequestHeader} message RequestHeader
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
RequestHeader.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.name = "";
object.value = "";
}
if (message.name != null && message.hasOwnProperty("name"))
object.name = message.name;
if (message.value != null && message.hasOwnProperty("value"))
object.value = message.value;
return object;
};
/**
* Converts this RequestHeader to JSON.
* @function toJSON
* @memberof CMsgHttpRequest.RequestHeader
* @instance
* @returns {Object.<string,*>} JSON object
*/
RequestHeader.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for RequestHeader
* @function getTypeUrl
* @memberof CMsgHttpRequest.RequestHeader
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
RequestHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgHttpRequest.RequestHeader";
};
return RequestHeader;
})();
CMsgHttpRequest.QueryParam = (function() {
/**
* Properties of a QueryParam.
* @memberof CMsgHttpRequest
* @interface IQueryParam
* @property {string|null} [name] QueryParam name
* @property {Uint8Array|null} [value] QueryParam value
*/
/**
* Constructs a new QueryParam.
* @memberof CMsgHttpRequest
* @classdesc Represents a QueryParam.
* @implements IQueryParam
* @constructor
* @param {CMsgHttpRequest.IQueryParam=} [properties] Properties to set
*/
function QueryParam(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* QueryParam name.
* @member {string} name
* @memberof CMsgHttpRequest.QueryParam
* @instance
*/
QueryParam.prototype.name = "";
/**
* QueryParam value.
* @member {Uint8Array} value
* @memberof CMsgHttpRequest.QueryParam
* @instance
*/
QueryParam.prototype.value = $util.newBuffer([]);
/**
* Creates a new QueryParam instance using the specified properties.
* @function create
* @memberof CMsgHttpRequest.QueryParam
* @static
* @param {CMsgHttpRequest.IQueryParam=} [properties] Properties to set
* @returns {CMsgHttpRequest.QueryParam} QueryParam instance
*/
QueryParam.create = function create(properties) {
return new QueryParam(properties);
};
/**
* Encodes the specified QueryParam message. Does not implicitly {@link CMsgHttpRequest.QueryParam.verify|verify} messages.
* @function encode
* @memberof CMsgHttpRequest.QueryParam
* @static
* @param {CMsgHttpRequest.IQueryParam} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value);
return writer;
};
/**
* Encodes the specified QueryParam message, length delimited. Does not implicitly {@link CMsgHttpRequest.QueryParam.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgHttpRequest.QueryParam
* @static
* @param {CMsgHttpRequest.IQueryParam} 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();
};
/**
* Decodes a QueryParam message from the specified reader or buffer.
* @function decode
* @memberof CMsgHttpRequest.QueryParam
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgHttpRequest.QueryParam} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a QueryParam message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgHttpRequest.QueryParam
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgHttpRequest.QueryParam} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a QueryParam message.
* @function verify
* @memberof CMsgHttpRequest.QueryParam
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
QueryParam.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.name != null && message.hasOwnProperty("name"))
if (!$util.isString(message.name))
return "name: string expected";
if (message.value != null && message.hasOwnProperty("value"))
if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value)))
return "value: buffer expected";
return null;
};
/**
* Creates a QueryParam message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgHttpRequest.QueryParam
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgHttpRequest.QueryParam} QueryParam
*/
QueryParam.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgHttpRequest.QueryParam)
return object;
var message = new $root.CMsgHttpRequest.QueryParam();
if (object.name != null)
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 >= 0)
message.value = object.value;
return message;
};
/**
* Creates a plain object from a QueryParam message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgHttpRequest.QueryParam
* @static
* @param {CMsgHttpRequest.QueryParam} message QueryParam
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
QueryParam.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.name = "";
if (options.bytes === String)
object.value = "";
else {
object.value = [];
if (options.bytes !== Array)
object.value = $util.newBuffer(object.value);
}
}
if (message.name != null && message.hasOwnProperty("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;
return object;
};
/**
* Converts this QueryParam to JSON.
* @function toJSON
* @memberof CMsgHttpRequest.QueryParam
* @instance
* @returns {Object.<string,*>} JSON object
*/
QueryParam.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for QueryParam
* @function getTypeUrl
* @memberof CMsgHttpRequest.QueryParam
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
QueryParam.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgHttpRequest.QueryParam";
};
return QueryParam;
})();
return CMsgHttpRequest;
})();
$root.CMsgWebAPIRequest = (function() {
/**
* Properties of a CMsgWebAPIRequest.
* @exports ICMsgWebAPIRequest
* @interface ICMsgWebAPIRequest
* @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 {number|null} [routing_app_id] CMsgWebAPIRequest routing_app_id
*/
/**
* Constructs a new CMsgWebAPIRequest.
* @exports CMsgWebAPIRequest
* @classdesc Represents a CMsgWebAPIRequest.
* @implements ICMsgWebAPIRequest
* @constructor
* @param {ICMsgWebAPIRequest=} [properties] Properties to set
*/
function CMsgWebAPIRequest(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgWebAPIRequest interface_name.
* @member {string} interface_name
* @memberof CMsgWebAPIRequest
* @instance
*/
CMsgWebAPIRequest.prototype.interface_name = "";
/**
* CMsgWebAPIRequest method_name.
* @member {string} method_name
* @memberof CMsgWebAPIRequest
* @instance
*/
CMsgWebAPIRequest.prototype.method_name = "";
/**
* CMsgWebAPIRequest version.
* @member {number} version
* @memberof CMsgWebAPIRequest
* @instance
*/
CMsgWebAPIRequest.prototype.version = 0;
/**
* CMsgWebAPIRequest api_key.
* @member {ICMsgWebAPIKey|null|undefined} api_key
* @memberof CMsgWebAPIRequest
* @instance
*/
CMsgWebAPIRequest.prototype.api_key = null;
/**
* CMsgWebAPIRequest request.
* @member {ICMsgHttpRequest|null|undefined} request
* @memberof CMsgWebAPIRequest
* @instance
*/
CMsgWebAPIRequest.prototype.request = null;
/**
* CMsgWebAPIRequest routing_app_id.
* @member {number} routing_app_id
* @memberof CMsgWebAPIRequest
* @instance
*/
CMsgWebAPIRequest.prototype.routing_app_id = 0;
/**
* Creates a new CMsgWebAPIRequest instance using the specified properties.
* @function create
* @memberof CMsgWebAPIRequest
* @static
* @param {ICMsgWebAPIRequest=} [properties] Properties to set
* @returns {CMsgWebAPIRequest} CMsgWebAPIRequest instance
*/
CMsgWebAPIRequest.create = function create(properties) {
return new CMsgWebAPIRequest(properties);
};
/**
* Encodes the specified CMsgWebAPIRequest message. Does not implicitly {@link CMsgWebAPIRequest.verify|verify} messages.
* @function encode
* @memberof CMsgWebAPIRequest
* @static
* @param {ICMsgWebAPIRequest} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 3, wireType 2 =*/26).string(message.method_name);
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"))
writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.routing_app_id);
return writer;
};
/**
* Encodes the specified CMsgWebAPIRequest message, length delimited. Does not implicitly {@link CMsgWebAPIRequest.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgWebAPIRequest
* @static
* @param {ICMsgWebAPIRequest} 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();
};
/**
* Decodes a CMsgWebAPIRequest message from the specified reader or buffer.
* @function decode
* @memberof CMsgWebAPIRequest
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgWebAPIRequest} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgWebAPIRequest();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
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);
break;
}
}
return message;
};
/**
* Decodes a CMsgWebAPIRequest message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgWebAPIRequest
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgWebAPIRequest} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgWebAPIRequest message.
* @function verify
* @memberof CMsgWebAPIRequest
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgWebAPIRequest.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.interface_name != null && message.hasOwnProperty("interface_name"))
if (!$util.isString(message.interface_name))
return "interface_name: string expected";
if (message.method_name != null && message.hasOwnProperty("method_name"))
if (!$util.isString(message.method_name))
return "method_name: string expected";
if (message.version != null && message.hasOwnProperty("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 (error)
return "api_key." + error;
}
if (message.request != null && message.hasOwnProperty("request")) {
var error = $root.CMsgHttpRequest.verify(message.request);
if (error)
return "request." + error;
}
if (message.routing_app_id != null && message.hasOwnProperty("routing_app_id"))
if (!$util.isInteger(message.routing_app_id))
return "routing_app_id: integer expected";
return null;
};
/**
* Creates a CMsgWebAPIRequest message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgWebAPIRequest
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgWebAPIRequest} CMsgWebAPIRequest
*/
CMsgWebAPIRequest.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgWebAPIRequest)
return object;
var message = new $root.CMsgWebAPIRequest();
if (object.interface_name != null)
message.interface_name = String(object.interface_name);
if (object.method_name != null)
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 (object.request != null) {
if (typeof object.request !== "object")
throw TypeError(".CMsgWebAPIRequest.request: object expected");
message.request = $root.CMsgHttpRequest.fromObject(object.request);
}
if (object.routing_app_id != null)
message.routing_app_id = object.routing_app_id >>> 0;
return message;
};
/**
* Creates a plain object from a CMsgWebAPIRequest message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgWebAPIRequest
* @static
* @param {CMsgWebAPIRequest} message CMsgWebAPIRequest
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgWebAPIRequest.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.interface_name = "";
object.method_name = "";
object.version = 0;
object.api_key = null;
object.request = null;
object.routing_app_id = 0;
}
if (message.interface_name != null && message.hasOwnProperty("interface_name"))
object.interface_name = message.interface_name;
if (message.method_name != null && message.hasOwnProperty("method_name"))
object.method_name = message.method_name;
if (message.version != null && message.hasOwnProperty("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"))
object.routing_app_id = message.routing_app_id;
return object;
};
/**
* Converts this CMsgWebAPIRequest to JSON.
* @function toJSON
* @memberof CMsgWebAPIRequest
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgWebAPIRequest.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgWebAPIRequest
* @function getTypeUrl
* @memberof CMsgWebAPIRequest
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgWebAPIRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgWebAPIRequest";
};
return CMsgWebAPIRequest;
})();
$root.CMsgHttpResponse = (function() {
/**
* Properties of a CMsgHttpResponse.
* @exports ICMsgHttpResponse
* @interface ICMsgHttpResponse
* @property {number|null} [status_code] CMsgHttpResponse status_code
* @property {Array.<CMsgHttpResponse.IResponseHeader>|null} [headers] CMsgHttpResponse headers
* @property {Uint8Array|null} [body] CMsgHttpResponse body
*/
/**
* Constructs a new CMsgHttpResponse.
* @exports CMsgHttpResponse
* @classdesc Represents a CMsgHttpResponse.
* @implements ICMsgHttpResponse
* @constructor
* @param {ICMsgHttpResponse=} [properties] Properties to set
*/
function CMsgHttpResponse(properties) {
this.headers = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgHttpResponse status_code.
* @member {number} status_code
* @memberof CMsgHttpResponse
* @instance
*/
CMsgHttpResponse.prototype.status_code = 0;
/**
* CMsgHttpResponse headers.
* @member {Array.<CMsgHttpResponse.IResponseHeader>} headers
* @memberof CMsgHttpResponse
* @instance
*/
CMsgHttpResponse.prototype.headers = $util.emptyArray;
/**
* CMsgHttpResponse body.
* @member {Uint8Array} body
* @memberof CMsgHttpResponse
* @instance
*/
CMsgHttpResponse.prototype.body = $util.newBuffer([]);
/**
* Creates a new CMsgHttpResponse instance using the specified properties.
* @function create
* @memberof CMsgHttpResponse
* @static
* @param {ICMsgHttpResponse=} [properties] Properties to set
* @returns {CMsgHttpResponse} CMsgHttpResponse instance
*/
CMsgHttpResponse.create = function create(properties) {
return new CMsgHttpResponse(properties);
};
/**
* Encodes the specified CMsgHttpResponse message. Does not implicitly {@link CMsgHttpResponse.verify|verify} messages.
* @function encode
* @memberof CMsgHttpResponse
* @static
* @param {ICMsgHttpResponse} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.body);
return writer;
};
/**
* Encodes the specified CMsgHttpResponse message, length delimited. Does not implicitly {@link CMsgHttpResponse.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgHttpResponse
* @static
* @param {ICMsgHttpResponse} 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();
};
/**
* Decodes a CMsgHttpResponse message from the specified reader or buffer.
* @function decode
* @memberof CMsgHttpResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgHttpResponse} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgHttpResponse message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgHttpResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgHttpResponse} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgHttpResponse message.
* @function verify
* @memberof CMsgHttpResponse
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgHttpResponse.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.status_code != null && message.hasOwnProperty("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))
return "headers: array expected";
for (var i = 0; i < message.headers.length; ++i) {
var error = $root.CMsgHttpResponse.ResponseHeader.verify(message.headers[i]);
if (error)
return "headers." + error;
}
}
if (message.body != null && message.hasOwnProperty("body"))
if (!(message.body && typeof message.body.length === "number" || $util.isString(message.body)))
return "body: buffer expected";
return null;
};
/**
* Creates a CMsgHttpResponse message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgHttpResponse
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgHttpResponse} CMsgHttpResponse
*/
CMsgHttpResponse.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgHttpResponse)
return object;
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 = [];
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 (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 >= 0)
message.body = object.body;
return message;
};
/**
* Creates a plain object from a CMsgHttpResponse message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgHttpResponse
* @static
* @param {CMsgHttpResponse} message CMsgHttpResponse
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgHttpResponse.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.headers = [];
if (options.defaults) {
object.status_code = 0;
if (options.bytes === String)
object.body = "";
else {
object.body = [];
if (options.bytes !== Array)
object.body = $util.newBuffer(object.body);
}
}
if (message.status_code != null && message.hasOwnProperty("status_code"))
object.status_code = message.status_code;
if (message.headers && message.headers.length) {
object.headers = [];
for (var j = 0; j < message.headers.length; ++j)
object.headers[j] = $root.CMsgHttpResponse.ResponseHeader.toObject(message.headers[j], 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;
return object;
};
/**
* Converts this CMsgHttpResponse to JSON.
* @function toJSON
* @memberof CMsgHttpResponse
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgHttpResponse.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgHttpResponse
* @function getTypeUrl
* @memberof CMsgHttpResponse
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgHttpResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgHttpResponse";
};
CMsgHttpResponse.ResponseHeader = (function() {
/**
* Properties of a ResponseHeader.
* @memberof CMsgHttpResponse
* @interface IResponseHeader
* @property {string|null} [name] ResponseHeader name
* @property {string|null} [value] ResponseHeader value
*/
/**
* Constructs a new ResponseHeader.
* @memberof CMsgHttpResponse
* @classdesc Represents a ResponseHeader.
* @implements IResponseHeader
* @constructor
* @param {CMsgHttpResponse.IResponseHeader=} [properties] Properties to set
*/
function ResponseHeader(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* ResponseHeader name.
* @member {string} name
* @memberof CMsgHttpResponse.ResponseHeader
* @instance
*/
ResponseHeader.prototype.name = "";
/**
* ResponseHeader value.
* @member {string} value
* @memberof CMsgHttpResponse.ResponseHeader
* @instance
*/
ResponseHeader.prototype.value = "";
/**
* Creates a new ResponseHeader instance using the specified properties.
* @function create
* @memberof CMsgHttpResponse.ResponseHeader
* @static
* @param {CMsgHttpResponse.IResponseHeader=} [properties] Properties to set
* @returns {CMsgHttpResponse.ResponseHeader} ResponseHeader instance
*/
ResponseHeader.create = function create(properties) {
return new ResponseHeader(properties);
};
/**
* Encodes the specified ResponseHeader message. Does not implicitly {@link CMsgHttpResponse.ResponseHeader.verify|verify} messages.
* @function encode
* @memberof CMsgHttpResponse.ResponseHeader
* @static
* @param {CMsgHttpResponse.IResponseHeader} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 2 =*/18).string(message.value);
return writer;
};
/**
* Encodes the specified ResponseHeader message, length delimited. Does not implicitly {@link CMsgHttpResponse.ResponseHeader.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgHttpResponse.ResponseHeader
* @static
* @param {CMsgHttpResponse.IResponseHeader} 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();
};
/**
* Decodes a ResponseHeader message from the specified reader or buffer.
* @function decode
* @memberof CMsgHttpResponse.ResponseHeader
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgHttpResponse.ResponseHeader} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a ResponseHeader message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgHttpResponse.ResponseHeader
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgHttpResponse.ResponseHeader} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a ResponseHeader message.
* @function verify
* @memberof CMsgHttpResponse.ResponseHeader
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
ResponseHeader.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.name != null && message.hasOwnProperty("name"))
if (!$util.isString(message.name))
return "name: string expected";
if (message.value != null && message.hasOwnProperty("value"))
if (!$util.isString(message.value))
return "value: string expected";
return null;
};
/**
* Creates a ResponseHeader message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgHttpResponse.ResponseHeader
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgHttpResponse.ResponseHeader} ResponseHeader
*/
ResponseHeader.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgHttpResponse.ResponseHeader)
return object;
var message = new $root.CMsgHttpResponse.ResponseHeader();
if (object.name != null)
message.name = String(object.name);
if (object.value != null)
message.value = String(object.value);
return message;
};
/**
* Creates a plain object from a ResponseHeader message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgHttpResponse.ResponseHeader
* @static
* @param {CMsgHttpResponse.ResponseHeader} message ResponseHeader
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
ResponseHeader.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.name = "";
object.value = "";
}
if (message.name != null && message.hasOwnProperty("name"))
object.name = message.name;
if (message.value != null && message.hasOwnProperty("value"))
object.value = message.value;
return object;
};
/**
* Converts this ResponseHeader to JSON.
* @function toJSON
* @memberof CMsgHttpResponse.ResponseHeader
* @instance
* @returns {Object.<string,*>} JSON object
*/
ResponseHeader.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for ResponseHeader
* @function getTypeUrl
* @memberof CMsgHttpResponse.ResponseHeader
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
ResponseHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgHttpResponse.ResponseHeader";
};
return ResponseHeader;
})();
return CMsgHttpResponse;
})();
$root.CMsgAMFindAccounts = (function() {
/**
* Properties of a CMsgAMFindAccounts.
* @exports ICMsgAMFindAccounts
* @interface ICMsgAMFindAccounts
* @property {number|null} [search_type] CMsgAMFindAccounts search_type
* @property {string|null} [search_string] CMsgAMFindAccounts search_string
*/
/**
* Constructs a new CMsgAMFindAccounts.
* @exports CMsgAMFindAccounts
* @classdesc Represents a CMsgAMFindAccounts.
* @implements ICMsgAMFindAccounts
* @constructor
* @param {ICMsgAMFindAccounts=} [properties] Properties to set
*/
function CMsgAMFindAccounts(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgAMFindAccounts search_type.
* @member {number} search_type
* @memberof CMsgAMFindAccounts
* @instance
*/
CMsgAMFindAccounts.prototype.search_type = 0;
/**
* CMsgAMFindAccounts search_string.
* @member {string} search_string
* @memberof CMsgAMFindAccounts
* @instance
*/
CMsgAMFindAccounts.prototype.search_string = "";
/**
* Creates a new CMsgAMFindAccounts instance using the specified properties.
* @function create
* @memberof CMsgAMFindAccounts
* @static
* @param {ICMsgAMFindAccounts=} [properties] Properties to set
* @returns {CMsgAMFindAccounts} CMsgAMFindAccounts instance
*/
CMsgAMFindAccounts.create = function create(properties) {
return new CMsgAMFindAccounts(properties);
};
/**
* Encodes the specified CMsgAMFindAccounts message. Does not implicitly {@link CMsgAMFindAccounts.verify|verify} messages.
* @function encode
* @memberof CMsgAMFindAccounts
* @static
* @param {ICMsgAMFindAccounts} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 2 =*/18).string(message.search_string);
return writer;
};
/**
* Encodes the specified CMsgAMFindAccounts message, length delimited. Does not implicitly {@link CMsgAMFindAccounts.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgAMFindAccounts
* @static
* @param {ICMsgAMFindAccounts} 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();
};
/**
* Decodes a CMsgAMFindAccounts message from the specified reader or buffer.
* @function decode
* @memberof CMsgAMFindAccounts
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgAMFindAccounts} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgAMFindAccounts message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgAMFindAccounts
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgAMFindAccounts} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgAMFindAccounts message.
* @function verify
* @memberof CMsgAMFindAccounts
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgAMFindAccounts.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.search_type != null && message.hasOwnProperty("search_type"))
if (!$util.isInteger(message.search_type))
return "search_type: integer expected";
if (message.search_string != null && message.hasOwnProperty("search_string"))
if (!$util.isString(message.search_string))
return "search_string: string expected";
return null;
};
/**
* Creates a CMsgAMFindAccounts message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgAMFindAccounts
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgAMFindAccounts} CMsgAMFindAccounts
*/
CMsgAMFindAccounts.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgAMFindAccounts)
return object;
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);
return message;
};
/**
* Creates a plain object from a CMsgAMFindAccounts message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgAMFindAccounts
* @static
* @param {CMsgAMFindAccounts} message CMsgAMFindAccounts
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgAMFindAccounts.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.search_type = 0;
object.search_string = "";
}
if (message.search_type != null && message.hasOwnProperty("search_type"))
object.search_type = message.search_type;
if (message.search_string != null && message.hasOwnProperty("search_string"))
object.search_string = message.search_string;
return object;
};
/**
* Converts this CMsgAMFindAccounts to JSON.
* @function toJSON
* @memberof CMsgAMFindAccounts
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgAMFindAccounts.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgAMFindAccounts
* @function getTypeUrl
* @memberof CMsgAMFindAccounts
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgAMFindAccounts.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgAMFindAccounts";
};
return CMsgAMFindAccounts;
})();
$root.CMsgAMFindAccountsResponse = (function() {
/**
* Properties of a CMsgAMFindAccountsResponse.
* @exports ICMsgAMFindAccountsResponse
* @interface ICMsgAMFindAccountsResponse
* @property {Array.<number|Long>|null} [steam_id] CMsgAMFindAccountsResponse steam_id
*/
/**
* Constructs a new CMsgAMFindAccountsResponse.
* @exports CMsgAMFindAccountsResponse
* @classdesc Represents a CMsgAMFindAccountsResponse.
* @implements ICMsgAMFindAccountsResponse
* @constructor
* @param {ICMsgAMFindAccountsResponse=} [properties] Properties to set
*/
function CMsgAMFindAccountsResponse(properties) {
this.steam_id = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgAMFindAccountsResponse steam_id.
* @member {Array.<number|Long>} steam_id
* @memberof CMsgAMFindAccountsResponse
* @instance
*/
CMsgAMFindAccountsResponse.prototype.steam_id = $util.emptyArray;
/**
* Creates a new CMsgAMFindAccountsResponse instance using the specified properties.
* @function create
* @memberof CMsgAMFindAccountsResponse
* @static
* @param {ICMsgAMFindAccountsResponse=} [properties] Properties to set
* @returns {CMsgAMFindAccountsResponse} CMsgAMFindAccountsResponse instance
*/
CMsgAMFindAccountsResponse.create = function create(properties) {
return new CMsgAMFindAccountsResponse(properties);
};
/**
* Encodes the specified CMsgAMFindAccountsResponse message. Does not implicitly {@link CMsgAMFindAccountsResponse.verify|verify} messages.
* @function encode
* @memberof CMsgAMFindAccountsResponse
* @static
* @param {ICMsgAMFindAccountsResponse} 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) {
if (!writer)
writer = $Writer.create();
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]);
return writer;
};
/**
* Encodes the specified CMsgAMFindAccountsResponse message, length delimited. Does not implicitly {@link CMsgAMFindAccountsResponse.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgAMFindAccountsResponse
* @static
* @param {ICMsgAMFindAccountsResponse} 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();
};
/**
* Decodes a CMsgAMFindAccountsResponse message from the specified reader or buffer.
* @function decode
* @memberof CMsgAMFindAccountsResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgAMFindAccountsResponse} 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgAMFindAccountsResponse message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgAMFindAccountsResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgAMFindAccountsResponse} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgAMFindAccountsResponse message.
* @function verify
* @memberof CMsgAMFindAccountsResponse
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgAMFindAccountsResponse.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.steam_id != null && message.hasOwnProperty("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)))
return "steam_id: integer|Long[] expected";
}
return null;
};
/**
* Creates a CMsgAMFindAccountsResponse message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgAMFindAccountsResponse
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgAMFindAccountsResponse} CMsgAMFindAccountsResponse
*/
CMsgAMFindAccountsResponse.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgAMFindAccountsResponse)
return object;
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 = [];
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;
else if (typeof object.steam_id[i] === "string")
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();
}
return message;
};
/**
* Creates a plain object from a CMsgAMFindAccountsResponse message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgAMFindAccountsResponse
* @static
* @param {CMsgAMFindAccountsResponse} message CMsgAMFindAccountsResponse
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgAMFindAccountsResponse.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.steam_id = [];
if (message.steam_id && message.steam_id.length) {
object.steam_id = [];
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];
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];
}
return object;
};
/**
* Converts this CMsgAMFindAccountsResponse to JSON.
* @function toJSON
* @memberof CMsgAMFindAccountsResponse
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgAMFindAccountsResponse.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgAMFindAccountsResponse
* @function getTypeUrl
* @memberof CMsgAMFindAccountsResponse
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgAMFindAccountsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgAMFindAccountsResponse";
};
return CMsgAMFindAccountsResponse;
})();
$root.CMsgNotifyWatchdog = (function() {
/**
* Properties of a CMsgNotifyWatchdog.
* @exports ICMsgNotifyWatchdog
* @interface ICMsgNotifyWatchdog
* @property {number|null} [source] CMsgNotifyWatchdog source
* @property {number|null} [alert_type] CMsgNotifyWatchdog alert_type
* @property {number|null} [alert_destination] CMsgNotifyWatchdog alert_destination
* @property {boolean|null} [critical] CMsgNotifyWatchdog critical
* @property {number|null} [time] CMsgNotifyWatchdog time
* @property {number|null} [appid] CMsgNotifyWatchdog appid
* @property {string|null} [text] CMsgNotifyWatchdog text
*/
/**
* Constructs a new CMsgNotifyWatchdog.
* @exports CMsgNotifyWatchdog
* @classdesc Represents a CMsgNotifyWatchdog.
* @implements ICMsgNotifyWatchdog
* @constructor
* @param {ICMsgNotifyWatchdog=} [properties] Properties to set
*/
function CMsgNotifyWatchdog(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgNotifyWatchdog source.
* @member {number} source
* @memberof CMsgNotifyWatchdog
* @instance
*/
CMsgNotifyWatchdog.prototype.source = 0;
/**
* CMsgNotifyWatchdog alert_type.
* @member {number} alert_type
* @memberof CMsgNotifyWatchdog
* @instance
*/
CMsgNotifyWatchdog.prototype.alert_type = 0;
/**
* CMsgNotifyWatchdog alert_destination.
* @member {number} alert_destination
* @memberof CMsgNotifyWatchdog
* @instance
*/
CMsgNotifyWatchdog.prototype.alert_destination = 0;
/**
* CMsgNotifyWatchdog critical.
* @member {boolean} critical
* @memberof CMsgNotifyWatchdog
* @instance
*/
CMsgNotifyWatchdog.prototype.critical = false;
/**
* CMsgNotifyWatchdog time.
* @member {number} time
* @memberof CMsgNotifyWatchdog
* @instance
*/
CMsgNotifyWatchdog.prototype.time = 0;
/**
* CMsgNotifyWatchdog appid.
* @member {number} appid
* @memberof CMsgNotifyWatchdog
* @instance
*/
CMsgNotifyWatchdog.prototype.appid = 0;
/**
* CMsgNotifyWatchdog text.
* @member {string} text
* @memberof CMsgNotifyWatchdog
* @instance
*/
CMsgNotifyWatchdog.prototype.text = "";
/**
* Creates a new CMsgNotifyWatchdog instance using the specified properties.
* @function create
* @memberof CMsgNotifyWatchdog
* @static
* @param {ICMsgNotifyWatchdog=} [properties] Properties to set
* @returns {CMsgNotifyWatchdog} CMsgNotifyWatchdog instance
*/
CMsgNotifyWatchdog.create = function create(properties) {
return new CMsgNotifyWatchdog(properties);
};
/**
* Encodes the specified CMsgNotifyWatchdog message. Does not implicitly {@link CMsgNotifyWatchdog.verify|verify} messages.
* @function encode
* @memberof CMsgNotifyWatchdog
* @static
* @param {ICMsgNotifyWatchdog} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.alert_type);
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"))
writer.uint32(/* id 4, wireType 0 =*/32).bool(message.critical);
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"))
writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.appid);
if (message.text != null && Object.hasOwnProperty.call(message, "text"))
writer.uint32(/* id 7, wireType 2 =*/58).string(message.text);
return writer;
};
/**
* Encodes the specified CMsgNotifyWatchdog message, length delimited. Does not implicitly {@link CMsgNotifyWatchdog.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgNotifyWatchdog
* @static
* @param {ICMsgNotifyWatchdog} 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();
};
/**
* Decodes a CMsgNotifyWatchdog message from the specified reader or buffer.
* @function decode
* @memberof CMsgNotifyWatchdog
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgNotifyWatchdog} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgNotifyWatchdog message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgNotifyWatchdog
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgNotifyWatchdog} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgNotifyWatchdog message.
* @function verify
* @memberof CMsgNotifyWatchdog
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgNotifyWatchdog.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.source != null && message.hasOwnProperty("source"))
if (!$util.isInteger(message.source))
return "source: integer expected";
if (message.alert_type != null && message.hasOwnProperty("alert_type"))
if (!$util.isInteger(message.alert_type))
return "alert_type: integer expected";
if (message.alert_destination != null && message.hasOwnProperty("alert_destination"))
if (!$util.isInteger(message.alert_destination))
return "alert_destination: integer expected";
if (message.critical != null && message.hasOwnProperty("critical"))
if (typeof message.critical !== "boolean")
return "critical: boolean expected";
if (message.time != null && message.hasOwnProperty("time"))
if (!$util.isInteger(message.time))
return "time: integer expected";
if (message.appid != null && message.hasOwnProperty("appid"))
if (!$util.isInteger(message.appid))
return "appid: integer expected";
if (message.text != null && message.hasOwnProperty("text"))
if (!$util.isString(message.text))
return "text: string expected";
return null;
};
/**
* Creates a CMsgNotifyWatchdog message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgNotifyWatchdog
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgNotifyWatchdog} CMsgNotifyWatchdog
*/
CMsgNotifyWatchdog.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgNotifyWatchdog)
return object;
var message = new $root.CMsgNotifyWatchdog();
if (object.source != null)
message.source = object.source >>> 0;
if (object.alert_type != null)
message.alert_type = object.alert_type >>> 0;
if (object.alert_destination != null)
message.alert_destination = object.alert_destination >>> 0;
if (object.critical != null)
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);
return message;
};
/**
* Creates a plain object from a CMsgNotifyWatchdog message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgNotifyWatchdog
* @static
* @param {CMsgNotifyWatchdog} message CMsgNotifyWatchdog
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgNotifyWatchdog.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.source = 0;
object.alert_type = 0;
object.alert_destination = 0;
object.critical = false;
object.time = 0;
object.appid = 0;
object.text = "";
}
if (message.source != null && message.hasOwnProperty("source"))
object.source = message.source;
if (message.alert_type != null && message.hasOwnProperty("alert_type"))
object.alert_type = message.alert_type;
if (message.alert_destination != null && message.hasOwnProperty("alert_destination"))
object.alert_destination = message.alert_destination;
if (message.critical != null && message.hasOwnProperty("critical"))
object.critical = message.critical;
if (message.time != null && message.hasOwnProperty("time"))
object.time = message.time;
if (message.appid != null && message.hasOwnProperty("appid"))
object.appid = message.appid;
if (message.text != null && message.hasOwnProperty("text"))
object.text = message.text;
return object;
};
/**
* Converts this CMsgNotifyWatchdog to JSON.
* @function toJSON
* @memberof CMsgNotifyWatchdog
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgNotifyWatchdog.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgNotifyWatchdog
* @function getTypeUrl
* @memberof CMsgNotifyWatchdog
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgNotifyWatchdog.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgNotifyWatchdog";
};
return CMsgNotifyWatchdog;
})();
$root.CMsgAMGetLicenses = (function() {
/**
* Properties of a CMsgAMGetLicenses.
* @exports ICMsgAMGetLicenses
* @interface ICMsgAMGetLicenses
* @property {number|Long|null} [steamid] CMsgAMGetLicenses steamid
*/
/**
* Constructs a new CMsgAMGetLicenses.
* @exports CMsgAMGetLicenses
* @classdesc Represents a CMsgAMGetLicenses.
* @implements ICMsgAMGetLicenses
* @constructor
* @param {ICMsgAMGetLicenses=} [properties] Properties to set
*/
function CMsgAMGetLicenses(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgAMGetLicenses steamid.
* @member {number|Long} steamid
* @memberof CMsgAMGetLicenses
* @instance
*/
CMsgAMGetLicenses.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* Creates a new CMsgAMGetLicenses instance using the specified properties.
* @function create
* @memberof CMsgAMGetLicenses
* @static
* @param {ICMsgAMGetLicenses=} [properties] Properties to set
* @returns {CMsgAMGetLicenses} CMsgAMGetLicenses instance
*/
CMsgAMGetLicenses.create = function create(properties) {
return new CMsgAMGetLicenses(properties);
};
/**
* Encodes the specified CMsgAMGetLicenses message. Does not implicitly {@link CMsgAMGetLicenses.verify|verify} messages.
* @function encode
* @memberof CMsgAMGetLicenses
* @static
* @param {ICMsgAMGetLicenses} 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) {
if (!writer)
writer = $Writer.create();
if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid"))
writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid);
return writer;
};
/**
* Encodes the specified CMsgAMGetLicenses message, length delimited. Does not implicitly {@link CMsgAMGetLicenses.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgAMGetLicenses
* @static
* @param {ICMsgAMGetLicenses} 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();
};
/**
* Decodes a CMsgAMGetLicenses message from the specified reader or buffer.
* @function decode
* @memberof CMsgAMGetLicenses
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgAMGetLicenses} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgAMGetLicenses message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgAMGetLicenses
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgAMGetLicenses} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgAMGetLicenses message.
* @function verify
* @memberof CMsgAMGetLicenses
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgAMGetLicenses.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.steamid != null && message.hasOwnProperty("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;
};
/**
* Creates a CMsgAMGetLicenses message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgAMGetLicenses
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgAMGetLicenses} CMsgAMGetLicenses
*/
CMsgAMGetLicenses.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgAMGetLicenses)
return object;
var message = new $root.CMsgAMGetLicenses();
if (object.steamid != null)
if ($util.Long)
(message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false;
else if (typeof object.steamid === "string")
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();
return message;
};
/**
* Creates a plain object from a CMsgAMGetLicenses message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgAMGetLicenses
* @static
* @param {CMsgAMGetLicenses} message CMsgAMGetLicenses
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgAMGetLicenses.toObject = function toObject(message, options) {
if (!options)
options = {};
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;
} 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;
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;
return object;
};
/**
* Converts this CMsgAMGetLicenses to JSON.
* @function toJSON
* @memberof CMsgAMGetLicenses
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgAMGetLicenses.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgAMGetLicenses
* @function getTypeUrl
* @memberof CMsgAMGetLicenses
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgAMGetLicenses.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgAMGetLicenses";
};
return CMsgAMGetLicenses;
})();
$root.CMsgPackageLicense = (function() {
/**
* Properties of a CMsgPackageLicense.
* @exports ICMsgPackageLicense
* @interface ICMsgPackageLicense
* @property {number|null} [package_id] CMsgPackageLicense package_id
* @property {number|null} [time_created] CMsgPackageLicense time_created
* @property {number|null} [owner_id] CMsgPackageLicense owner_id
*/
/**
* Constructs a new CMsgPackageLicense.
* @exports CMsgPackageLicense
* @classdesc Represents a CMsgPackageLicense.
* @implements ICMsgPackageLicense
* @constructor
* @param {ICMsgPackageLicense=} [properties] Properties to set
*/
function CMsgPackageLicense(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgPackageLicense package_id.
* @member {number} package_id
* @memberof CMsgPackageLicense
* @instance
*/
CMsgPackageLicense.prototype.package_id = 0;
/**
* CMsgPackageLicense time_created.
* @member {number} time_created
* @memberof CMsgPackageLicense
* @instance
*/
CMsgPackageLicense.prototype.time_created = 0;
/**
* CMsgPackageLicense owner_id.
* @member {number} owner_id
* @memberof CMsgPackageLicense
* @instance
*/
CMsgPackageLicense.prototype.owner_id = 0;
/**
* Creates a new CMsgPackageLicense instance using the specified properties.
* @function create
* @memberof CMsgPackageLicense
* @static
* @param {ICMsgPackageLicense=} [properties] Properties to set
* @returns {CMsgPackageLicense} CMsgPackageLicense instance
*/
CMsgPackageLicense.create = function create(properties) {
return new CMsgPackageLicense(properties);
};
/**
* Encodes the specified CMsgPackageLicense message. Does not implicitly {@link CMsgPackageLicense.verify|verify} messages.
* @function encode
* @memberof CMsgPackageLicense
* @static
* @param {ICMsgPackageLicense} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.time_created);
if (message.owner_id != null && Object.hasOwnProperty.call(message, "owner_id"))
writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.owner_id);
return writer;
};
/**
* Encodes the specified CMsgPackageLicense message, length delimited. Does not implicitly {@link CMsgPackageLicense.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgPackageLicense
* @static
* @param {ICMsgPackageLicense} 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();
};
/**
* Decodes a CMsgPackageLicense message from the specified reader or buffer.
* @function decode
* @memberof CMsgPackageLicense
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgPackageLicense} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgPackageLicense message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgPackageLicense
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgPackageLicense} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgPackageLicense message.
* @function verify
* @memberof CMsgPackageLicense
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgPackageLicense.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.package_id != null && message.hasOwnProperty("package_id"))
if (!$util.isInteger(message.package_id))
return "package_id: integer expected";
if (message.time_created != null && message.hasOwnProperty("time_created"))
if (!$util.isInteger(message.time_created))
return "time_created: integer expected";
if (message.owner_id != null && message.hasOwnProperty("owner_id"))
if (!$util.isInteger(message.owner_id))
return "owner_id: integer expected";
return null;
};
/**
* Creates a CMsgPackageLicense message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgPackageLicense
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgPackageLicense} CMsgPackageLicense
*/
CMsgPackageLicense.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgPackageLicense)
return object;
var message = new $root.CMsgPackageLicense();
if (object.package_id != null)
message.package_id = object.package_id >>> 0;
if (object.time_created != null)
message.time_created = object.time_created >>> 0;
if (object.owner_id != null)
message.owner_id = object.owner_id >>> 0;
return message;
};
/**
* Creates a plain object from a CMsgPackageLicense message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgPackageLicense
* @static
* @param {CMsgPackageLicense} message CMsgPackageLicense
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgPackageLicense.toObject = function toObject(message, options) {
if (!options)
options = {};
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"))
object.package_id = message.package_id;
if (message.time_created != null && message.hasOwnProperty("time_created"))
object.time_created = message.time_created;
if (message.owner_id != null && message.hasOwnProperty("owner_id"))
object.owner_id = message.owner_id;
return object;
};
/**
* Converts this CMsgPackageLicense to JSON.
* @function toJSON
* @memberof CMsgPackageLicense
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgPackageLicense.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgPackageLicense
* @function getTypeUrl
* @memberof CMsgPackageLicense
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgPackageLicense.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgPackageLicense";
};
return CMsgPackageLicense;
})();
$root.CMsgAMGetLicensesResponse = (function() {
/**
* Properties of a CMsgAMGetLicensesResponse.
* @exports ICMsgAMGetLicensesResponse
* @interface ICMsgAMGetLicensesResponse
* @property {Array.<ICMsgPackageLicense>|null} [license] CMsgAMGetLicensesResponse license
* @property {number|null} [result] CMsgAMGetLicensesResponse result
*/
/**
* Constructs a new CMsgAMGetLicensesResponse.
* @exports CMsgAMGetLicensesResponse
* @classdesc Represents a CMsgAMGetLicensesResponse.
* @implements ICMsgAMGetLicensesResponse
* @constructor
* @param {ICMsgAMGetLicensesResponse=} [properties] Properties to set
*/
function CMsgAMGetLicensesResponse(properties) {
this.license = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgAMGetLicensesResponse license.
* @member {Array.<ICMsgPackageLicense>} license
* @memberof CMsgAMGetLicensesResponse
* @instance
*/
CMsgAMGetLicensesResponse.prototype.license = $util.emptyArray;
/**
* CMsgAMGetLicensesResponse result.
* @member {number} result
* @memberof CMsgAMGetLicensesResponse
* @instance
*/
CMsgAMGetLicensesResponse.prototype.result = 0;
/**
* Creates a new CMsgAMGetLicensesResponse instance using the specified properties.
* @function create
* @memberof CMsgAMGetLicensesResponse
* @static
* @param {ICMsgAMGetLicensesResponse=} [properties] Properties to set
* @returns {CMsgAMGetLicensesResponse} CMsgAMGetLicensesResponse instance
*/
CMsgAMGetLicensesResponse.create = function create(properties) {
return new CMsgAMGetLicensesResponse(properties);
};
/**
* Encodes the specified CMsgAMGetLicensesResponse message. Does not implicitly {@link CMsgAMGetLicensesResponse.verify|verify} messages.
* @function encode
* @memberof CMsgAMGetLicensesResponse
* @static
* @param {ICMsgAMGetLicensesResponse} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.result);
return writer;
};
/**
* Encodes the specified CMsgAMGetLicensesResponse message, length delimited. Does not implicitly {@link CMsgAMGetLicensesResponse.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgAMGetLicensesResponse
* @static
* @param {ICMsgAMGetLicensesResponse} 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();
};
/**
* Decodes a CMsgAMGetLicensesResponse message from the specified reader or buffer.
* @function decode
* @memberof CMsgAMGetLicensesResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgAMGetLicensesResponse} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgAMGetLicensesResponse message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgAMGetLicensesResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgAMGetLicensesResponse} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgAMGetLicensesResponse message.
* @function verify
* @memberof CMsgAMGetLicensesResponse
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgAMGetLicensesResponse.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.license != null && message.hasOwnProperty("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]);
if (error)
return "license." + error;
}
}
if (message.result != null && message.hasOwnProperty("result"))
if (!$util.isInteger(message.result))
return "result: integer expected";
return null;
};
/**
* Creates a CMsgAMGetLicensesResponse message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgAMGetLicensesResponse
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgAMGetLicensesResponse} CMsgAMGetLicensesResponse
*/
CMsgAMGetLicensesResponse.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgAMGetLicensesResponse)
return object;
var message = new $root.CMsgAMGetLicensesResponse();
if (object.license) {
if (!Array.isArray(object.license))
throw TypeError(".CMsgAMGetLicensesResponse.license: array expected");
message.license = [];
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 (object.result != null)
message.result = object.result >>> 0;
return message;
};
/**
* Creates a plain object from a CMsgAMGetLicensesResponse message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgAMGetLicensesResponse
* @static
* @param {CMsgAMGetLicensesResponse} message CMsgAMGetLicensesResponse
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgAMGetLicensesResponse.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.license = [];
if (options.defaults)
object.result = 0;
if (message.license && message.license.length) {
object.license = [];
for (var j = 0; j < message.license.length; ++j)
object.license[j] = $root.CMsgPackageLicense.toObject(message.license[j], options);
}
if (message.result != null && message.hasOwnProperty("result"))
object.result = message.result;
return object;
};
/**
* Converts this CMsgAMGetLicensesResponse to JSON.
* @function toJSON
* @memberof CMsgAMGetLicensesResponse
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgAMGetLicensesResponse.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgAMGetLicensesResponse
* @function getTypeUrl
* @memberof CMsgAMGetLicensesResponse
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgAMGetLicensesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgAMGetLicensesResponse";
};
return CMsgAMGetLicensesResponse;
})();
$root.CMsgAMGetUserGameStats = (function() {
/**
* Properties of a CMsgAMGetUserGameStats.
* @exports ICMsgAMGetUserGameStats
* @interface ICMsgAMGetUserGameStats
* @property {number|Long|null} [steam_id] CMsgAMGetUserGameStats steam_id
* @property {number|Long|null} [game_id] CMsgAMGetUserGameStats game_id
* @property {Array.<number>|null} [stats] CMsgAMGetUserGameStats stats
*/
/**
* Constructs a new CMsgAMGetUserGameStats.
* @exports CMsgAMGetUserGameStats
* @classdesc Represents a CMsgAMGetUserGameStats.
* @implements ICMsgAMGetUserGameStats
* @constructor
* @param {ICMsgAMGetUserGameStats=} [properties] Properties to set
*/
function CMsgAMGetUserGameStats(properties) {
this.stats = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgAMGetUserGameStats steam_id.
* @member {number|Long} steam_id
* @memberof CMsgAMGetUserGameStats
* @instance
*/
CMsgAMGetUserGameStats.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* CMsgAMGetUserGameStats game_id.
* @member {number|Long} game_id
* @memberof CMsgAMGetUserGameStats
* @instance
*/
CMsgAMGetUserGameStats.prototype.game_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* CMsgAMGetUserGameStats stats.
* @member {Array.<number>} stats
* @memberof CMsgAMGetUserGameStats
* @instance
*/
CMsgAMGetUserGameStats.prototype.stats = $util.emptyArray;
/**
* Creates a new CMsgAMGetUserGameStats instance using the specified properties.
* @function create
* @memberof CMsgAMGetUserGameStats
* @static
* @param {ICMsgAMGetUserGameStats=} [properties] Properties to set
* @returns {CMsgAMGetUserGameStats} CMsgAMGetUserGameStats instance
*/
CMsgAMGetUserGameStats.create = function create(properties) {
return new CMsgAMGetUserGameStats(properties);
};
/**
* Encodes the specified CMsgAMGetUserGameStats message. Does not implicitly {@link CMsgAMGetUserGameStats.verify|verify} messages.
* @function encode
* @memberof CMsgAMGetUserGameStats
* @static
* @param {ICMsgAMGetUserGameStats} 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) {
if (!writer)
writer = $Writer.create();
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"))
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]);
return writer;
};
/**
* Encodes the specified CMsgAMGetUserGameStats message, length delimited. Does not implicitly {@link CMsgAMGetUserGameStats.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgAMGetUserGameStats
* @static
* @param {ICMsgAMGetUserGameStats} 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();
};
/**
* Decodes a CMsgAMGetUserGameStats message from the specified reader or buffer.
* @function decode
* @memberof CMsgAMGetUserGameStats
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgAMGetUserGameStats} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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();
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
message.stats.push(reader.uint32());
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a CMsgAMGetUserGameStats message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgAMGetUserGameStats
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgAMGetUserGameStats} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgAMGetUserGameStats message.
* @function verify
* @memberof CMsgAMGetUserGameStats
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgAMGetUserGameStats.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.steam_id != null && message.hasOwnProperty("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 (!$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))
return "stats: array expected";
for (var i = 0; i < message.stats.length; ++i)
if (!$util.isInteger(message.stats[i]))
return "stats: integer[] expected";
}
return null;
};
/**
* Creates a CMsgAMGetUserGameStats message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgAMGetUserGameStats
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgAMGetUserGameStats} CMsgAMGetUserGameStats
*/
CMsgAMGetUserGameStats.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgAMGetUserGameStats)
return object;
var message = new $root.CMsgAMGetUserGameStats();
if (object.steam_id != null)
if ($util.Long)
(message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false;
else if (typeof object.steam_id === "string")
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();
if (object.game_id != null)
if ($util.Long)
(message.game_id = $util.Long.fromValue(object.game_id)).unsigned = false;
else if (typeof object.game_id === "string")
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();
if (object.stats) {
if (!Array.isArray(object.stats))
throw TypeError(".CMsgAMGetUserGameStats.stats: array expected");
message.stats = [];
for (var i = 0; i < object.stats.length; ++i)
message.stats[i] = object.stats[i] >>> 0;
}
return message;
};
/**
* Creates a plain object from a CMsgAMGetUserGameStats message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgAMGetUserGameStats
* @static
* @param {CMsgAMGetUserGameStats} message CMsgAMGetUserGameStats
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgAMGetUserGameStats.toObject = function toObject(message, options) {
if (!options)
options = {};
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;
} else
object.steam_id = options.longs === String ? "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;
} else
object.game_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;
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;
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.stats && message.stats.length) {
object.stats = [];
for (var j = 0; j < message.stats.length; ++j)
object.stats[j] = message.stats[j];
}
return object;
};
/**
* Converts this CMsgAMGetUserGameStats to JSON.
* @function toJSON
* @memberof CMsgAMGetUserGameStats
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgAMGetUserGameStats.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgAMGetUserGameStats
* @function getTypeUrl
* @memberof CMsgAMGetUserGameStats
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgAMGetUserGameStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgAMGetUserGameStats";
};
return CMsgAMGetUserGameStats;
})();
$root.CMsgAMGetUserGameStatsResponse = (function() {
/**
* Properties of a CMsgAMGetUserGameStatsResponse.
* @exports ICMsgAMGetUserGameStatsResponse
* @interface ICMsgAMGetUserGameStatsResponse
* @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.<CMsgAMGetUserGameStatsResponse.IStats>|null} [stats] CMsgAMGetUserGameStatsResponse stats
* @property {Array.<CMsgAMGetUserGameStatsResponse.IAchievement_Blocks>|null} [achievement_blocks] CMsgAMGetUserGameStatsResponse achievement_blocks
*/
/**
* Constructs a new CMsgAMGetUserGameStatsResponse.
* @exports CMsgAMGetUserGameStatsResponse
* @classdesc Represents a CMsgAMGetUserGameStatsResponse.
* @implements ICMsgAMGetUserGameStatsResponse
* @constructor
* @param {ICMsgAMGetUserGameStatsResponse=} [properties] Properties to set
*/
function CMsgAMGetUserGameStatsResponse(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)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgAMGetUserGameStatsResponse steam_id.
* @member {number|Long} steam_id
* @memberof CMsgAMGetUserGameStatsResponse
* @instance
*/
CMsgAMGetUserGameStatsResponse.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* CMsgAMGetUserGameStatsResponse game_id.
* @member {number|Long} game_id
* @memberof CMsgAMGetUserGameStatsResponse
* @instance
*/
CMsgAMGetUserGameStatsResponse.prototype.game_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* CMsgAMGetUserGameStatsResponse eresult.
* @member {number} eresult
* @memberof CMsgAMGetUserGameStatsResponse
* @instance
*/
CMsgAMGetUserGameStatsResponse.prototype.eresult = 2;
/**
* CMsgAMGetUserGameStatsResponse stats.
* @member {Array.<CMsgAMGetUserGameStatsResponse.IStats>} stats
* @memberof CMsgAMGetUserGameStatsResponse
* @instance
*/
CMsgAMGetUserGameStatsResponse.prototype.stats = $util.emptyArray;
/**
* CMsgAMGetUserGameStatsResponse achievement_blocks.
* @member {Array.<CMsgAMGetUserGameStatsResponse.IAchievement_Blocks>} achievement_blocks
* @memberof CMsgAMGetUserGameStatsResponse
* @instance
*/
CMsgAMGetUserGameStatsResponse.prototype.achievement_blocks = $util.emptyArray;
/**
* Creates a new CMsgAMGetUserGameStatsResponse instance using the specified properties.
* @function create
* @memberof CMsgAMGetUserGameStatsResponse
* @static
* @param {ICMsgAMGetUserGameStatsResponse=} [properties] Properties to set
* @returns {CMsgAMGetUserGameStatsResponse} CMsgAMGetUserGameStatsResponse instance
*/
CMsgAMGetUserGameStatsResponse.create = function create(properties) {
return new CMsgAMGetUserGameStatsResponse(properties);
};
/**
* Encodes the specified CMsgAMGetUserGameStatsResponse message. Does not implicitly {@link CMsgAMGetUserGameStatsResponse.verify|verify} messages.
* @function encode
* @memberof CMsgAMGetUserGameStatsResponse
* @static
* @param {ICMsgAMGetUserGameStatsResponse} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.game_id);
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();
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();
return writer;
};
/**
* Encodes the specified CMsgAMGetUserGameStatsResponse message, length delimited. Does not implicitly {@link CMsgAMGetUserGameStatsResponse.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgAMGetUserGameStatsResponse
* @static
* @param {ICMsgAMGetUserGameStatsResponse} 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();
};
/**
* Decodes a CMsgAMGetUserGameStatsResponse message from the specified reader or buffer.
* @function decode
* @memberof CMsgAMGetUserGameStatsResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgAMGetUserGameStatsResponse} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgAMGetUserGameStatsResponse message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgAMGetUserGameStatsResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgAMGetUserGameStatsResponse} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgAMGetUserGameStatsResponse message.
* @function verify
* @memberof CMsgAMGetUserGameStatsResponse
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgAMGetUserGameStatsResponse.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.steam_id != null && message.hasOwnProperty("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 (!$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 (!$util.isInteger(message.eresult))
return "eresult: integer expected";
if (message.stats != null && message.hasOwnProperty("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]);
if (error)
return "stats." + error;
}
}
if (message.achievement_blocks != null && message.hasOwnProperty("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]);
if (error)
return "achievement_blocks." + error;
}
}
return null;
};
/**
* Creates a CMsgAMGetUserGameStatsResponse message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgAMGetUserGameStatsResponse
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgAMGetUserGameStatsResponse} CMsgAMGetUserGameStatsResponse
*/
CMsgAMGetUserGameStatsResponse.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgAMGetUserGameStatsResponse)
return object;
var message = new $root.CMsgAMGetUserGameStatsResponse();
if (object.steam_id != null)
if ($util.Long)
(message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false;
else if (typeof object.steam_id === "string")
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();
if (object.game_id != null)
if ($util.Long)
(message.game_id = $util.Long.fromValue(object.game_id)).unsigned = false;
else if (typeof object.game_id === "string")
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();
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 = [];
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 (object.achievement_blocks) {
if (!Array.isArray(object.achievement_blocks))
throw TypeError(".CMsgAMGetUserGameStatsResponse.achievement_blocks: array expected");
message.achievement_blocks = [];
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]);
}
}
return message;
};
/**
* Creates a plain object from a CMsgAMGetUserGameStatsResponse message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgAMGetUserGameStatsResponse
* @static
* @param {CMsgAMGetUserGameStatsResponse} message CMsgAMGetUserGameStatsResponse
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgAMGetUserGameStatsResponse.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults) {
object.stats = [];
object.achievement_blocks = [];
}
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;
} else
object.steam_id = options.longs === String ? "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;
} else
object.game_id = options.longs === String ? "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;
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;
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.eresult = message.eresult;
if (message.stats && message.stats.length) {
object.stats = [];
for (var j = 0; j < message.stats.length; ++j)
object.stats[j] = $root.CMsgAMGetUserGameStatsResponse.Stats.toObject(message.stats[j], options);
}
if (message.achievement_blocks && message.achievement_blocks.length) {
object.achievement_blocks = [];
for (var j = 0; j < message.achievement_blocks.length; ++j)
object.achievement_blocks[j] = $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks.toObject(message.achievement_blocks[j], options);
}
return object;
};
/**
* Converts this CMsgAMGetUserGameStatsResponse to JSON.
* @function toJSON
* @memberof CMsgAMGetUserGameStatsResponse
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgAMGetUserGameStatsResponse.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgAMGetUserGameStatsResponse
* @function getTypeUrl
* @memberof CMsgAMGetUserGameStatsResponse
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgAMGetUserGameStatsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgAMGetUserGameStatsResponse";
};
CMsgAMGetUserGameStatsResponse.Stats = (function() {
/**
* Properties of a Stats.
* @memberof CMsgAMGetUserGameStatsResponse
* @interface IStats
* @property {number|null} [stat_id] Stats stat_id
* @property {number|null} [stat_value] Stats stat_value
*/
/**
* Constructs a new Stats.
* @memberof CMsgAMGetUserGameStatsResponse
* @classdesc Represents a Stats.
* @implements IStats
* @constructor
* @param {CMsgAMGetUserGameStatsResponse.IStats=} [properties] Properties to set
*/
function Stats(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* Stats stat_id.
* @member {number} stat_id
* @memberof CMsgAMGetUserGameStatsResponse.Stats
* @instance
*/
Stats.prototype.stat_id = 0;
/**
* Stats stat_value.
* @member {number} stat_value
* @memberof CMsgAMGetUserGameStatsResponse.Stats
* @instance
*/
Stats.prototype.stat_value = 0;
/**
* Creates a new Stats instance using the specified properties.
* @function create
* @memberof CMsgAMGetUserGameStatsResponse.Stats
* @static
* @param {CMsgAMGetUserGameStatsResponse.IStats=} [properties] Properties to set
* @returns {CMsgAMGetUserGameStatsResponse.Stats} Stats instance
*/
Stats.create = function create(properties) {
return new Stats(properties);
};
/**
* Encodes the specified Stats message. Does not implicitly {@link CMsgAMGetUserGameStatsResponse.Stats.verify|verify} messages.
* @function encode
* @memberof CMsgAMGetUserGameStatsResponse.Stats
* @static
* @param {CMsgAMGetUserGameStatsResponse.IStats} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.stat_value);
return writer;
};
/**
* Encodes the specified Stats message, length delimited. Does not implicitly {@link CMsgAMGetUserGameStatsResponse.Stats.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgAMGetUserGameStatsResponse.Stats
* @static
* @param {CMsgAMGetUserGameStatsResponse.IStats} 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();
};
/**
* Decodes a Stats message from the specified reader or buffer.
* @function decode
* @memberof CMsgAMGetUserGameStatsResponse.Stats
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgAMGetUserGameStatsResponse.Stats} 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);
break;
}
}
return message;
};
/**
* Decodes a Stats message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgAMGetUserGameStatsResponse.Stats
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgAMGetUserGameStatsResponse.Stats} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a Stats message.
* @function verify
* @memberof CMsgAMGetUserGameStatsResponse.Stats
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
Stats.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.stat_id != null && message.hasOwnProperty("stat_id"))
if (!$util.isInteger(message.stat_id))
return "stat_id: integer expected";
if (message.stat_value != null && message.hasOwnProperty("stat_value"))
if (!$util.isInteger(message.stat_value))
return "stat_value: integer expected";
return null;
};
/**
* Creates a Stats message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgAMGetUserGameStatsResponse.Stats
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgAMGetUserGameStatsResponse.Stats} Stats
*/
Stats.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgAMGetUserGameStatsResponse.Stats)
return object;
var message = new $root.CMsgAMGetUserGameStatsResponse.Stats();
if (object.stat_id != null)
message.stat_id = object.stat_id >>> 0;
if (object.stat_value != null)
message.stat_value = object.stat_value >>> 0;
return message;
};
/**
* Creates a plain object from a Stats message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgAMGetUserGameStatsResponse.Stats
* @static
* @param {CMsgAMGetUserGameStatsResponse.Stats} message Stats
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
Stats.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.stat_id = 0;
object.stat_value = 0;
}
if (message.stat_id != null && message.hasOwnProperty("stat_id"))
object.stat_id = message.stat_id;
if (message.stat_value != null && message.hasOwnProperty("stat_value"))
object.stat_value = message.stat_value;
return object;
};
/**
* Converts this Stats to JSON.
* @function toJSON
* @memberof CMsgAMGetUserGameStatsResponse.Stats
* @instance
* @returns {Object.<string,*>} JSON object
*/
Stats.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for Stats
* @function getTypeUrl
* @memberof CMsgAMGetUserGameStatsResponse.Stats
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
Stats.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgAMGetUserGameStatsResponse.Stats";
};
return Stats;
})();
CMsgAMGetUserGameStatsResponse.Achievement_Blocks = (function() {
/**
* Properties of an Achievement_Blocks.
* @memberof CMsgAMGetUserGameStatsResponse
* @interface IAchievement_Blocks
* @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
*/
/**
* Constructs a new Achievement_Blocks.
* @memberof CMsgAMGetUserGameStatsResponse
* @classdesc Represents an Achievement_Blocks.
* @implements IAchievement_Blocks
* @constructor
* @param {CMsgAMGetUserGameStatsResponse.IAchievement_Blocks=} [properties] Properties to set
*/
function Achievement_Blocks(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* Achievement_Blocks achievement_id.
* @member {number} achievement_id
* @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks
* @instance
*/
Achievement_Blocks.prototype.achievement_id = 0;
/**
* Achievement_Blocks achievement_bit_id.
* @member {number} achievement_bit_id
* @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks
* @instance
*/
Achievement_Blocks.prototype.achievement_bit_id = 0;
/**
* Achievement_Blocks unlock_time.
* @member {number} unlock_time
* @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks
* @instance
*/
Achievement_Blocks.prototype.unlock_time = 0;
/**
* Creates a new Achievement_Blocks instance using the specified properties.
* @function create
* @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks
* @static
* @param {CMsgAMGetUserGameStatsResponse.IAchievement_Blocks=} [properties] Properties to set
* @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks} Achievement_Blocks instance
*/
Achievement_Blocks.create = function create(properties) {
return new Achievement_Blocks(properties);
};
/**
* Encodes the specified Achievement_Blocks message. Does not implicitly {@link CMsgAMGetUserGameStatsResponse.Achievement_Blocks.verify|verify} messages.
* @function encode
* @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks
* @static
* @param {CMsgAMGetUserGameStatsResponse.IAchievement_Blocks} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.achievement_bit_id);
if (message.unlock_time != null && Object.hasOwnProperty.call(message, "unlock_time"))
writer.uint32(/* id 3, wireType 5 =*/29).fixed32(message.unlock_time);
return writer;
};
/**
* Encodes the specified Achievement_Blocks message, length delimited. Does not implicitly {@link CMsgAMGetUserGameStatsResponse.Achievement_Blocks.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks
* @static
* @param {CMsgAMGetUserGameStatsResponse.IAchievement_Blocks} 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();
};
/**
* Decodes an Achievement_Blocks message from the specified reader or buffer.
* @function decode
* @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes an Achievement_Blocks message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies an Achievement_Blocks message.
* @function verify
* @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
Achievement_Blocks.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.achievement_id != null && message.hasOwnProperty("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 (!$util.isInteger(message.achievement_bit_id))
return "achievement_bit_id: integer expected";
if (message.unlock_time != null && message.hasOwnProperty("unlock_time"))
if (!$util.isInteger(message.unlock_time))
return "unlock_time: integer expected";
return null;
};
/**
* Creates an Achievement_Blocks message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgAMGetUserGameStatsResponse.Achievement_Blocks} Achievement_Blocks
*/
Achievement_Blocks.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks)
return object;
var message = new $root.CMsgAMGetUserGameStatsResponse.Achievement_Blocks();
if (object.achievement_id != null)
message.achievement_id = object.achievement_id >>> 0;
if (object.achievement_bit_id != null)
message.achievement_bit_id = object.achievement_bit_id >>> 0;
if (object.unlock_time != null)
message.unlock_time = object.unlock_time >>> 0;
return message;
};
/**
* Creates a plain object from an Achievement_Blocks message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks
* @static
* @param {CMsgAMGetUserGameStatsResponse.Achievement_Blocks} message Achievement_Blocks
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
Achievement_Blocks.toObject = function toObject(message, options) {
if (!options)
options = {};
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"))
object.achievement_id = message.achievement_id;
if (message.achievement_bit_id != null && message.hasOwnProperty("achievement_bit_id"))
object.achievement_bit_id = message.achievement_bit_id;
if (message.unlock_time != null && message.hasOwnProperty("unlock_time"))
object.unlock_time = message.unlock_time;
return object;
};
/**
* Converts this Achievement_Blocks to JSON.
* @function toJSON
* @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks
* @instance
* @returns {Object.<string,*>} JSON object
*/
Achievement_Blocks.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for Achievement_Blocks
* @function getTypeUrl
* @memberof CMsgAMGetUserGameStatsResponse.Achievement_Blocks
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
Achievement_Blocks.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgAMGetUserGameStatsResponse.Achievement_Blocks";
};
return Achievement_Blocks;
})();
return CMsgAMGetUserGameStatsResponse;
})();
$root.CMsgGCGetCommandList = (function() {
/**
* Properties of a CMsgGCGetCommandList.
* @exports ICMsgGCGetCommandList
* @interface ICMsgGCGetCommandList
* @property {number|null} [app_id] CMsgGCGetCommandList app_id
* @property {string|null} [command_prefix] CMsgGCGetCommandList command_prefix
*/
/**
* Constructs a new CMsgGCGetCommandList.
* @exports CMsgGCGetCommandList
* @classdesc Represents a CMsgGCGetCommandList.
* @implements ICMsgGCGetCommandList
* @constructor
* @param {ICMsgGCGetCommandList=} [properties] Properties to set
*/
function CMsgGCGetCommandList(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgGCGetCommandList app_id.
* @member {number} app_id
* @memberof CMsgGCGetCommandList
* @instance
*/
CMsgGCGetCommandList.prototype.app_id = 0;
/**
* CMsgGCGetCommandList command_prefix.
* @member {string} command_prefix
* @memberof CMsgGCGetCommandList
* @instance
*/
CMsgGCGetCommandList.prototype.command_prefix = "";
/**
* Creates a new CMsgGCGetCommandList instance using the specified properties.
* @function create
* @memberof CMsgGCGetCommandList
* @static
* @param {ICMsgGCGetCommandList=} [properties] Properties to set
* @returns {CMsgGCGetCommandList} CMsgGCGetCommandList instance
*/
CMsgGCGetCommandList.create = function create(properties) {
return new CMsgGCGetCommandList(properties);
};
/**
* Encodes the specified CMsgGCGetCommandList message. Does not implicitly {@link CMsgGCGetCommandList.verify|verify} messages.
* @function encode
* @memberof CMsgGCGetCommandList
* @static
* @param {ICMsgGCGetCommandList} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 2 =*/18).string(message.command_prefix);
return writer;
};
/**
* Encodes the specified CMsgGCGetCommandList message, length delimited. Does not implicitly {@link CMsgGCGetCommandList.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCGetCommandList
* @static
* @param {ICMsgGCGetCommandList} 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();
};
/**
* Decodes a CMsgGCGetCommandList message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCGetCommandList
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgGCGetCommandList} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgGCGetCommandList message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCGetCommandList
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCGetCommandList} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgGCGetCommandList message.
* @function verify
* @memberof CMsgGCGetCommandList
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgGCGetCommandList.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.app_id != null && message.hasOwnProperty("app_id"))
if (!$util.isInteger(message.app_id))
return "app_id: integer expected";
if (message.command_prefix != null && message.hasOwnProperty("command_prefix"))
if (!$util.isString(message.command_prefix))
return "command_prefix: string expected";
return null;
};
/**
* Creates a CMsgGCGetCommandList message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCGetCommandList
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCGetCommandList} CMsgGCGetCommandList
*/
CMsgGCGetCommandList.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCGetCommandList)
return object;
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);
return message;
};
/**
* Creates a plain object from a CMsgGCGetCommandList message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCGetCommandList
* @static
* @param {CMsgGCGetCommandList} message CMsgGCGetCommandList
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgGCGetCommandList.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.app_id = 0;
object.command_prefix = "";
}
if (message.app_id != null && message.hasOwnProperty("app_id"))
object.app_id = message.app_id;
if (message.command_prefix != null && message.hasOwnProperty("command_prefix"))
object.command_prefix = message.command_prefix;
return object;
};
/**
* Converts this CMsgGCGetCommandList to JSON.
* @function toJSON
* @memberof CMsgGCGetCommandList
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgGCGetCommandList.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgGCGetCommandList
* @function getTypeUrl
* @memberof CMsgGCGetCommandList
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgGCGetCommandList.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCGetCommandList";
};
return CMsgGCGetCommandList;
})();
$root.CMsgGCGetCommandListResponse = (function() {
/**
* Properties of a CMsgGCGetCommandListResponse.
* @exports ICMsgGCGetCommandListResponse
* @interface ICMsgGCGetCommandListResponse
* @property {Array.<string>|null} [command_name] CMsgGCGetCommandListResponse command_name
*/
/**
* Constructs a new CMsgGCGetCommandListResponse.
* @exports CMsgGCGetCommandListResponse
* @classdesc Represents a CMsgGCGetCommandListResponse.
* @implements ICMsgGCGetCommandListResponse
* @constructor
* @param {ICMsgGCGetCommandListResponse=} [properties] Properties to set
*/
function CMsgGCGetCommandListResponse(properties) {
this.command_name = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgGCGetCommandListResponse command_name.
* @member {Array.<string>} command_name
* @memberof CMsgGCGetCommandListResponse
* @instance
*/
CMsgGCGetCommandListResponse.prototype.command_name = $util.emptyArray;
/**
* Creates a new CMsgGCGetCommandListResponse instance using the specified properties.
* @function create
* @memberof CMsgGCGetCommandListResponse
* @static
* @param {ICMsgGCGetCommandListResponse=} [properties] Properties to set
* @returns {CMsgGCGetCommandListResponse} CMsgGCGetCommandListResponse instance
*/
CMsgGCGetCommandListResponse.create = function create(properties) {
return new CMsgGCGetCommandListResponse(properties);
};
/**
* Encodes the specified CMsgGCGetCommandListResponse message. Does not implicitly {@link CMsgGCGetCommandListResponse.verify|verify} messages.
* @function encode
* @memberof CMsgGCGetCommandListResponse
* @static
* @param {ICMsgGCGetCommandListResponse} 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) {
if (!writer)
writer = $Writer.create();
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]);
return writer;
};
/**
* Encodes the specified CMsgGCGetCommandListResponse message, length delimited. Does not implicitly {@link CMsgGCGetCommandListResponse.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCGetCommandListResponse
* @static
* @param {ICMsgGCGetCommandListResponse} 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();
};
/**
* Decodes a CMsgGCGetCommandListResponse message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCGetCommandListResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgGCGetCommandListResponse} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgGCGetCommandListResponse message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCGetCommandListResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCGetCommandListResponse} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgGCGetCommandListResponse message.
* @function verify
* @memberof CMsgGCGetCommandListResponse
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgGCGetCommandListResponse.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.command_name != null && message.hasOwnProperty("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]))
return "command_name: string[] expected";
}
return null;
};
/**
* Creates a CMsgGCGetCommandListResponse message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCGetCommandListResponse
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCGetCommandListResponse} CMsgGCGetCommandListResponse
*/
CMsgGCGetCommandListResponse.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCGetCommandListResponse)
return object;
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 = [];
for (var i = 0; i < object.command_name.length; ++i)
message.command_name[i] = String(object.command_name[i]);
}
return message;
};
/**
* Creates a plain object from a CMsgGCGetCommandListResponse message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCGetCommandListResponse
* @static
* @param {CMsgGCGetCommandListResponse} message CMsgGCGetCommandListResponse
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgGCGetCommandListResponse.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.command_name = [];
if (message.command_name && message.command_name.length) {
object.command_name = [];
for (var j = 0; j < message.command_name.length; ++j)
object.command_name[j] = message.command_name[j];
}
return object;
};
/**
* Converts this CMsgGCGetCommandListResponse to JSON.
* @function toJSON
* @memberof CMsgGCGetCommandListResponse
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgGCGetCommandListResponse.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgGCGetCommandListResponse
* @function getTypeUrl
* @memberof CMsgGCGetCommandListResponse
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgGCGetCommandListResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCGetCommandListResponse";
};
return CMsgGCGetCommandListResponse;
})();
$root.CGCMsgMemCachedGet = (function() {
/**
* Properties of a CGCMsgMemCachedGet.
* @exports ICGCMsgMemCachedGet
* @interface ICGCMsgMemCachedGet
* @property {Array.<string>|null} [keys] CGCMsgMemCachedGet keys
*/
/**
* Constructs a new CGCMsgMemCachedGet.
* @exports CGCMsgMemCachedGet
* @classdesc Represents a CGCMsgMemCachedGet.
* @implements ICGCMsgMemCachedGet
* @constructor
* @param {ICGCMsgMemCachedGet=} [properties] Properties to set
*/
function CGCMsgMemCachedGet(properties) {
this.keys = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CGCMsgMemCachedGet keys.
* @member {Array.<string>} keys
* @memberof CGCMsgMemCachedGet
* @instance
*/
CGCMsgMemCachedGet.prototype.keys = $util.emptyArray;
/**
* Creates a new CGCMsgMemCachedGet instance using the specified properties.
* @function create
* @memberof CGCMsgMemCachedGet
* @static
* @param {ICGCMsgMemCachedGet=} [properties] Properties to set
* @returns {CGCMsgMemCachedGet} CGCMsgMemCachedGet instance
*/
CGCMsgMemCachedGet.create = function create(properties) {
return new CGCMsgMemCachedGet(properties);
};
/**
* Encodes the specified CGCMsgMemCachedGet message. Does not implicitly {@link CGCMsgMemCachedGet.verify|verify} messages.
* @function encode
* @memberof CGCMsgMemCachedGet
* @static
* @param {ICGCMsgMemCachedGet} 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) {
if (!writer)
writer = $Writer.create();
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]);
return writer;
};
/**
* Encodes the specified CGCMsgMemCachedGet message, length delimited. Does not implicitly {@link CGCMsgMemCachedGet.verify|verify} messages.
* @function encodeDelimited
* @memberof CGCMsgMemCachedGet
* @static
* @param {ICGCMsgMemCachedGet} 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();
};
/**
* Decodes a CGCMsgMemCachedGet message from the specified reader or buffer.
* @function decode
* @memberof CGCMsgMemCachedGet
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CGCMsgMemCachedGet} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CGCMsgMemCachedGet message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CGCMsgMemCachedGet
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CGCMsgMemCachedGet} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CGCMsgMemCachedGet message.
* @function verify
* @memberof CGCMsgMemCachedGet
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CGCMsgMemCachedGet.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.keys != null && message.hasOwnProperty("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]))
return "keys: string[] expected";
}
return null;
};
/**
* Creates a CGCMsgMemCachedGet message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CGCMsgMemCachedGet
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CGCMsgMemCachedGet} CGCMsgMemCachedGet
*/
CGCMsgMemCachedGet.fromObject = function fromObject(object) {
if (object instanceof $root.CGCMsgMemCachedGet)
return object;
var message = new $root.CGCMsgMemCachedGet();
if (object.keys) {
if (!Array.isArray(object.keys))
throw TypeError(".CGCMsgMemCachedGet.keys: array expected");
message.keys = [];
for (var i = 0; i < object.keys.length; ++i)
message.keys[i] = String(object.keys[i]);
}
return message;
};
/**
* Creates a plain object from a CGCMsgMemCachedGet message. Also converts values to other types if specified.
* @function toObject
* @memberof CGCMsgMemCachedGet
* @static
* @param {CGCMsgMemCachedGet} message CGCMsgMemCachedGet
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CGCMsgMemCachedGet.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.keys = [];
if (message.keys && message.keys.length) {
object.keys = [];
for (var j = 0; j < message.keys.length; ++j)
object.keys[j] = message.keys[j];
}
return object;
};
/**
* Converts this CGCMsgMemCachedGet to JSON.
* @function toJSON
* @memberof CGCMsgMemCachedGet
* @instance
* @returns {Object.<string,*>} JSON object
*/
CGCMsgMemCachedGet.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CGCMsgMemCachedGet
* @function getTypeUrl
* @memberof CGCMsgMemCachedGet
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CGCMsgMemCachedGet.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CGCMsgMemCachedGet";
};
return CGCMsgMemCachedGet;
})();
$root.CGCMsgMemCachedGetResponse = (function() {
/**
* Properties of a CGCMsgMemCachedGetResponse.
* @exports ICGCMsgMemCachedGetResponse
* @interface ICGCMsgMemCachedGetResponse
* @property {Array.<CGCMsgMemCachedGetResponse.IValueTag>|null} [values] CGCMsgMemCachedGetResponse values
*/
/**
* Constructs a new CGCMsgMemCachedGetResponse.
* @exports CGCMsgMemCachedGetResponse
* @classdesc Represents a CGCMsgMemCachedGetResponse.
* @implements ICGCMsgMemCachedGetResponse
* @constructor
* @param {ICGCMsgMemCachedGetResponse=} [properties] Properties to set
*/
function CGCMsgMemCachedGetResponse(properties) {
this.values = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CGCMsgMemCachedGetResponse values.
* @member {Array.<CGCMsgMemCachedGetResponse.IValueTag>} values
* @memberof CGCMsgMemCachedGetResponse
* @instance
*/
CGCMsgMemCachedGetResponse.prototype.values = $util.emptyArray;
/**
* Creates a new CGCMsgMemCachedGetResponse instance using the specified properties.
* @function create
* @memberof CGCMsgMemCachedGetResponse
* @static
* @param {ICGCMsgMemCachedGetResponse=} [properties] Properties to set
* @returns {CGCMsgMemCachedGetResponse} CGCMsgMemCachedGetResponse instance
*/
CGCMsgMemCachedGetResponse.create = function create(properties) {
return new CGCMsgMemCachedGetResponse(properties);
};
/**
* Encodes the specified CGCMsgMemCachedGetResponse message. Does not implicitly {@link CGCMsgMemCachedGetResponse.verify|verify} messages.
* @function encode
* @memberof CGCMsgMemCachedGetResponse
* @static
* @param {ICGCMsgMemCachedGetResponse} 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) {
if (!writer)
writer = $Writer.create();
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();
return writer;
};
/**
* Encodes the specified CGCMsgMemCachedGetResponse message, length delimited. Does not implicitly {@link CGCMsgMemCachedGetResponse.verify|verify} messages.
* @function encodeDelimited
* @memberof CGCMsgMemCachedGetResponse
* @static
* @param {ICGCMsgMemCachedGetResponse} 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();
};
/**
* Decodes a CGCMsgMemCachedGetResponse message from the specified reader or buffer.
* @function decode
* @memberof CGCMsgMemCachedGetResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CGCMsgMemCachedGetResponse} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CGCMsgMemCachedGetResponse message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CGCMsgMemCachedGetResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CGCMsgMemCachedGetResponse} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CGCMsgMemCachedGetResponse message.
* @function verify
* @memberof CGCMsgMemCachedGetResponse
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CGCMsgMemCachedGetResponse.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.values != null && message.hasOwnProperty("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]);
if (error)
return "values." + error;
}
}
return null;
};
/**
* Creates a CGCMsgMemCachedGetResponse message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CGCMsgMemCachedGetResponse
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CGCMsgMemCachedGetResponse} CGCMsgMemCachedGetResponse
*/
CGCMsgMemCachedGetResponse.fromObject = function fromObject(object) {
if (object instanceof $root.CGCMsgMemCachedGetResponse)
return object;
var message = new $root.CGCMsgMemCachedGetResponse();
if (object.values) {
if (!Array.isArray(object.values))
throw TypeError(".CGCMsgMemCachedGetResponse.values: array expected");
message.values = [];
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]);
}
}
return message;
};
/**
* Creates a plain object from a CGCMsgMemCachedGetResponse message. Also converts values to other types if specified.
* @function toObject
* @memberof CGCMsgMemCachedGetResponse
* @static
* @param {CGCMsgMemCachedGetResponse} message CGCMsgMemCachedGetResponse
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CGCMsgMemCachedGetResponse.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.values = [];
if (message.values && message.values.length) {
object.values = [];
for (var j = 0; j < message.values.length; ++j)
object.values[j] = $root.CGCMsgMemCachedGetResponse.ValueTag.toObject(message.values[j], options);
}
return object;
};
/**
* Converts this CGCMsgMemCachedGetResponse to JSON.
* @function toJSON
* @memberof CGCMsgMemCachedGetResponse
* @instance
* @returns {Object.<string,*>} JSON object
*/
CGCMsgMemCachedGetResponse.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CGCMsgMemCachedGetResponse
* @function getTypeUrl
* @memberof CGCMsgMemCachedGetResponse
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CGCMsgMemCachedGetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CGCMsgMemCachedGetResponse";
};
CGCMsgMemCachedGetResponse.ValueTag = (function() {
/**
* Properties of a ValueTag.
* @memberof CGCMsgMemCachedGetResponse
* @interface IValueTag
* @property {boolean|null} [found] ValueTag found
* @property {Uint8Array|null} [value] ValueTag value
*/
/**
* Constructs a new ValueTag.
* @memberof CGCMsgMemCachedGetResponse
* @classdesc Represents a ValueTag.
* @implements IValueTag
* @constructor
* @param {CGCMsgMemCachedGetResponse.IValueTag=} [properties] Properties to set
*/
function ValueTag(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* ValueTag found.
* @member {boolean} found
* @memberof CGCMsgMemCachedGetResponse.ValueTag
* @instance
*/
ValueTag.prototype.found = false;
/**
* ValueTag value.
* @member {Uint8Array} value
* @memberof CGCMsgMemCachedGetResponse.ValueTag
* @instance
*/
ValueTag.prototype.value = $util.newBuffer([]);
/**
* Creates a new ValueTag instance using the specified properties.
* @function create
* @memberof CGCMsgMemCachedGetResponse.ValueTag
* @static
* @param {CGCMsgMemCachedGetResponse.IValueTag=} [properties] Properties to set
* @returns {CGCMsgMemCachedGetResponse.ValueTag} ValueTag instance
*/
ValueTag.create = function create(properties) {
return new ValueTag(properties);
};
/**
* Encodes the specified ValueTag message. Does not implicitly {@link CGCMsgMemCachedGetResponse.ValueTag.verify|verify} messages.
* @function encode
* @memberof CGCMsgMemCachedGetResponse.ValueTag
* @static
* @param {CGCMsgMemCachedGetResponse.IValueTag} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value);
return writer;
};
/**
* Encodes the specified ValueTag message, length delimited. Does not implicitly {@link CGCMsgMemCachedGetResponse.ValueTag.verify|verify} messages.
* @function encodeDelimited
* @memberof CGCMsgMemCachedGetResponse.ValueTag
* @static
* @param {CGCMsgMemCachedGetResponse.IValueTag} 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();
};
/**
* Decodes a ValueTag message from the specified reader or buffer.
* @function decode
* @memberof CGCMsgMemCachedGetResponse.ValueTag
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CGCMsgMemCachedGetResponse.ValueTag} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a ValueTag message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CGCMsgMemCachedGetResponse.ValueTag
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CGCMsgMemCachedGetResponse.ValueTag} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a ValueTag message.
* @function verify
* @memberof CGCMsgMemCachedGetResponse.ValueTag
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
ValueTag.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.found != null && message.hasOwnProperty("found"))
if (typeof message.found !== "boolean")
return "found: boolean expected";
if (message.value != null && message.hasOwnProperty("value"))
if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value)))
return "value: buffer expected";
return null;
};
/**
* Creates a ValueTag message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CGCMsgMemCachedGetResponse.ValueTag
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CGCMsgMemCachedGetResponse.ValueTag} ValueTag
*/
ValueTag.fromObject = function fromObject(object) {
if (object instanceof $root.CGCMsgMemCachedGetResponse.ValueTag)
return object;
var message = new $root.CGCMsgMemCachedGetResponse.ValueTag();
if (object.found != null)
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 >= 0)
message.value = object.value;
return message;
};
/**
* Creates a plain object from a ValueTag message. Also converts values to other types if specified.
* @function toObject
* @memberof CGCMsgMemCachedGetResponse.ValueTag
* @static
* @param {CGCMsgMemCachedGetResponse.ValueTag} message ValueTag
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
ValueTag.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.found = false;
if (options.bytes === String)
object.value = "";
else {
object.value = [];
if (options.bytes !== Array)
object.value = $util.newBuffer(object.value);
}
}
if (message.found != null && message.hasOwnProperty("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;
return object;
};
/**
* Converts this ValueTag to JSON.
* @function toJSON
* @memberof CGCMsgMemCachedGetResponse.ValueTag
* @instance
* @returns {Object.<string,*>} JSON object
*/
ValueTag.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for ValueTag
* @function getTypeUrl
* @memberof CGCMsgMemCachedGetResponse.ValueTag
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
ValueTag.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CGCMsgMemCachedGetResponse.ValueTag";
};
return ValueTag;
})();
return CGCMsgMemCachedGetResponse;
})();
$root.CGCMsgMemCachedSet = (function() {
/**
* Properties of a CGCMsgMemCachedSet.
* @exports ICGCMsgMemCachedSet
* @interface ICGCMsgMemCachedSet
* @property {Array.<CGCMsgMemCachedSet.IKeyPair>|null} [keys] CGCMsgMemCachedSet keys
*/
/**
* Constructs a new CGCMsgMemCachedSet.
* @exports CGCMsgMemCachedSet
* @classdesc Represents a CGCMsgMemCachedSet.
* @implements ICGCMsgMemCachedSet
* @constructor
* @param {ICGCMsgMemCachedSet=} [properties] Properties to set
*/
function CGCMsgMemCachedSet(properties) {
this.keys = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CGCMsgMemCachedSet keys.
* @member {Array.<CGCMsgMemCachedSet.IKeyPair>} keys
* @memberof CGCMsgMemCachedSet
* @instance
*/
CGCMsgMemCachedSet.prototype.keys = $util.emptyArray;
/**
* Creates a new CGCMsgMemCachedSet instance using the specified properties.
* @function create
* @memberof CGCMsgMemCachedSet
* @static
* @param {ICGCMsgMemCachedSet=} [properties] Properties to set
* @returns {CGCMsgMemCachedSet} CGCMsgMemCachedSet instance
*/
CGCMsgMemCachedSet.create = function create(properties) {
return new CGCMsgMemCachedSet(properties);
};
/**
* Encodes the specified CGCMsgMemCachedSet message. Does not implicitly {@link CGCMsgMemCachedSet.verify|verify} messages.
* @function encode
* @memberof CGCMsgMemCachedSet
* @static
* @param {ICGCMsgMemCachedSet} 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) {
if (!writer)
writer = $Writer.create();
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();
return writer;
};
/**
* Encodes the specified CGCMsgMemCachedSet message, length delimited. Does not implicitly {@link CGCMsgMemCachedSet.verify|verify} messages.
* @function encodeDelimited
* @memberof CGCMsgMemCachedSet
* @static
* @param {ICGCMsgMemCachedSet} 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();
};
/**
* Decodes a CGCMsgMemCachedSet message from the specified reader or buffer.
* @function decode
* @memberof CGCMsgMemCachedSet
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CGCMsgMemCachedSet} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CGCMsgMemCachedSet message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CGCMsgMemCachedSet
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CGCMsgMemCachedSet} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CGCMsgMemCachedSet message.
* @function verify
* @memberof CGCMsgMemCachedSet
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CGCMsgMemCachedSet.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.keys != null && message.hasOwnProperty("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]);
if (error)
return "keys." + error;
}
}
return null;
};
/**
* Creates a CGCMsgMemCachedSet message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CGCMsgMemCachedSet
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CGCMsgMemCachedSet} CGCMsgMemCachedSet
*/
CGCMsgMemCachedSet.fromObject = function fromObject(object) {
if (object instanceof $root.CGCMsgMemCachedSet)
return object;
var message = new $root.CGCMsgMemCachedSet();
if (object.keys) {
if (!Array.isArray(object.keys))
throw TypeError(".CGCMsgMemCachedSet.keys: array expected");
message.keys = [];
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]);
}
}
return message;
};
/**
* Creates a plain object from a CGCMsgMemCachedSet message. Also converts values to other types if specified.
* @function toObject
* @memberof CGCMsgMemCachedSet
* @static
* @param {CGCMsgMemCachedSet} message CGCMsgMemCachedSet
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CGCMsgMemCachedSet.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.keys = [];
if (message.keys && message.keys.length) {
object.keys = [];
for (var j = 0; j < message.keys.length; ++j)
object.keys[j] = $root.CGCMsgMemCachedSet.KeyPair.toObject(message.keys[j], options);
}
return object;
};
/**
* Converts this CGCMsgMemCachedSet to JSON.
* @function toJSON
* @memberof CGCMsgMemCachedSet
* @instance
* @returns {Object.<string,*>} JSON object
*/
CGCMsgMemCachedSet.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CGCMsgMemCachedSet
* @function getTypeUrl
* @memberof CGCMsgMemCachedSet
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CGCMsgMemCachedSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CGCMsgMemCachedSet";
};
CGCMsgMemCachedSet.KeyPair = (function() {
/**
* Properties of a KeyPair.
* @memberof CGCMsgMemCachedSet
* @interface IKeyPair
* @property {string|null} [name] KeyPair name
* @property {Uint8Array|null} [value] KeyPair value
*/
/**
* Constructs a new KeyPair.
* @memberof CGCMsgMemCachedSet
* @classdesc Represents a KeyPair.
* @implements IKeyPair
* @constructor
* @param {CGCMsgMemCachedSet.IKeyPair=} [properties] Properties to set
*/
function KeyPair(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* KeyPair name.
* @member {string} name
* @memberof CGCMsgMemCachedSet.KeyPair
* @instance
*/
KeyPair.prototype.name = "";
/**
* KeyPair value.
* @member {Uint8Array} value
* @memberof CGCMsgMemCachedSet.KeyPair
* @instance
*/
KeyPair.prototype.value = $util.newBuffer([]);
/**
* Creates a new KeyPair instance using the specified properties.
* @function create
* @memberof CGCMsgMemCachedSet.KeyPair
* @static
* @param {CGCMsgMemCachedSet.IKeyPair=} [properties] Properties to set
* @returns {CGCMsgMemCachedSet.KeyPair} KeyPair instance
*/
KeyPair.create = function create(properties) {
return new KeyPair(properties);
};
/**
* Encodes the specified KeyPair message. Does not implicitly {@link CGCMsgMemCachedSet.KeyPair.verify|verify} messages.
* @function encode
* @memberof CGCMsgMemCachedSet.KeyPair
* @static
* @param {CGCMsgMemCachedSet.IKeyPair} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value);
return writer;
};
/**
* Encodes the specified KeyPair message, length delimited. Does not implicitly {@link CGCMsgMemCachedSet.KeyPair.verify|verify} messages.
* @function encodeDelimited
* @memberof CGCMsgMemCachedSet.KeyPair
* @static
* @param {CGCMsgMemCachedSet.IKeyPair} 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();
};
/**
* Decodes a KeyPair message from the specified reader or buffer.
* @function decode
* @memberof CGCMsgMemCachedSet.KeyPair
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CGCMsgMemCachedSet.KeyPair} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a KeyPair message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CGCMsgMemCachedSet.KeyPair
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CGCMsgMemCachedSet.KeyPair} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a KeyPair message.
* @function verify
* @memberof CGCMsgMemCachedSet.KeyPair
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
KeyPair.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.name != null && message.hasOwnProperty("name"))
if (!$util.isString(message.name))
return "name: string expected";
if (message.value != null && message.hasOwnProperty("value"))
if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value)))
return "value: buffer expected";
return null;
};
/**
* Creates a KeyPair message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CGCMsgMemCachedSet.KeyPair
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CGCMsgMemCachedSet.KeyPair} KeyPair
*/
KeyPair.fromObject = function fromObject(object) {
if (object instanceof $root.CGCMsgMemCachedSet.KeyPair)
return object;
var message = new $root.CGCMsgMemCachedSet.KeyPair();
if (object.name != null)
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 >= 0)
message.value = object.value;
return message;
};
/**
* Creates a plain object from a KeyPair message. Also converts values to other types if specified.
* @function toObject
* @memberof CGCMsgMemCachedSet.KeyPair
* @static
* @param {CGCMsgMemCachedSet.KeyPair} message KeyPair
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
KeyPair.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.name = "";
if (options.bytes === String)
object.value = "";
else {
object.value = [];
if (options.bytes !== Array)
object.value = $util.newBuffer(object.value);
}
}
if (message.name != null && message.hasOwnProperty("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;
return object;
};
/**
* Converts this KeyPair to JSON.
* @function toJSON
* @memberof CGCMsgMemCachedSet.KeyPair
* @instance
* @returns {Object.<string,*>} JSON object
*/
KeyPair.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for KeyPair
* @function getTypeUrl
* @memberof CGCMsgMemCachedSet.KeyPair
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
KeyPair.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CGCMsgMemCachedSet.KeyPair";
};
return KeyPair;
})();
return CGCMsgMemCachedSet;
})();
$root.CGCMsgMemCachedDelete = (function() {
/**
* Properties of a CGCMsgMemCachedDelete.
* @exports ICGCMsgMemCachedDelete
* @interface ICGCMsgMemCachedDelete
* @property {Array.<string>|null} [keys] CGCMsgMemCachedDelete keys
*/
/**
* Constructs a new CGCMsgMemCachedDelete.
* @exports CGCMsgMemCachedDelete
* @classdesc Represents a CGCMsgMemCachedDelete.
* @implements ICGCMsgMemCachedDelete
* @constructor
* @param {ICGCMsgMemCachedDelete=} [properties] Properties to set
*/
function CGCMsgMemCachedDelete(properties) {
this.keys = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CGCMsgMemCachedDelete keys.
* @member {Array.<string>} keys
* @memberof CGCMsgMemCachedDelete
* @instance
*/
CGCMsgMemCachedDelete.prototype.keys = $util.emptyArray;
/**
* Creates a new CGCMsgMemCachedDelete instance using the specified properties.
* @function create
* @memberof CGCMsgMemCachedDelete
* @static
* @param {ICGCMsgMemCachedDelete=} [properties] Properties to set
* @returns {CGCMsgMemCachedDelete} CGCMsgMemCachedDelete instance
*/
CGCMsgMemCachedDelete.create = function create(properties) {
return new CGCMsgMemCachedDelete(properties);
};
/**
* Encodes the specified CGCMsgMemCachedDelete message. Does not implicitly {@link CGCMsgMemCachedDelete.verify|verify} messages.
* @function encode
* @memberof CGCMsgMemCachedDelete
* @static
* @param {ICGCMsgMemCachedDelete} 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) {
if (!writer)
writer = $Writer.create();
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]);
return writer;
};
/**
* Encodes the specified CGCMsgMemCachedDelete message, length delimited. Does not implicitly {@link CGCMsgMemCachedDelete.verify|verify} messages.
* @function encodeDelimited
* @memberof CGCMsgMemCachedDelete
* @static
* @param {ICGCMsgMemCachedDelete} 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();
};
/**
* Decodes a CGCMsgMemCachedDelete message from the specified reader or buffer.
* @function decode
* @memberof CGCMsgMemCachedDelete
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CGCMsgMemCachedDelete} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CGCMsgMemCachedDelete message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CGCMsgMemCachedDelete
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CGCMsgMemCachedDelete} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CGCMsgMemCachedDelete message.
* @function verify
* @memberof CGCMsgMemCachedDelete
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CGCMsgMemCachedDelete.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.keys != null && message.hasOwnProperty("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]))
return "keys: string[] expected";
}
return null;
};
/**
* Creates a CGCMsgMemCachedDelete message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CGCMsgMemCachedDelete
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CGCMsgMemCachedDelete} CGCMsgMemCachedDelete
*/
CGCMsgMemCachedDelete.fromObject = function fromObject(object) {
if (object instanceof $root.CGCMsgMemCachedDelete)
return object;
var message = new $root.CGCMsgMemCachedDelete();
if (object.keys) {
if (!Array.isArray(object.keys))
throw TypeError(".CGCMsgMemCachedDelete.keys: array expected");
message.keys = [];
for (var i = 0; i < object.keys.length; ++i)
message.keys[i] = String(object.keys[i]);
}
return message;
};
/**
* Creates a plain object from a CGCMsgMemCachedDelete message. Also converts values to other types if specified.
* @function toObject
* @memberof CGCMsgMemCachedDelete
* @static
* @param {CGCMsgMemCachedDelete} message CGCMsgMemCachedDelete
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CGCMsgMemCachedDelete.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.keys = [];
if (message.keys && message.keys.length) {
object.keys = [];
for (var j = 0; j < message.keys.length; ++j)
object.keys[j] = message.keys[j];
}
return object;
};
/**
* Converts this CGCMsgMemCachedDelete to JSON.
* @function toJSON
* @memberof CGCMsgMemCachedDelete
* @instance
* @returns {Object.<string,*>} JSON object
*/
CGCMsgMemCachedDelete.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CGCMsgMemCachedDelete
* @function getTypeUrl
* @memberof CGCMsgMemCachedDelete
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CGCMsgMemCachedDelete.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CGCMsgMemCachedDelete";
};
return CGCMsgMemCachedDelete;
})();
$root.CGCMsgMemCachedStats = (function() {
/**
* Properties of a CGCMsgMemCachedStats.
* @exports ICGCMsgMemCachedStats
* @interface ICGCMsgMemCachedStats
*/
/**
* Constructs a new CGCMsgMemCachedStats.
* @exports CGCMsgMemCachedStats
* @classdesc Represents a CGCMsgMemCachedStats.
* @implements ICGCMsgMemCachedStats
* @constructor
* @param {ICGCMsgMemCachedStats=} [properties] Properties to set
*/
function CGCMsgMemCachedStats(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
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
* @returns {CGCMsgMemCachedStats} CGCMsgMemCachedStats instance
*/
CGCMsgMemCachedStats.create = function create(properties) {
return new CGCMsgMemCachedStats(properties);
};
/**
* Encodes the specified CGCMsgMemCachedStats message. Does not implicitly {@link CGCMsgMemCachedStats.verify|verify} messages.
* @function encode
* @memberof CGCMsgMemCachedStats
* @static
* @param {ICGCMsgMemCachedStats} 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) {
if (!writer)
writer = $Writer.create();
return writer;
};
/**
* Encodes the specified CGCMsgMemCachedStats message, length delimited. Does not implicitly {@link CGCMsgMemCachedStats.verify|verify} messages.
* @function encodeDelimited
* @memberof CGCMsgMemCachedStats
* @static
* @param {ICGCMsgMemCachedStats} 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();
};
/**
* Decodes a CGCMsgMemCachedStats message from the specified reader or buffer.
* @function decode
* @memberof CGCMsgMemCachedStats
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CGCMsgMemCachedStats} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgMemCachedStats();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a CGCMsgMemCachedStats message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CGCMsgMemCachedStats
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CGCMsgMemCachedStats} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CGCMsgMemCachedStats message.
* @function verify
* @memberof CGCMsgMemCachedStats
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CGCMsgMemCachedStats.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
return null;
};
/**
* Creates a CGCMsgMemCachedStats message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CGCMsgMemCachedStats
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CGCMsgMemCachedStats} CGCMsgMemCachedStats
*/
CGCMsgMemCachedStats.fromObject = function fromObject(object) {
if (object instanceof $root.CGCMsgMemCachedStats)
return object;
return new $root.CGCMsgMemCachedStats();
};
/**
* Creates a plain object from a CGCMsgMemCachedStats message. Also converts values to other types if specified.
* @function toObject
* @memberof CGCMsgMemCachedStats
* @static
* @param {CGCMsgMemCachedStats} message CGCMsgMemCachedStats
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CGCMsgMemCachedStats.toObject = function toObject() {
return {};
};
/**
* Converts this CGCMsgMemCachedStats to JSON.
* @function toJSON
* @memberof CGCMsgMemCachedStats
* @instance
* @returns {Object.<string,*>} JSON object
*/
CGCMsgMemCachedStats.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CGCMsgMemCachedStats
* @function getTypeUrl
* @memberof CGCMsgMemCachedStats
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CGCMsgMemCachedStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CGCMsgMemCachedStats";
};
return CGCMsgMemCachedStats;
})();
$root.CGCMsgMemCachedStatsResponse = (function() {
/**
* Properties of a CGCMsgMemCachedStatsResponse.
* @exports ICGCMsgMemCachedStatsResponse
* @interface ICGCMsgMemCachedStatsResponse
* @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
* @property {number|Long|null} [cmd_flush] CGCMsgMemCachedStatsResponse cmd_flush
* @property {number|Long|null} [get_hits] CGCMsgMemCachedStatsResponse get_hits
* @property {number|Long|null} [get_misses] CGCMsgMemCachedStatsResponse get_misses
* @property {number|Long|null} [delete_hits] CGCMsgMemCachedStatsResponse delete_hits
* @property {number|Long|null} [delete_misses] CGCMsgMemCachedStatsResponse delete_misses
* @property {number|Long|null} [bytes_read] CGCMsgMemCachedStatsResponse bytes_read
* @property {number|Long|null} [bytes_written] CGCMsgMemCachedStatsResponse bytes_written
* @property {number|Long|null} [limit_maxbytes] CGCMsgMemCachedStatsResponse limit_maxbytes
* @property {number|Long|null} [curr_items] CGCMsgMemCachedStatsResponse curr_items
* @property {number|Long|null} [evictions] CGCMsgMemCachedStatsResponse evictions
* @property {number|Long|null} [bytes] CGCMsgMemCachedStatsResponse bytes
*/
/**
* Constructs a new CGCMsgMemCachedStatsResponse.
* @exports CGCMsgMemCachedStatsResponse
* @classdesc Represents a CGCMsgMemCachedStatsResponse.
* @implements ICGCMsgMemCachedStatsResponse
* @constructor
* @param {ICGCMsgMemCachedStatsResponse=} [properties] Properties to set
*/
function CGCMsgMemCachedStatsResponse(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CGCMsgMemCachedStatsResponse curr_connections.
* @member {number|Long} curr_connections
* @memberof CGCMsgMemCachedStatsResponse
* @instance
*/
CGCMsgMemCachedStatsResponse.prototype.curr_connections = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
/**
* CGCMsgMemCachedStatsResponse cmd_get.
* @member {number|Long} cmd_get
* @memberof CGCMsgMemCachedStatsResponse
* @instance
*/
CGCMsgMemCachedStatsResponse.prototype.cmd_get = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
/**
* CGCMsgMemCachedStatsResponse cmd_set.
* @member {number|Long} cmd_set
* @memberof CGCMsgMemCachedStatsResponse
* @instance
*/
CGCMsgMemCachedStatsResponse.prototype.cmd_set = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
/**
* CGCMsgMemCachedStatsResponse cmd_flush.
* @member {number|Long} cmd_flush
* @memberof CGCMsgMemCachedStatsResponse
* @instance
*/
CGCMsgMemCachedStatsResponse.prototype.cmd_flush = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
/**
* CGCMsgMemCachedStatsResponse get_hits.
* @member {number|Long} get_hits
* @memberof CGCMsgMemCachedStatsResponse
* @instance
*/
CGCMsgMemCachedStatsResponse.prototype.get_hits = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
/**
* CGCMsgMemCachedStatsResponse get_misses.
* @member {number|Long} get_misses
* @memberof CGCMsgMemCachedStatsResponse
* @instance
*/
CGCMsgMemCachedStatsResponse.prototype.get_misses = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
/**
* CGCMsgMemCachedStatsResponse delete_hits.
* @member {number|Long} delete_hits
* @memberof CGCMsgMemCachedStatsResponse
* @instance
*/
CGCMsgMemCachedStatsResponse.prototype.delete_hits = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
/**
* CGCMsgMemCachedStatsResponse delete_misses.
* @member {number|Long} delete_misses
* @memberof CGCMsgMemCachedStatsResponse
* @instance
*/
CGCMsgMemCachedStatsResponse.prototype.delete_misses = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
/**
* CGCMsgMemCachedStatsResponse bytes_read.
* @member {number|Long} bytes_read
* @memberof CGCMsgMemCachedStatsResponse
* @instance
*/
CGCMsgMemCachedStatsResponse.prototype.bytes_read = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
/**
* CGCMsgMemCachedStatsResponse bytes_written.
* @member {number|Long} bytes_written
* @memberof CGCMsgMemCachedStatsResponse
* @instance
*/
CGCMsgMemCachedStatsResponse.prototype.bytes_written = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
/**
* CGCMsgMemCachedStatsResponse limit_maxbytes.
* @member {number|Long} limit_maxbytes
* @memberof CGCMsgMemCachedStatsResponse
* @instance
*/
CGCMsgMemCachedStatsResponse.prototype.limit_maxbytes = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
/**
* CGCMsgMemCachedStatsResponse curr_items.
* @member {number|Long} curr_items
* @memberof CGCMsgMemCachedStatsResponse
* @instance
*/
CGCMsgMemCachedStatsResponse.prototype.curr_items = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
/**
* CGCMsgMemCachedStatsResponse evictions.
* @member {number|Long} evictions
* @memberof CGCMsgMemCachedStatsResponse
* @instance
*/
CGCMsgMemCachedStatsResponse.prototype.evictions = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
/**
* CGCMsgMemCachedStatsResponse bytes.
* @member {number|Long} bytes
* @memberof CGCMsgMemCachedStatsResponse
* @instance
*/
CGCMsgMemCachedStatsResponse.prototype.bytes = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
/**
* Creates a new CGCMsgMemCachedStatsResponse instance using the specified properties.
* @function create
* @memberof CGCMsgMemCachedStatsResponse
* @static
* @param {ICGCMsgMemCachedStatsResponse=} [properties] Properties to set
* @returns {CGCMsgMemCachedStatsResponse} CGCMsgMemCachedStatsResponse instance
*/
CGCMsgMemCachedStatsResponse.create = function create(properties) {
return new CGCMsgMemCachedStatsResponse(properties);
};
/**
* Encodes the specified CGCMsgMemCachedStatsResponse message. Does not implicitly {@link CGCMsgMemCachedStatsResponse.verify|verify} messages.
* @function encode
* @memberof CGCMsgMemCachedStatsResponse
* @static
* @param {ICGCMsgMemCachedStatsResponse} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.cmd_get);
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"))
writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.cmd_flush);
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"))
writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.get_misses);
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"))
writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.delete_misses);
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"))
writer.uint32(/* id 10, wireType 0 =*/80).uint64(message.bytes_written);
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"))
writer.uint32(/* id 12, wireType 0 =*/96).uint64(message.curr_items);
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"))
writer.uint32(/* id 14, wireType 0 =*/112).uint64(message.bytes);
return writer;
};
/**
* Encodes the specified CGCMsgMemCachedStatsResponse message, length delimited. Does not implicitly {@link CGCMsgMemCachedStatsResponse.verify|verify} messages.
* @function encodeDelimited
* @memberof CGCMsgMemCachedStatsResponse
* @static
* @param {ICGCMsgMemCachedStatsResponse} 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();
};
/**
* Decodes a CGCMsgMemCachedStatsResponse message from the specified reader or buffer.
* @function decode
* @memberof CGCMsgMemCachedStatsResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CGCMsgMemCachedStatsResponse} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CGCMsgMemCachedStatsResponse message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CGCMsgMemCachedStatsResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CGCMsgMemCachedStatsResponse} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CGCMsgMemCachedStatsResponse message.
* @function verify
* @memberof CGCMsgMemCachedStatsResponse
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CGCMsgMemCachedStatsResponse.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.curr_connections != null && message.hasOwnProperty("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 (!$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 (!$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 (!$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 (!$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 (!$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 (!$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 (!$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 (!$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 (!$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 (!$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 (!$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 (!$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 (!$util.isInteger(message.bytes) && !(message.bytes && $util.isInteger(message.bytes.low) && $util.isInteger(message.bytes.high)))
return "bytes: integer|Long expected";
return null;
};
/**
* Creates a CGCMsgMemCachedStatsResponse message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CGCMsgMemCachedStatsResponse
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CGCMsgMemCachedStatsResponse} CGCMsgMemCachedStatsResponse
*/
CGCMsgMemCachedStatsResponse.fromObject = function fromObject(object) {
if (object instanceof $root.CGCMsgMemCachedStatsResponse)
return object;
var message = new $root.CGCMsgMemCachedStatsResponse();
if (object.curr_connections != null)
if ($util.Long)
(message.curr_connections = $util.Long.fromValue(object.curr_connections)).unsigned = true;
else if (typeof object.curr_connections === "string")
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;
else if (typeof object.cmd_get === "string")
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;
else if (typeof object.cmd_set === "string")
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;
else if (typeof object.cmd_flush === "string")
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;
else if (typeof object.get_hits === "string")
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;
else if (typeof object.get_misses === "string")
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;
else if (typeof object.delete_hits === "string")
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;
else if (typeof object.delete_misses === "string")
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;
else if (typeof object.bytes_read === "string")
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;
else if (typeof object.bytes_written === "string")
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;
else if (typeof object.limit_maxbytes === "string")
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;
else if (typeof object.curr_items === "string")
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;
else if (typeof object.evictions === "string")
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;
else if (typeof object.bytes === "string")
message.bytes = parseInt(object.bytes, 10);
else if (typeof object.bytes === "number")
message.bytes = object.bytes;
else if (typeof object.bytes === "object")
message.bytes = new $util.LongBits(object.bytes.low >>> 0, object.bytes.high >>> 0).toNumber(true);
return message;
};
/**
* Creates a plain object from a CGCMsgMemCachedStatsResponse message. Also converts values to other types if specified.
* @function toObject
* @memberof CGCMsgMemCachedStatsResponse
* @static
* @param {CGCMsgMemCachedStatsResponse} message CGCMsgMemCachedStatsResponse
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CGCMsgMemCachedStatsResponse.toObject = function toObject(message, options) {
if (!options)
options = {};
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;
} else
object.curr_connections = options.longs === String ? "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;
} else
object.cmd_get = options.longs === String ? "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;
} else
object.cmd_set = options.longs === String ? "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;
} else
object.cmd_flush = options.longs === String ? "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;
} else
object.get_hits = options.longs === String ? "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;
} else
object.get_misses = options.longs === String ? "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;
} else
object.delete_hits = options.longs === String ? "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;
} else
object.delete_misses = options.longs === String ? "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;
} else
object.bytes_read = options.longs === String ? "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;
} else
object.bytes_written = options.longs === String ? "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;
} else
object.limit_maxbytes = options.longs === String ? "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;
} else
object.curr_items = options.longs === String ? "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;
} else
object.evictions = options.longs === String ? "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;
} else
object.bytes = options.longs === String ? "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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
return object;
};
/**
* Converts this CGCMsgMemCachedStatsResponse to JSON.
* @function toJSON
* @memberof CGCMsgMemCachedStatsResponse
* @instance
* @returns {Object.<string,*>} JSON object
*/
CGCMsgMemCachedStatsResponse.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CGCMsgMemCachedStatsResponse
* @function getTypeUrl
* @memberof CGCMsgMemCachedStatsResponse
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CGCMsgMemCachedStatsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CGCMsgMemCachedStatsResponse";
};
return CGCMsgMemCachedStatsResponse;
})();
$root.CGCMsgSQLStats = (function() {
/**
* Properties of a CGCMsgSQLStats.
* @exports ICGCMsgSQLStats
* @interface ICGCMsgSQLStats
* @property {number|null} [schema_catalog] CGCMsgSQLStats schema_catalog
*/
/**
* Constructs a new CGCMsgSQLStats.
* @exports CGCMsgSQLStats
* @classdesc Represents a CGCMsgSQLStats.
* @implements ICGCMsgSQLStats
* @constructor
* @param {ICGCMsgSQLStats=} [properties] Properties to set
*/
function CGCMsgSQLStats(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CGCMsgSQLStats schema_catalog.
* @member {number} schema_catalog
* @memberof CGCMsgSQLStats
* @instance
*/
CGCMsgSQLStats.prototype.schema_catalog = 0;
/**
* Creates a new CGCMsgSQLStats instance using the specified properties.
* @function create
* @memberof CGCMsgSQLStats
* @static
* @param {ICGCMsgSQLStats=} [properties] Properties to set
* @returns {CGCMsgSQLStats} CGCMsgSQLStats instance
*/
CGCMsgSQLStats.create = function create(properties) {
return new CGCMsgSQLStats(properties);
};
/**
* Encodes the specified CGCMsgSQLStats message. Does not implicitly {@link CGCMsgSQLStats.verify|verify} messages.
* @function encode
* @memberof CGCMsgSQLStats
* @static
* @param {ICGCMsgSQLStats} 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) {
if (!writer)
writer = $Writer.create();
if (message.schema_catalog != null && Object.hasOwnProperty.call(message, "schema_catalog"))
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.schema_catalog);
return writer;
};
/**
* Encodes the specified CGCMsgSQLStats message, length delimited. Does not implicitly {@link CGCMsgSQLStats.verify|verify} messages.
* @function encodeDelimited
* @memberof CGCMsgSQLStats
* @static
* @param {ICGCMsgSQLStats} 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();
};
/**
* Decodes a CGCMsgSQLStats message from the specified reader or buffer.
* @function decode
* @memberof CGCMsgSQLStats
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CGCMsgSQLStats} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CGCMsgSQLStats message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CGCMsgSQLStats
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CGCMsgSQLStats} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CGCMsgSQLStats message.
* @function verify
* @memberof CGCMsgSQLStats
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CGCMsgSQLStats.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.schema_catalog != null && message.hasOwnProperty("schema_catalog"))
if (!$util.isInteger(message.schema_catalog))
return "schema_catalog: integer expected";
return null;
};
/**
* Creates a CGCMsgSQLStats message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CGCMsgSQLStats
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CGCMsgSQLStats} CGCMsgSQLStats
*/
CGCMsgSQLStats.fromObject = function fromObject(object) {
if (object instanceof $root.CGCMsgSQLStats)
return object;
var message = new $root.CGCMsgSQLStats();
if (object.schema_catalog != null)
message.schema_catalog = object.schema_catalog >>> 0;
return message;
};
/**
* Creates a plain object from a CGCMsgSQLStats message. Also converts values to other types if specified.
* @function toObject
* @memberof CGCMsgSQLStats
* @static
* @param {CGCMsgSQLStats} message CGCMsgSQLStats
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CGCMsgSQLStats.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults)
object.schema_catalog = 0;
if (message.schema_catalog != null && message.hasOwnProperty("schema_catalog"))
object.schema_catalog = message.schema_catalog;
return object;
};
/**
* Converts this CGCMsgSQLStats to JSON.
* @function toJSON
* @memberof CGCMsgSQLStats
* @instance
* @returns {Object.<string,*>} JSON object
*/
CGCMsgSQLStats.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CGCMsgSQLStats
* @function getTypeUrl
* @memberof CGCMsgSQLStats
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CGCMsgSQLStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CGCMsgSQLStats";
};
return CGCMsgSQLStats;
})();
$root.CGCMsgSQLStatsResponse = (function() {
/**
* Properties of a CGCMsgSQLStatsResponse.
* @exports ICGCMsgSQLStatsResponse
* @interface ICGCMsgSQLStatsResponse
* @property {number|null} [threads] CGCMsgSQLStatsResponse threads
* @property {number|null} [threads_connected] CGCMsgSQLStatsResponse threads_connected
* @property {number|null} [threads_active] CGCMsgSQLStatsResponse threads_active
* @property {number|null} [operations_submitted] CGCMsgSQLStatsResponse operations_submitted
* @property {number|null} [prepared_statements_executed] CGCMsgSQLStatsResponse prepared_statements_executed
* @property {number|null} [non_prepared_statements_executed] CGCMsgSQLStatsResponse non_prepared_statements_executed
* @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
*/
/**
* Constructs a new CGCMsgSQLStatsResponse.
* @exports CGCMsgSQLStatsResponse
* @classdesc Represents a CGCMsgSQLStatsResponse.
* @implements ICGCMsgSQLStatsResponse
* @constructor
* @param {ICGCMsgSQLStatsResponse=} [properties] Properties to set
*/
function CGCMsgSQLStatsResponse(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CGCMsgSQLStatsResponse threads.
* @member {number} threads
* @memberof CGCMsgSQLStatsResponse
* @instance
*/
CGCMsgSQLStatsResponse.prototype.threads = 0;
/**
* CGCMsgSQLStatsResponse threads_connected.
* @member {number} threads_connected
* @memberof CGCMsgSQLStatsResponse
* @instance
*/
CGCMsgSQLStatsResponse.prototype.threads_connected = 0;
/**
* CGCMsgSQLStatsResponse threads_active.
* @member {number} threads_active
* @memberof CGCMsgSQLStatsResponse
* @instance
*/
CGCMsgSQLStatsResponse.prototype.threads_active = 0;
/**
* CGCMsgSQLStatsResponse operations_submitted.
* @member {number} operations_submitted
* @memberof CGCMsgSQLStatsResponse
* @instance
*/
CGCMsgSQLStatsResponse.prototype.operations_submitted = 0;
/**
* CGCMsgSQLStatsResponse prepared_statements_executed.
* @member {number} prepared_statements_executed
* @memberof CGCMsgSQLStatsResponse
* @instance
*/
CGCMsgSQLStatsResponse.prototype.prepared_statements_executed = 0;
/**
* CGCMsgSQLStatsResponse non_prepared_statements_executed.
* @member {number} non_prepared_statements_executed
* @memberof CGCMsgSQLStatsResponse
* @instance
*/
CGCMsgSQLStatsResponse.prototype.non_prepared_statements_executed = 0;
/**
* CGCMsgSQLStatsResponse deadlock_retries.
* @member {number} deadlock_retries
* @memberof CGCMsgSQLStatsResponse
* @instance
*/
CGCMsgSQLStatsResponse.prototype.deadlock_retries = 0;
/**
* CGCMsgSQLStatsResponse operations_timed_out_in_queue.
* @member {number} operations_timed_out_in_queue
* @memberof CGCMsgSQLStatsResponse
* @instance
*/
CGCMsgSQLStatsResponse.prototype.operations_timed_out_in_queue = 0;
/**
* CGCMsgSQLStatsResponse errors.
* @member {number} errors
* @memberof CGCMsgSQLStatsResponse
* @instance
*/
CGCMsgSQLStatsResponse.prototype.errors = 0;
/**
* Creates a new CGCMsgSQLStatsResponse instance using the specified properties.
* @function create
* @memberof CGCMsgSQLStatsResponse
* @static
* @param {ICGCMsgSQLStatsResponse=} [properties] Properties to set
* @returns {CGCMsgSQLStatsResponse} CGCMsgSQLStatsResponse instance
*/
CGCMsgSQLStatsResponse.create = function create(properties) {
return new CGCMsgSQLStatsResponse(properties);
};
/**
* Encodes the specified CGCMsgSQLStatsResponse message. Does not implicitly {@link CGCMsgSQLStatsResponse.verify|verify} messages.
* @function encode
* @memberof CGCMsgSQLStatsResponse
* @static
* @param {ICGCMsgSQLStatsResponse} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.threads_connected);
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"))
writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.operations_submitted);
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"))
writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.non_prepared_statements_executed);
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"))
writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.operations_timed_out_in_queue);
if (message.errors != null && Object.hasOwnProperty.call(message, "errors"))
writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.errors);
return writer;
};
/**
* Encodes the specified CGCMsgSQLStatsResponse message, length delimited. Does not implicitly {@link CGCMsgSQLStatsResponse.verify|verify} messages.
* @function encodeDelimited
* @memberof CGCMsgSQLStatsResponse
* @static
* @param {ICGCMsgSQLStatsResponse} 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();
};
/**
* Decodes a CGCMsgSQLStatsResponse message from the specified reader or buffer.
* @function decode
* @memberof CGCMsgSQLStatsResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CGCMsgSQLStatsResponse} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CGCMsgSQLStatsResponse message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CGCMsgSQLStatsResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CGCMsgSQLStatsResponse} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CGCMsgSQLStatsResponse message.
* @function verify
* @memberof CGCMsgSQLStatsResponse
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CGCMsgSQLStatsResponse.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.threads != null && message.hasOwnProperty("threads"))
if (!$util.isInteger(message.threads))
return "threads: integer expected";
if (message.threads_connected != null && message.hasOwnProperty("threads_connected"))
if (!$util.isInteger(message.threads_connected))
return "threads_connected: integer expected";
if (message.threads_active != null && message.hasOwnProperty("threads_active"))
if (!$util.isInteger(message.threads_active))
return "threads_active: integer expected";
if (message.operations_submitted != null && message.hasOwnProperty("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 (!$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 (!$util.isInteger(message.non_prepared_statements_executed))
return "non_prepared_statements_executed: integer expected";
if (message.deadlock_retries != null && message.hasOwnProperty("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 (!$util.isInteger(message.operations_timed_out_in_queue))
return "operations_timed_out_in_queue: integer expected";
if (message.errors != null && message.hasOwnProperty("errors"))
if (!$util.isInteger(message.errors))
return "errors: integer expected";
return null;
};
/**
* Creates a CGCMsgSQLStatsResponse message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CGCMsgSQLStatsResponse
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CGCMsgSQLStatsResponse} CGCMsgSQLStatsResponse
*/
CGCMsgSQLStatsResponse.fromObject = function fromObject(object) {
if (object instanceof $root.CGCMsgSQLStatsResponse)
return object;
var message = new $root.CGCMsgSQLStatsResponse();
if (object.threads != null)
message.threads = object.threads >>> 0;
if (object.threads_connected != null)
message.threads_connected = object.threads_connected >>> 0;
if (object.threads_active != null)
message.threads_active = object.threads_active >>> 0;
if (object.operations_submitted != null)
message.operations_submitted = object.operations_submitted >>> 0;
if (object.prepared_statements_executed != null)
message.prepared_statements_executed = object.prepared_statements_executed >>> 0;
if (object.non_prepared_statements_executed != null)
message.non_prepared_statements_executed = object.non_prepared_statements_executed >>> 0;
if (object.deadlock_retries != null)
message.deadlock_retries = object.deadlock_retries >>> 0;
if (object.operations_timed_out_in_queue != null)
message.operations_timed_out_in_queue = object.operations_timed_out_in_queue >>> 0;
if (object.errors != null)
message.errors = object.errors >>> 0;
return message;
};
/**
* Creates a plain object from a CGCMsgSQLStatsResponse message. Also converts values to other types if specified.
* @function toObject
* @memberof CGCMsgSQLStatsResponse
* @static
* @param {CGCMsgSQLStatsResponse} message CGCMsgSQLStatsResponse
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CGCMsgSQLStatsResponse.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.threads = 0;
object.threads_connected = 0;
object.threads_active = 0;
object.operations_submitted = 0;
object.prepared_statements_executed = 0;
object.non_prepared_statements_executed = 0;
object.deadlock_retries = 0;
object.operations_timed_out_in_queue = 0;
object.errors = 0;
}
if (message.threads != null && message.hasOwnProperty("threads"))
object.threads = message.threads;
if (message.threads_connected != null && message.hasOwnProperty("threads_connected"))
object.threads_connected = message.threads_connected;
if (message.threads_active != null && message.hasOwnProperty("threads_active"))
object.threads_active = message.threads_active;
if (message.operations_submitted != null && message.hasOwnProperty("operations_submitted"))
object.operations_submitted = message.operations_submitted;
if (message.prepared_statements_executed != null && message.hasOwnProperty("prepared_statements_executed"))
object.prepared_statements_executed = message.prepared_statements_executed;
if (message.non_prepared_statements_executed != null && message.hasOwnProperty("non_prepared_statements_executed"))
object.non_prepared_statements_executed = message.non_prepared_statements_executed;
if (message.deadlock_retries != null && message.hasOwnProperty("deadlock_retries"))
object.deadlock_retries = message.deadlock_retries;
if (message.operations_timed_out_in_queue != null && message.hasOwnProperty("operations_timed_out_in_queue"))
object.operations_timed_out_in_queue = message.operations_timed_out_in_queue;
if (message.errors != null && message.hasOwnProperty("errors"))
object.errors = message.errors;
return object;
};
/**
* Converts this CGCMsgSQLStatsResponse to JSON.
* @function toJSON
* @memberof CGCMsgSQLStatsResponse
* @instance
* @returns {Object.<string,*>} JSON object
*/
CGCMsgSQLStatsResponse.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CGCMsgSQLStatsResponse
* @function getTypeUrl
* @memberof CGCMsgSQLStatsResponse
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CGCMsgSQLStatsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CGCMsgSQLStatsResponse";
};
return CGCMsgSQLStatsResponse;
})();
$root.CMsgAMAddFreeLicense = (function() {
/**
* Properties of a CMsgAMAddFreeLicense.
* @exports ICMsgAMAddFreeLicense
* @interface ICMsgAMAddFreeLicense
* @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
*/
/**
* Constructs a new CMsgAMAddFreeLicense.
* @exports CMsgAMAddFreeLicense
* @classdesc Represents a CMsgAMAddFreeLicense.
* @implements ICMsgAMAddFreeLicense
* @constructor
* @param {ICMsgAMAddFreeLicense=} [properties] Properties to set
*/
function CMsgAMAddFreeLicense(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgAMAddFreeLicense steamid.
* @member {number|Long} steamid
* @memberof CMsgAMAddFreeLicense
* @instance
*/
CMsgAMAddFreeLicense.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* CMsgAMAddFreeLicense ip_public.
* @member {number} ip_public
* @memberof CMsgAMAddFreeLicense
* @instance
*/
CMsgAMAddFreeLicense.prototype.ip_public = 0;
/**
* CMsgAMAddFreeLicense packageid.
* @member {number} packageid
* @memberof CMsgAMAddFreeLicense
* @instance
*/
CMsgAMAddFreeLicense.prototype.packageid = 0;
/**
* CMsgAMAddFreeLicense store_country_code.
* @member {string} store_country_code
* @memberof CMsgAMAddFreeLicense
* @instance
*/
CMsgAMAddFreeLicense.prototype.store_country_code = "";
/**
* Creates a new CMsgAMAddFreeLicense instance using the specified properties.
* @function create
* @memberof CMsgAMAddFreeLicense
* @static
* @param {ICMsgAMAddFreeLicense=} [properties] Properties to set
* @returns {CMsgAMAddFreeLicense} CMsgAMAddFreeLicense instance
*/
CMsgAMAddFreeLicense.create = function create(properties) {
return new CMsgAMAddFreeLicense(properties);
};
/**
* Encodes the specified CMsgAMAddFreeLicense message. Does not implicitly {@link CMsgAMAddFreeLicense.verify|verify} messages.
* @function encode
* @memberof CMsgAMAddFreeLicense
* @static
* @param {ICMsgAMAddFreeLicense} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.ip_public);
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"))
writer.uint32(/* id 4, wireType 2 =*/34).string(message.store_country_code);
return writer;
};
/**
* Encodes the specified CMsgAMAddFreeLicense message, length delimited. Does not implicitly {@link CMsgAMAddFreeLicense.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgAMAddFreeLicense
* @static
* @param {ICMsgAMAddFreeLicense} 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();
};
/**
* Decodes a CMsgAMAddFreeLicense message from the specified reader or buffer.
* @function decode
* @memberof CMsgAMAddFreeLicense
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgAMAddFreeLicense} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgAMAddFreeLicense message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgAMAddFreeLicense
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgAMAddFreeLicense} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgAMAddFreeLicense message.
* @function verify
* @memberof CMsgAMAddFreeLicense
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgAMAddFreeLicense.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.steamid != null && message.hasOwnProperty("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 (!$util.isInteger(message.ip_public))
return "ip_public: integer expected";
if (message.packageid != null && message.hasOwnProperty("packageid"))
if (!$util.isInteger(message.packageid))
return "packageid: integer expected";
if (message.store_country_code != null && message.hasOwnProperty("store_country_code"))
if (!$util.isString(message.store_country_code))
return "store_country_code: string expected";
return null;
};
/**
* Creates a CMsgAMAddFreeLicense message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgAMAddFreeLicense
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgAMAddFreeLicense} CMsgAMAddFreeLicense
*/
CMsgAMAddFreeLicense.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgAMAddFreeLicense)
return object;
var message = new $root.CMsgAMAddFreeLicense();
if (object.steamid != null)
if ($util.Long)
(message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false;
else if (typeof object.steamid === "string")
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();
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);
return message;
};
/**
* Creates a plain object from a CMsgAMAddFreeLicense message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgAMAddFreeLicense
* @static
* @param {CMsgAMAddFreeLicense} message CMsgAMAddFreeLicense
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgAMAddFreeLicense.toObject = function toObject(message, options) {
if (!options)
options = {};
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;
} else
object.steamid = options.longs === String ? "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;
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.ip_public = message.ip_public;
if (message.packageid != null && message.hasOwnProperty("packageid"))
object.packageid = message.packageid;
if (message.store_country_code != null && message.hasOwnProperty("store_country_code"))
object.store_country_code = message.store_country_code;
return object;
};
/**
* Converts this CMsgAMAddFreeLicense to JSON.
* @function toJSON
* @memberof CMsgAMAddFreeLicense
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgAMAddFreeLicense.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgAMAddFreeLicense
* @function getTypeUrl
* @memberof CMsgAMAddFreeLicense
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgAMAddFreeLicense.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgAMAddFreeLicense";
};
return CMsgAMAddFreeLicense;
})();
$root.CMsgAMAddFreeLicenseResponse = (function() {
/**
* Properties of a CMsgAMAddFreeLicenseResponse.
* @exports ICMsgAMAddFreeLicenseResponse
* @interface ICMsgAMAddFreeLicenseResponse
* @property {number|null} [eresult] CMsgAMAddFreeLicenseResponse eresult
* @property {number|null} [purchase_result_detail] CMsgAMAddFreeLicenseResponse purchase_result_detail
* @property {number|Long|null} [transid] CMsgAMAddFreeLicenseResponse transid
*/
/**
* Constructs a new CMsgAMAddFreeLicenseResponse.
* @exports CMsgAMAddFreeLicenseResponse
* @classdesc Represents a CMsgAMAddFreeLicenseResponse.
* @implements ICMsgAMAddFreeLicenseResponse
* @constructor
* @param {ICMsgAMAddFreeLicenseResponse=} [properties] Properties to set
*/
function CMsgAMAddFreeLicenseResponse(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgAMAddFreeLicenseResponse eresult.
* @member {number} eresult
* @memberof CMsgAMAddFreeLicenseResponse
* @instance
*/
CMsgAMAddFreeLicenseResponse.prototype.eresult = 2;
/**
* CMsgAMAddFreeLicenseResponse purchase_result_detail.
* @member {number} purchase_result_detail
* @memberof CMsgAMAddFreeLicenseResponse
* @instance
*/
CMsgAMAddFreeLicenseResponse.prototype.purchase_result_detail = 0;
/**
* CMsgAMAddFreeLicenseResponse transid.
* @member {number|Long} transid
* @memberof CMsgAMAddFreeLicenseResponse
* @instance
*/
CMsgAMAddFreeLicenseResponse.prototype.transid = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* Creates a new CMsgAMAddFreeLicenseResponse instance using the specified properties.
* @function create
* @memberof CMsgAMAddFreeLicenseResponse
* @static
* @param {ICMsgAMAddFreeLicenseResponse=} [properties] Properties to set
* @returns {CMsgAMAddFreeLicenseResponse} CMsgAMAddFreeLicenseResponse instance
*/
CMsgAMAddFreeLicenseResponse.create = function create(properties) {
return new CMsgAMAddFreeLicenseResponse(properties);
};
/**
* Encodes the specified CMsgAMAddFreeLicenseResponse message. Does not implicitly {@link CMsgAMAddFreeLicenseResponse.verify|verify} messages.
* @function encode
* @memberof CMsgAMAddFreeLicenseResponse
* @static
* @param {ICMsgAMAddFreeLicenseResponse} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.purchase_result_detail);
if (message.transid != null && Object.hasOwnProperty.call(message, "transid"))
writer.uint32(/* id 3, wireType 1 =*/25).fixed64(message.transid);
return writer;
};
/**
* Encodes the specified CMsgAMAddFreeLicenseResponse message, length delimited. Does not implicitly {@link CMsgAMAddFreeLicenseResponse.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgAMAddFreeLicenseResponse
* @static
* @param {ICMsgAMAddFreeLicenseResponse} 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();
};
/**
* Decodes a CMsgAMAddFreeLicenseResponse message from the specified reader or buffer.
* @function decode
* @memberof CMsgAMAddFreeLicenseResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgAMAddFreeLicenseResponse} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgAMAddFreeLicenseResponse message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgAMAddFreeLicenseResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgAMAddFreeLicenseResponse} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgAMAddFreeLicenseResponse message.
* @function verify
* @memberof CMsgAMAddFreeLicenseResponse
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgAMAddFreeLicenseResponse.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.eresult != null && message.hasOwnProperty("eresult"))
if (!$util.isInteger(message.eresult))
return "eresult: integer expected";
if (message.purchase_result_detail != null && message.hasOwnProperty("purchase_result_detail"))
if (!$util.isInteger(message.purchase_result_detail))
return "purchase_result_detail: integer expected";
if (message.transid != null && message.hasOwnProperty("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;
};
/**
* Creates a CMsgAMAddFreeLicenseResponse message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgAMAddFreeLicenseResponse
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgAMAddFreeLicenseResponse} CMsgAMAddFreeLicenseResponse
*/
CMsgAMAddFreeLicenseResponse.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgAMAddFreeLicenseResponse)
return object;
var message = new $root.CMsgAMAddFreeLicenseResponse();
if (object.eresult != null)
message.eresult = object.eresult | 0;
if (object.purchase_result_detail != null)
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;
else if (typeof object.transid === "string")
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();
return message;
};
/**
* Creates a plain object from a CMsgAMAddFreeLicenseResponse message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgAMAddFreeLicenseResponse
* @static
* @param {CMsgAMAddFreeLicenseResponse} message CMsgAMAddFreeLicenseResponse
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgAMAddFreeLicenseResponse.toObject = function toObject(message, options) {
if (!options)
options = {};
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;
} else
object.transid = options.longs === String ? "0" : 0;
}
if (message.eresult != null && message.hasOwnProperty("eresult"))
object.eresult = message.eresult;
if (message.purchase_result_detail != null && message.hasOwnProperty("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;
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;
return object;
};
/**
* Converts this CMsgAMAddFreeLicenseResponse to JSON.
* @function toJSON
* @memberof CMsgAMAddFreeLicenseResponse
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgAMAddFreeLicenseResponse.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgAMAddFreeLicenseResponse
* @function getTypeUrl
* @memberof CMsgAMAddFreeLicenseResponse
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgAMAddFreeLicenseResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgAMAddFreeLicenseResponse";
};
return CMsgAMAddFreeLicenseResponse;
})();
$root.CGCMsgGetIPLocation = (function() {
/**
* Properties of a CGCMsgGetIPLocation.
* @exports ICGCMsgGetIPLocation
* @interface ICGCMsgGetIPLocation
* @property {Array.<number>|null} [ips] CGCMsgGetIPLocation ips
*/
/**
* Constructs a new CGCMsgGetIPLocation.
* @exports CGCMsgGetIPLocation
* @classdesc Represents a CGCMsgGetIPLocation.
* @implements ICGCMsgGetIPLocation
* @constructor
* @param {ICGCMsgGetIPLocation=} [properties] Properties to set
*/
function CGCMsgGetIPLocation(properties) {
this.ips = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CGCMsgGetIPLocation ips.
* @member {Array.<number>} ips
* @memberof CGCMsgGetIPLocation
* @instance
*/
CGCMsgGetIPLocation.prototype.ips = $util.emptyArray;
/**
* Creates a new CGCMsgGetIPLocation instance using the specified properties.
* @function create
* @memberof CGCMsgGetIPLocation
* @static
* @param {ICGCMsgGetIPLocation=} [properties] Properties to set
* @returns {CGCMsgGetIPLocation} CGCMsgGetIPLocation instance
*/
CGCMsgGetIPLocation.create = function create(properties) {
return new CGCMsgGetIPLocation(properties);
};
/**
* Encodes the specified CGCMsgGetIPLocation message. Does not implicitly {@link CGCMsgGetIPLocation.verify|verify} messages.
* @function encode
* @memberof CGCMsgGetIPLocation
* @static
* @param {ICGCMsgGetIPLocation} 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) {
if (!writer)
writer = $Writer.create();
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]);
return writer;
};
/**
* Encodes the specified CGCMsgGetIPLocation message, length delimited. Does not implicitly {@link CGCMsgGetIPLocation.verify|verify} messages.
* @function encodeDelimited
* @memberof CGCMsgGetIPLocation
* @static
* @param {ICGCMsgGetIPLocation} 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();
};
/**
* Decodes a CGCMsgGetIPLocation message from the specified reader or buffer.
* @function decode
* @memberof CGCMsgGetIPLocation
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CGCMsgGetIPLocation} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CGCMsgGetIPLocation message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CGCMsgGetIPLocation
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CGCMsgGetIPLocation} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CGCMsgGetIPLocation message.
* @function verify
* @memberof CGCMsgGetIPLocation
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CGCMsgGetIPLocation.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.ips != null && message.hasOwnProperty("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]))
return "ips: integer[] expected";
}
return null;
};
/**
* Creates a CGCMsgGetIPLocation message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CGCMsgGetIPLocation
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CGCMsgGetIPLocation} CGCMsgGetIPLocation
*/
CGCMsgGetIPLocation.fromObject = function fromObject(object) {
if (object instanceof $root.CGCMsgGetIPLocation)
return object;
var message = new $root.CGCMsgGetIPLocation();
if (object.ips) {
if (!Array.isArray(object.ips))
throw TypeError(".CGCMsgGetIPLocation.ips: array expected");
message.ips = [];
for (var i = 0; i < object.ips.length; ++i)
message.ips[i] = object.ips[i] >>> 0;
}
return message;
};
/**
* Creates a plain object from a CGCMsgGetIPLocation message. Also converts values to other types if specified.
* @function toObject
* @memberof CGCMsgGetIPLocation
* @static
* @param {CGCMsgGetIPLocation} message CGCMsgGetIPLocation
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CGCMsgGetIPLocation.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.ips = [];
if (message.ips && message.ips.length) {
object.ips = [];
for (var j = 0; j < message.ips.length; ++j)
object.ips[j] = message.ips[j];
}
return object;
};
/**
* Converts this CGCMsgGetIPLocation to JSON.
* @function toJSON
* @memberof CGCMsgGetIPLocation
* @instance
* @returns {Object.<string,*>} JSON object
*/
CGCMsgGetIPLocation.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CGCMsgGetIPLocation
* @function getTypeUrl
* @memberof CGCMsgGetIPLocation
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CGCMsgGetIPLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CGCMsgGetIPLocation";
};
return CGCMsgGetIPLocation;
})();
$root.CIPLocationInfo = (function() {
/**
* Properties of a CIPLocationInfo.
* @exports ICIPLocationInfo
* @interface ICIPLocationInfo
* @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
*/
/**
* Constructs a new CIPLocationInfo.
* @exports CIPLocationInfo
* @classdesc Represents a CIPLocationInfo.
* @implements ICIPLocationInfo
* @constructor
* @param {ICIPLocationInfo=} [properties] Properties to set
*/
function CIPLocationInfo(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CIPLocationInfo ip.
* @member {number} ip
* @memberof CIPLocationInfo
* @instance
*/
CIPLocationInfo.prototype.ip = 0;
/**
* CIPLocationInfo latitude.
* @member {number} latitude
* @memberof CIPLocationInfo
* @instance
*/
CIPLocationInfo.prototype.latitude = 0;
/**
* CIPLocationInfo longitude.
* @member {number} longitude
* @memberof CIPLocationInfo
* @instance
*/
CIPLocationInfo.prototype.longitude = 0;
/**
* CIPLocationInfo country.
* @member {string} country
* @memberof CIPLocationInfo
* @instance
*/
CIPLocationInfo.prototype.country = "";
/**
* CIPLocationInfo state.
* @member {string} state
* @memberof CIPLocationInfo
* @instance
*/
CIPLocationInfo.prototype.state = "";
/**
* CIPLocationInfo city.
* @member {string} city
* @memberof CIPLocationInfo
* @instance
*/
CIPLocationInfo.prototype.city = "";
/**
* Creates a new CIPLocationInfo instance using the specified properties.
* @function create
* @memberof CIPLocationInfo
* @static
* @param {ICIPLocationInfo=} [properties] Properties to set
* @returns {CIPLocationInfo} CIPLocationInfo instance
*/
CIPLocationInfo.create = function create(properties) {
return new CIPLocationInfo(properties);
};
/**
* Encodes the specified CIPLocationInfo message. Does not implicitly {@link CIPLocationInfo.verify|verify} messages.
* @function encode
* @memberof CIPLocationInfo
* @static
* @param {ICIPLocationInfo} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 5 =*/21).float(message.latitude);
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"))
writer.uint32(/* id 4, wireType 2 =*/34).string(message.country);
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"))
writer.uint32(/* id 6, wireType 2 =*/50).string(message.city);
return writer;
};
/**
* Encodes the specified CIPLocationInfo message, length delimited. Does not implicitly {@link CIPLocationInfo.verify|verify} messages.
* @function encodeDelimited
* @memberof CIPLocationInfo
* @static
* @param {ICIPLocationInfo} 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();
};
/**
* Decodes a CIPLocationInfo message from the specified reader or buffer.
* @function decode
* @memberof CIPLocationInfo
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CIPLocationInfo} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CIPLocationInfo message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CIPLocationInfo
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CIPLocationInfo} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CIPLocationInfo message.
* @function verify
* @memberof CIPLocationInfo
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CIPLocationInfo.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.ip != null && message.hasOwnProperty("ip"))
if (!$util.isInteger(message.ip))
return "ip: integer expected";
if (message.latitude != null && message.hasOwnProperty("latitude"))
if (typeof message.latitude !== "number")
return "latitude: number expected";
if (message.longitude != null && message.hasOwnProperty("longitude"))
if (typeof message.longitude !== "number")
return "longitude: number expected";
if (message.country != null && message.hasOwnProperty("country"))
if (!$util.isString(message.country))
return "country: string expected";
if (message.state != null && message.hasOwnProperty("state"))
if (!$util.isString(message.state))
return "state: string expected";
if (message.city != null && message.hasOwnProperty("city"))
if (!$util.isString(message.city))
return "city: string expected";
return null;
};
/**
* Creates a CIPLocationInfo message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CIPLocationInfo
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CIPLocationInfo} CIPLocationInfo
*/
CIPLocationInfo.fromObject = function fromObject(object) {
if (object instanceof $root.CIPLocationInfo)
return object;
var message = new $root.CIPLocationInfo();
if (object.ip != null)
message.ip = object.ip >>> 0;
if (object.latitude != null)
message.latitude = Number(object.latitude);
if (object.longitude != null)
message.longitude = Number(object.longitude);
if (object.country != null)
message.country = String(object.country);
if (object.state != null)
message.state = String(object.state);
if (object.city != null)
message.city = String(object.city);
return message;
};
/**
* Creates a plain object from a CIPLocationInfo message. Also converts values to other types if specified.
* @function toObject
* @memberof CIPLocationInfo
* @static
* @param {CIPLocationInfo} message CIPLocationInfo
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CIPLocationInfo.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.ip = 0;
object.latitude = 0;
object.longitude = 0;
object.country = "";
object.state = "";
object.city = "";
}
if (message.ip != null && message.hasOwnProperty("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"))
object.country = message.country;
if (message.state != null && message.hasOwnProperty("state"))
object.state = message.state;
if (message.city != null && message.hasOwnProperty("city"))
object.city = message.city;
return object;
};
/**
* Converts this CIPLocationInfo to JSON.
* @function toJSON
* @memberof CIPLocationInfo
* @instance
* @returns {Object.<string,*>} JSON object
*/
CIPLocationInfo.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CIPLocationInfo
* @function getTypeUrl
* @memberof CIPLocationInfo
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CIPLocationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CIPLocationInfo";
};
return CIPLocationInfo;
})();
$root.CGCMsgGetIPLocationResponse = (function() {
/**
* Properties of a CGCMsgGetIPLocationResponse.
* @exports ICGCMsgGetIPLocationResponse
* @interface ICGCMsgGetIPLocationResponse
* @property {Array.<ICIPLocationInfo>|null} [infos] CGCMsgGetIPLocationResponse infos
*/
/**
* Constructs a new CGCMsgGetIPLocationResponse.
* @exports CGCMsgGetIPLocationResponse
* @classdesc Represents a CGCMsgGetIPLocationResponse.
* @implements ICGCMsgGetIPLocationResponse
* @constructor
* @param {ICGCMsgGetIPLocationResponse=} [properties] Properties to set
*/
function CGCMsgGetIPLocationResponse(properties) {
this.infos = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CGCMsgGetIPLocationResponse infos.
* @member {Array.<ICIPLocationInfo>} infos
* @memberof CGCMsgGetIPLocationResponse
* @instance
*/
CGCMsgGetIPLocationResponse.prototype.infos = $util.emptyArray;
/**
* Creates a new CGCMsgGetIPLocationResponse instance using the specified properties.
* @function create
* @memberof CGCMsgGetIPLocationResponse
* @static
* @param {ICGCMsgGetIPLocationResponse=} [properties] Properties to set
* @returns {CGCMsgGetIPLocationResponse} CGCMsgGetIPLocationResponse instance
*/
CGCMsgGetIPLocationResponse.create = function create(properties) {
return new CGCMsgGetIPLocationResponse(properties);
};
/**
* Encodes the specified CGCMsgGetIPLocationResponse message. Does not implicitly {@link CGCMsgGetIPLocationResponse.verify|verify} messages.
* @function encode
* @memberof CGCMsgGetIPLocationResponse
* @static
* @param {ICGCMsgGetIPLocationResponse} 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) {
if (!writer)
writer = $Writer.create();
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();
return writer;
};
/**
* Encodes the specified CGCMsgGetIPLocationResponse message, length delimited. Does not implicitly {@link CGCMsgGetIPLocationResponse.verify|verify} messages.
* @function encodeDelimited
* @memberof CGCMsgGetIPLocationResponse
* @static
* @param {ICGCMsgGetIPLocationResponse} 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();
};
/**
* Decodes a CGCMsgGetIPLocationResponse message from the specified reader or buffer.
* @function decode
* @memberof CGCMsgGetIPLocationResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CGCMsgGetIPLocationResponse} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CGCMsgGetIPLocationResponse message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CGCMsgGetIPLocationResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CGCMsgGetIPLocationResponse} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CGCMsgGetIPLocationResponse message.
* @function verify
* @memberof CGCMsgGetIPLocationResponse
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CGCMsgGetIPLocationResponse.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.infos != null && message.hasOwnProperty("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]);
if (error)
return "infos." + error;
}
}
return null;
};
/**
* Creates a CGCMsgGetIPLocationResponse message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CGCMsgGetIPLocationResponse
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CGCMsgGetIPLocationResponse} CGCMsgGetIPLocationResponse
*/
CGCMsgGetIPLocationResponse.fromObject = function fromObject(object) {
if (object instanceof $root.CGCMsgGetIPLocationResponse)
return object;
var message = new $root.CGCMsgGetIPLocationResponse();
if (object.infos) {
if (!Array.isArray(object.infos))
throw TypeError(".CGCMsgGetIPLocationResponse.infos: array expected");
message.infos = [];
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]);
}
}
return message;
};
/**
* Creates a plain object from a CGCMsgGetIPLocationResponse message. Also converts values to other types if specified.
* @function toObject
* @memberof CGCMsgGetIPLocationResponse
* @static
* @param {CGCMsgGetIPLocationResponse} message CGCMsgGetIPLocationResponse
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CGCMsgGetIPLocationResponse.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.infos = [];
if (message.infos && message.infos.length) {
object.infos = [];
for (var j = 0; j < message.infos.length; ++j)
object.infos[j] = $root.CIPLocationInfo.toObject(message.infos[j], options);
}
return object;
};
/**
* Converts this CGCMsgGetIPLocationResponse to JSON.
* @function toJSON
* @memberof CGCMsgGetIPLocationResponse
* @instance
* @returns {Object.<string,*>} JSON object
*/
CGCMsgGetIPLocationResponse.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CGCMsgGetIPLocationResponse
* @function getTypeUrl
* @memberof CGCMsgGetIPLocationResponse
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CGCMsgGetIPLocationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CGCMsgGetIPLocationResponse";
};
return CGCMsgGetIPLocationResponse;
})();
$root.CGCMsgSystemStatsSchema = (function() {
/**
* Properties of a CGCMsgSystemStatsSchema.
* @exports ICGCMsgSystemStatsSchema
* @interface ICGCMsgSystemStatsSchema
* @property {number|null} [gc_app_id] CGCMsgSystemStatsSchema gc_app_id
* @property {Uint8Array|null} [schema_kv] CGCMsgSystemStatsSchema schema_kv
*/
/**
* Constructs a new CGCMsgSystemStatsSchema.
* @exports CGCMsgSystemStatsSchema
* @classdesc Represents a CGCMsgSystemStatsSchema.
* @implements ICGCMsgSystemStatsSchema
* @constructor
* @param {ICGCMsgSystemStatsSchema=} [properties] Properties to set
*/
function CGCMsgSystemStatsSchema(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CGCMsgSystemStatsSchema gc_app_id.
* @member {number} gc_app_id
* @memberof CGCMsgSystemStatsSchema
* @instance
*/
CGCMsgSystemStatsSchema.prototype.gc_app_id = 0;
/**
* CGCMsgSystemStatsSchema schema_kv.
* @member {Uint8Array} schema_kv
* @memberof CGCMsgSystemStatsSchema
* @instance
*/
CGCMsgSystemStatsSchema.prototype.schema_kv = $util.newBuffer([]);
/**
* Creates a new CGCMsgSystemStatsSchema instance using the specified properties.
* @function create
* @memberof CGCMsgSystemStatsSchema
* @static
* @param {ICGCMsgSystemStatsSchema=} [properties] Properties to set
* @returns {CGCMsgSystemStatsSchema} CGCMsgSystemStatsSchema instance
*/
CGCMsgSystemStatsSchema.create = function create(properties) {
return new CGCMsgSystemStatsSchema(properties);
};
/**
* Encodes the specified CGCMsgSystemStatsSchema message. Does not implicitly {@link CGCMsgSystemStatsSchema.verify|verify} messages.
* @function encode
* @memberof CGCMsgSystemStatsSchema
* @static
* @param {ICGCMsgSystemStatsSchema} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.schema_kv);
return writer;
};
/**
* Encodes the specified CGCMsgSystemStatsSchema message, length delimited. Does not implicitly {@link CGCMsgSystemStatsSchema.verify|verify} messages.
* @function encodeDelimited
* @memberof CGCMsgSystemStatsSchema
* @static
* @param {ICGCMsgSystemStatsSchema} 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();
};
/**
* Decodes a CGCMsgSystemStatsSchema message from the specified reader or buffer.
* @function decode
* @memberof CGCMsgSystemStatsSchema
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CGCMsgSystemStatsSchema} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CGCMsgSystemStatsSchema message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CGCMsgSystemStatsSchema
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CGCMsgSystemStatsSchema} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CGCMsgSystemStatsSchema message.
* @function verify
* @memberof CGCMsgSystemStatsSchema
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CGCMsgSystemStatsSchema.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.gc_app_id != null && message.hasOwnProperty("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 && typeof message.schema_kv.length === "number" || $util.isString(message.schema_kv)))
return "schema_kv: buffer expected";
return null;
};
/**
* Creates a CGCMsgSystemStatsSchema message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CGCMsgSystemStatsSchema
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CGCMsgSystemStatsSchema} CGCMsgSystemStatsSchema
*/
CGCMsgSystemStatsSchema.fromObject = function fromObject(object) {
if (object instanceof $root.CGCMsgSystemStatsSchema)
return object;
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 >= 0)
message.schema_kv = object.schema_kv;
return message;
};
/**
* Creates a plain object from a CGCMsgSystemStatsSchema message. Also converts values to other types if specified.
* @function toObject
* @memberof CGCMsgSystemStatsSchema
* @static
* @param {CGCMsgSystemStatsSchema} message CGCMsgSystemStatsSchema
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CGCMsgSystemStatsSchema.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.gc_app_id = 0;
if (options.bytes === String)
object.schema_kv = "";
else {
object.schema_kv = [];
if (options.bytes !== Array)
object.schema_kv = $util.newBuffer(object.schema_kv);
}
}
if (message.gc_app_id != null && message.hasOwnProperty("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;
return object;
};
/**
* Converts this CGCMsgSystemStatsSchema to JSON.
* @function toJSON
* @memberof CGCMsgSystemStatsSchema
* @instance
* @returns {Object.<string,*>} JSON object
*/
CGCMsgSystemStatsSchema.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CGCMsgSystemStatsSchema
* @function getTypeUrl
* @memberof CGCMsgSystemStatsSchema
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CGCMsgSystemStatsSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CGCMsgSystemStatsSchema";
};
return CGCMsgSystemStatsSchema;
})();
$root.CGCMsgGetSystemStats = (function() {
/**
* Properties of a CGCMsgGetSystemStats.
* @exports ICGCMsgGetSystemStats
* @interface ICGCMsgGetSystemStats
*/
/**
* Constructs a new CGCMsgGetSystemStats.
* @exports CGCMsgGetSystemStats
* @classdesc Represents a CGCMsgGetSystemStats.
* @implements ICGCMsgGetSystemStats
* @constructor
* @param {ICGCMsgGetSystemStats=} [properties] Properties to set
*/
function CGCMsgGetSystemStats(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
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
* @returns {CGCMsgGetSystemStats} CGCMsgGetSystemStats instance
*/
CGCMsgGetSystemStats.create = function create(properties) {
return new CGCMsgGetSystemStats(properties);
};
/**
* Encodes the specified CGCMsgGetSystemStats message. Does not implicitly {@link CGCMsgGetSystemStats.verify|verify} messages.
* @function encode
* @memberof CGCMsgGetSystemStats
* @static
* @param {ICGCMsgGetSystemStats} 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) {
if (!writer)
writer = $Writer.create();
return writer;
};
/**
* Encodes the specified CGCMsgGetSystemStats message, length delimited. Does not implicitly {@link CGCMsgGetSystemStats.verify|verify} messages.
* @function encodeDelimited
* @memberof CGCMsgGetSystemStats
* @static
* @param {ICGCMsgGetSystemStats} 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();
};
/**
* Decodes a CGCMsgGetSystemStats message from the specified reader or buffer.
* @function decode
* @memberof CGCMsgGetSystemStats
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CGCMsgGetSystemStats} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CGCMsgGetSystemStats();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a CGCMsgGetSystemStats message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CGCMsgGetSystemStats
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CGCMsgGetSystemStats} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CGCMsgGetSystemStats message.
* @function verify
* @memberof CGCMsgGetSystemStats
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CGCMsgGetSystemStats.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
return null;
};
/**
* Creates a CGCMsgGetSystemStats message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CGCMsgGetSystemStats
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CGCMsgGetSystemStats} CGCMsgGetSystemStats
*/
CGCMsgGetSystemStats.fromObject = function fromObject(object) {
if (object instanceof $root.CGCMsgGetSystemStats)
return object;
return new $root.CGCMsgGetSystemStats();
};
/**
* Creates a plain object from a CGCMsgGetSystemStats message. Also converts values to other types if specified.
* @function toObject
* @memberof CGCMsgGetSystemStats
* @static
* @param {CGCMsgGetSystemStats} message CGCMsgGetSystemStats
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CGCMsgGetSystemStats.toObject = function toObject() {
return {};
};
/**
* Converts this CGCMsgGetSystemStats to JSON.
* @function toJSON
* @memberof CGCMsgGetSystemStats
* @instance
* @returns {Object.<string,*>} JSON object
*/
CGCMsgGetSystemStats.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CGCMsgGetSystemStats
* @function getTypeUrl
* @memberof CGCMsgGetSystemStats
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CGCMsgGetSystemStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CGCMsgGetSystemStats";
};
return CGCMsgGetSystemStats;
})();
$root.CGCMsgGetSystemStatsResponse = (function() {
/**
* Properties of a CGCMsgGetSystemStatsResponse.
* @exports ICGCMsgGetSystemStatsResponse
* @interface ICGCMsgGetSystemStatsResponse
* @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
* @property {number|null} [yielding_jobs] CGCMsgGetSystemStatsResponse yielding_jobs
* @property {number|null} [user_sessions] CGCMsgGetSystemStatsResponse user_sessions
* @property {number|null} [game_server_sessions] CGCMsgGetSystemStatsResponse game_server_sessions
* @property {number|null} [socaches] CGCMsgGetSystemStatsResponse socaches
* @property {number|null} [socaches_to_unload] CGCMsgGetSystemStatsResponse socaches_to_unload
* @property {number|null} [socaches_loading] CGCMsgGetSystemStatsResponse socaches_loading
* @property {number|null} [writeback_queue] CGCMsgGetSystemStatsResponse writeback_queue
* @property {number|null} [steamid_locks] CGCMsgGetSystemStatsResponse steamid_locks
* @property {number|null} [logon_queue] CGCMsgGetSystemStatsResponse logon_queue
* @property {number|null} [logon_jobs] CGCMsgGetSystemStatsResponse logon_jobs
*/
/**
* Constructs a new CGCMsgGetSystemStatsResponse.
* @exports CGCMsgGetSystemStatsResponse
* @classdesc Represents a CGCMsgGetSystemStatsResponse.
* @implements ICGCMsgGetSystemStatsResponse
* @constructor
* @param {ICGCMsgGetSystemStatsResponse=} [properties] Properties to set
*/
function CGCMsgGetSystemStatsResponse(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CGCMsgGetSystemStatsResponse gc_app_id.
* @member {number} gc_app_id
* @memberof CGCMsgGetSystemStatsResponse
* @instance
*/
CGCMsgGetSystemStatsResponse.prototype.gc_app_id = 0;
/**
* CGCMsgGetSystemStatsResponse stats_kv.
* @member {Uint8Array} stats_kv
* @memberof CGCMsgGetSystemStatsResponse
* @instance
*/
CGCMsgGetSystemStatsResponse.prototype.stats_kv = $util.newBuffer([]);
/**
* CGCMsgGetSystemStatsResponse active_jobs.
* @member {number} active_jobs
* @memberof CGCMsgGetSystemStatsResponse
* @instance
*/
CGCMsgGetSystemStatsResponse.prototype.active_jobs = 0;
/**
* CGCMsgGetSystemStatsResponse yielding_jobs.
* @member {number} yielding_jobs
* @memberof CGCMsgGetSystemStatsResponse
* @instance
*/
CGCMsgGetSystemStatsResponse.prototype.yielding_jobs = 0;
/**
* CGCMsgGetSystemStatsResponse user_sessions.
* @member {number} user_sessions
* @memberof CGCMsgGetSystemStatsResponse
* @instance
*/
CGCMsgGetSystemStatsResponse.prototype.user_sessions = 0;
/**
* CGCMsgGetSystemStatsResponse game_server_sessions.
* @member {number} game_server_sessions
* @memberof CGCMsgGetSystemStatsResponse
* @instance
*/
CGCMsgGetSystemStatsResponse.prototype.game_server_sessions = 0;
/**
* CGCMsgGetSystemStatsResponse socaches.
* @member {number} socaches
* @memberof CGCMsgGetSystemStatsResponse
* @instance
*/
CGCMsgGetSystemStatsResponse.prototype.socaches = 0;
/**
* CGCMsgGetSystemStatsResponse socaches_to_unload.
* @member {number} socaches_to_unload
* @memberof CGCMsgGetSystemStatsResponse
* @instance
*/
CGCMsgGetSystemStatsResponse.prototype.socaches_to_unload = 0;
/**
* CGCMsgGetSystemStatsResponse socaches_loading.
* @member {number} socaches_loading
* @memberof CGCMsgGetSystemStatsResponse
* @instance
*/
CGCMsgGetSystemStatsResponse.prototype.socaches_loading = 0;
/**
* CGCMsgGetSystemStatsResponse writeback_queue.
* @member {number} writeback_queue
* @memberof CGCMsgGetSystemStatsResponse
* @instance
*/
CGCMsgGetSystemStatsResponse.prototype.writeback_queue = 0;
/**
* CGCMsgGetSystemStatsResponse steamid_locks.
* @member {number} steamid_locks
* @memberof CGCMsgGetSystemStatsResponse
* @instance
*/
CGCMsgGetSystemStatsResponse.prototype.steamid_locks = 0;
/**
* CGCMsgGetSystemStatsResponse logon_queue.
* @member {number} logon_queue
* @memberof CGCMsgGetSystemStatsResponse
* @instance
*/
CGCMsgGetSystemStatsResponse.prototype.logon_queue = 0;
/**
* CGCMsgGetSystemStatsResponse logon_jobs.
* @member {number} logon_jobs
* @memberof CGCMsgGetSystemStatsResponse
* @instance
*/
CGCMsgGetSystemStatsResponse.prototype.logon_jobs = 0;
/**
* Creates a new CGCMsgGetSystemStatsResponse instance using the specified properties.
* @function create
* @memberof CGCMsgGetSystemStatsResponse
* @static
* @param {ICGCMsgGetSystemStatsResponse=} [properties] Properties to set
* @returns {CGCMsgGetSystemStatsResponse} CGCMsgGetSystemStatsResponse instance
*/
CGCMsgGetSystemStatsResponse.create = function create(properties) {
return new CGCMsgGetSystemStatsResponse(properties);
};
/**
* Encodes the specified CGCMsgGetSystemStatsResponse message. Does not implicitly {@link CGCMsgGetSystemStatsResponse.verify|verify} messages.
* @function encode
* @memberof CGCMsgGetSystemStatsResponse
* @static
* @param {ICGCMsgGetSystemStatsResponse} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.stats_kv);
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"))
writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.yielding_jobs);
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"))
writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.game_server_sessions);
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"))
writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.socaches_to_unload);
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"))
writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.writeback_queue);
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"))
writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.logon_queue);
if (message.logon_jobs != null && Object.hasOwnProperty.call(message, "logon_jobs"))
writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.logon_jobs);
return writer;
};
/**
* Encodes the specified CGCMsgGetSystemStatsResponse message, length delimited. Does not implicitly {@link CGCMsgGetSystemStatsResponse.verify|verify} messages.
* @function encodeDelimited
* @memberof CGCMsgGetSystemStatsResponse
* @static
* @param {ICGCMsgGetSystemStatsResponse} 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();
};
/**
* Decodes a CGCMsgGetSystemStatsResponse message from the specified reader or buffer.
* @function decode
* @memberof CGCMsgGetSystemStatsResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CGCMsgGetSystemStatsResponse} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CGCMsgGetSystemStatsResponse message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CGCMsgGetSystemStatsResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CGCMsgGetSystemStatsResponse} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CGCMsgGetSystemStatsResponse message.
* @function verify
* @memberof CGCMsgGetSystemStatsResponse
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CGCMsgGetSystemStatsResponse.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.gc_app_id != null && message.hasOwnProperty("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 && 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 (!$util.isInteger(message.active_jobs))
return "active_jobs: integer expected";
if (message.yielding_jobs != null && message.hasOwnProperty("yielding_jobs"))
if (!$util.isInteger(message.yielding_jobs))
return "yielding_jobs: integer expected";
if (message.user_sessions != null && message.hasOwnProperty("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 (!$util.isInteger(message.game_server_sessions))
return "game_server_sessions: integer expected";
if (message.socaches != null && message.hasOwnProperty("socaches"))
if (!$util.isInteger(message.socaches))
return "socaches: integer expected";
if (message.socaches_to_unload != null && message.hasOwnProperty("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 (!$util.isInteger(message.socaches_loading))
return "socaches_loading: integer expected";
if (message.writeback_queue != null && message.hasOwnProperty("writeback_queue"))
if (!$util.isInteger(message.writeback_queue))
return "writeback_queue: integer expected";
if (message.steamid_locks != null && message.hasOwnProperty("steamid_locks"))
if (!$util.isInteger(message.steamid_locks))
return "steamid_locks: integer expected";
if (message.logon_queue != null && message.hasOwnProperty("logon_queue"))
if (!$util.isInteger(message.logon_queue))
return "logon_queue: integer expected";
if (message.logon_jobs != null && message.hasOwnProperty("logon_jobs"))
if (!$util.isInteger(message.logon_jobs))
return "logon_jobs: integer expected";
return null;
};
/**
* Creates a CGCMsgGetSystemStatsResponse message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CGCMsgGetSystemStatsResponse
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CGCMsgGetSystemStatsResponse} CGCMsgGetSystemStatsResponse
*/
CGCMsgGetSystemStatsResponse.fromObject = function fromObject(object) {
if (object instanceof $root.CGCMsgGetSystemStatsResponse)
return object;
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 >= 0)
message.stats_kv = object.stats_kv;
if (object.active_jobs != null)
message.active_jobs = object.active_jobs >>> 0;
if (object.yielding_jobs != null)
message.yielding_jobs = object.yielding_jobs >>> 0;
if (object.user_sessions != null)
message.user_sessions = object.user_sessions >>> 0;
if (object.game_server_sessions != null)
message.game_server_sessions = object.game_server_sessions >>> 0;
if (object.socaches != null)
message.socaches = object.socaches >>> 0;
if (object.socaches_to_unload != null)
message.socaches_to_unload = object.socaches_to_unload >>> 0;
if (object.socaches_loading != null)
message.socaches_loading = object.socaches_loading >>> 0;
if (object.writeback_queue != null)
message.writeback_queue = object.writeback_queue >>> 0;
if (object.steamid_locks != null)
message.steamid_locks = object.steamid_locks >>> 0;
if (object.logon_queue != null)
message.logon_queue = object.logon_queue >>> 0;
if (object.logon_jobs != null)
message.logon_jobs = object.logon_jobs >>> 0;
return message;
};
/**
* Creates a plain object from a CGCMsgGetSystemStatsResponse message. Also converts values to other types if specified.
* @function toObject
* @memberof CGCMsgGetSystemStatsResponse
* @static
* @param {CGCMsgGetSystemStatsResponse} message CGCMsgGetSystemStatsResponse
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CGCMsgGetSystemStatsResponse.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.gc_app_id = 0;
if (options.bytes === String)
object.stats_kv = "";
else {
object.stats_kv = [];
if (options.bytes !== Array)
object.stats_kv = $util.newBuffer(object.stats_kv);
}
object.active_jobs = 0;
object.yielding_jobs = 0;
object.user_sessions = 0;
object.game_server_sessions = 0;
object.socaches = 0;
object.socaches_to_unload = 0;
object.socaches_loading = 0;
object.writeback_queue = 0;
object.steamid_locks = 0;
object.logon_queue = 0;
object.logon_jobs = 0;
}
if (message.gc_app_id != null && message.hasOwnProperty("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"))
object.active_jobs = message.active_jobs;
if (message.yielding_jobs != null && message.hasOwnProperty("yielding_jobs"))
object.yielding_jobs = message.yielding_jobs;
if (message.user_sessions != null && message.hasOwnProperty("user_sessions"))
object.user_sessions = message.user_sessions;
if (message.game_server_sessions != null && message.hasOwnProperty("game_server_sessions"))
object.game_server_sessions = message.game_server_sessions;
if (message.socaches != null && message.hasOwnProperty("socaches"))
object.socaches = message.socaches;
if (message.socaches_to_unload != null && message.hasOwnProperty("socaches_to_unload"))
object.socaches_to_unload = message.socaches_to_unload;
if (message.socaches_loading != null && message.hasOwnProperty("socaches_loading"))
object.socaches_loading = message.socaches_loading;
if (message.writeback_queue != null && message.hasOwnProperty("writeback_queue"))
object.writeback_queue = message.writeback_queue;
if (message.steamid_locks != null && message.hasOwnProperty("steamid_locks"))
object.steamid_locks = message.steamid_locks;
if (message.logon_queue != null && message.hasOwnProperty("logon_queue"))
object.logon_queue = message.logon_queue;
if (message.logon_jobs != null && message.hasOwnProperty("logon_jobs"))
object.logon_jobs = message.logon_jobs;
return object;
};
/**
* Converts this CGCMsgGetSystemStatsResponse to JSON.
* @function toJSON
* @memberof CGCMsgGetSystemStatsResponse
* @instance
* @returns {Object.<string,*>} JSON object
*/
CGCMsgGetSystemStatsResponse.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CGCMsgGetSystemStatsResponse
* @function getTypeUrl
* @memberof CGCMsgGetSystemStatsResponse
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CGCMsgGetSystemStatsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CGCMsgGetSystemStatsResponse";
};
return CGCMsgGetSystemStatsResponse;
})();
$root.CMsgAMSendEmail = (function() {
/**
* Properties of a CMsgAMSendEmail.
* @exports ICMsgAMSendEmail
* @interface ICMsgAMSendEmail
* @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.<CMsgAMSendEmail.IPersonaNameReplacementToken>|null} [persona_name_tokens] CMsgAMSendEmail persona_name_tokens
* @property {number|null} [source_gc] CMsgAMSendEmail source_gc
* @property {Array.<CMsgAMSendEmail.IReplacementToken>|null} [tokens] CMsgAMSendEmail tokens
*/
/**
* Constructs a new CMsgAMSendEmail.
* @exports CMsgAMSendEmail
* @classdesc Represents a CMsgAMSendEmail.
* @implements ICMsgAMSendEmail
* @constructor
* @param {ICMsgAMSendEmail=} [properties] Properties to set
*/
function CMsgAMSendEmail(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)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgAMSendEmail steamid.
* @member {number|Long} steamid
* @memberof CMsgAMSendEmail
* @instance
*/
CMsgAMSendEmail.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* CMsgAMSendEmail email_msg_type.
* @member {number} email_msg_type
* @memberof CMsgAMSendEmail
* @instance
*/
CMsgAMSendEmail.prototype.email_msg_type = 0;
/**
* CMsgAMSendEmail email_format.
* @member {number} email_format
* @memberof CMsgAMSendEmail
* @instance
*/
CMsgAMSendEmail.prototype.email_format = 0;
/**
* CMsgAMSendEmail persona_name_tokens.
* @member {Array.<CMsgAMSendEmail.IPersonaNameReplacementToken>} persona_name_tokens
* @memberof CMsgAMSendEmail
* @instance
*/
CMsgAMSendEmail.prototype.persona_name_tokens = $util.emptyArray;
/**
* CMsgAMSendEmail source_gc.
* @member {number} source_gc
* @memberof CMsgAMSendEmail
* @instance
*/
CMsgAMSendEmail.prototype.source_gc = 0;
/**
* CMsgAMSendEmail tokens.
* @member {Array.<CMsgAMSendEmail.IReplacementToken>} tokens
* @memberof CMsgAMSendEmail
* @instance
*/
CMsgAMSendEmail.prototype.tokens = $util.emptyArray;
/**
* Creates a new CMsgAMSendEmail instance using the specified properties.
* @function create
* @memberof CMsgAMSendEmail
* @static
* @param {ICMsgAMSendEmail=} [properties] Properties to set
* @returns {CMsgAMSendEmail} CMsgAMSendEmail instance
*/
CMsgAMSendEmail.create = function create(properties) {
return new CMsgAMSendEmail(properties);
};
/**
* Encodes the specified CMsgAMSendEmail message. Does not implicitly {@link CMsgAMSendEmail.verify|verify} messages.
* @function encode
* @memberof CMsgAMSendEmail
* @static
* @param {ICMsgAMSendEmail} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.email_msg_type);
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"))
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();
return writer;
};
/**
* Encodes the specified CMsgAMSendEmail message, length delimited. Does not implicitly {@link CMsgAMSendEmail.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgAMSendEmail
* @static
* @param {ICMsgAMSendEmail} 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();
};
/**
* Decodes a CMsgAMSendEmail message from the specified reader or buffer.
* @function decode
* @memberof CMsgAMSendEmail
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgAMSendEmail} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgAMSendEmail message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgAMSendEmail
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgAMSendEmail} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgAMSendEmail message.
* @function verify
* @memberof CMsgAMSendEmail
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgAMSendEmail.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.steamid != null && message.hasOwnProperty("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 (!$util.isInteger(message.email_msg_type))
return "email_msg_type: integer expected";
if (message.email_format != null && message.hasOwnProperty("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))
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]);
if (error)
return "persona_name_tokens." + error;
}
}
if (message.source_gc != null && message.hasOwnProperty("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))
return "tokens: array expected";
for (var i = 0; i < message.tokens.length; ++i) {
var error = $root.CMsgAMSendEmail.ReplacementToken.verify(message.tokens[i]);
if (error)
return "tokens." + error;
}
}
return null;
};
/**
* Creates a CMsgAMSendEmail message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgAMSendEmail
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgAMSendEmail} CMsgAMSendEmail
*/
CMsgAMSendEmail.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgAMSendEmail)
return object;
var message = new $root.CMsgAMSendEmail();
if (object.steamid != null)
if ($util.Long)
(message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false;
else if (typeof object.steamid === "string")
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();
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 = [];
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 (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 = [];
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]);
}
}
return message;
};
/**
* Creates a plain object from a CMsgAMSendEmail message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgAMSendEmail
* @static
* @param {CMsgAMSendEmail} message CMsgAMSendEmail
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgAMSendEmail.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults) {
object.persona_name_tokens = [];
object.tokens = [];
}
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;
} else
object.steamid = options.longs === String ? "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;
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.email_msg_type = message.email_msg_type;
if (message.email_format != null && message.hasOwnProperty("email_format"))
object.email_format = message.email_format;
if (message.persona_name_tokens && message.persona_name_tokens.length) {
object.persona_name_tokens = [];
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);
}
if (message.source_gc != null && message.hasOwnProperty("source_gc"))
object.source_gc = message.source_gc;
if (message.tokens && message.tokens.length) {
object.tokens = [];
for (var j = 0; j < message.tokens.length; ++j)
object.tokens[j] = $root.CMsgAMSendEmail.ReplacementToken.toObject(message.tokens[j], options);
}
return object;
};
/**
* Converts this CMsgAMSendEmail to JSON.
* @function toJSON
* @memberof CMsgAMSendEmail
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgAMSendEmail.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgAMSendEmail
* @function getTypeUrl
* @memberof CMsgAMSendEmail
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgAMSendEmail.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgAMSendEmail";
};
CMsgAMSendEmail.ReplacementToken = (function() {
/**
* Properties of a ReplacementToken.
* @memberof CMsgAMSendEmail
* @interface IReplacementToken
* @property {string|null} [token_name] ReplacementToken token_name
* @property {string|null} [token_value] ReplacementToken token_value
*/
/**
* Constructs a new ReplacementToken.
* @memberof CMsgAMSendEmail
* @classdesc Represents a ReplacementToken.
* @implements IReplacementToken
* @constructor
* @param {CMsgAMSendEmail.IReplacementToken=} [properties] Properties to set
*/
function ReplacementToken(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* ReplacementToken token_name.
* @member {string} token_name
* @memberof CMsgAMSendEmail.ReplacementToken
* @instance
*/
ReplacementToken.prototype.token_name = "";
/**
* ReplacementToken token_value.
* @member {string} token_value
* @memberof CMsgAMSendEmail.ReplacementToken
* @instance
*/
ReplacementToken.prototype.token_value = "";
/**
* Creates a new ReplacementToken instance using the specified properties.
* @function create
* @memberof CMsgAMSendEmail.ReplacementToken
* @static
* @param {CMsgAMSendEmail.IReplacementToken=} [properties] Properties to set
* @returns {CMsgAMSendEmail.ReplacementToken} ReplacementToken instance
*/
ReplacementToken.create = function create(properties) {
return new ReplacementToken(properties);
};
/**
* Encodes the specified ReplacementToken message. Does not implicitly {@link CMsgAMSendEmail.ReplacementToken.verify|verify} messages.
* @function encode
* @memberof CMsgAMSendEmail.ReplacementToken
* @static
* @param {CMsgAMSendEmail.IReplacementToken} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 2 =*/18).string(message.token_value);
return writer;
};
/**
* Encodes the specified ReplacementToken message, length delimited. Does not implicitly {@link CMsgAMSendEmail.ReplacementToken.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgAMSendEmail.ReplacementToken
* @static
* @param {CMsgAMSendEmail.IReplacementToken} 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();
};
/**
* Decodes a ReplacementToken message from the specified reader or buffer.
* @function decode
* @memberof CMsgAMSendEmail.ReplacementToken
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgAMSendEmail.ReplacementToken} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a ReplacementToken message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgAMSendEmail.ReplacementToken
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgAMSendEmail.ReplacementToken} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a ReplacementToken message.
* @function verify
* @memberof CMsgAMSendEmail.ReplacementToken
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
ReplacementToken.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.token_name != null && message.hasOwnProperty("token_name"))
if (!$util.isString(message.token_name))
return "token_name: string expected";
if (message.token_value != null && message.hasOwnProperty("token_value"))
if (!$util.isString(message.token_value))
return "token_value: string expected";
return null;
};
/**
* Creates a ReplacementToken message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgAMSendEmail.ReplacementToken
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgAMSendEmail.ReplacementToken} ReplacementToken
*/
ReplacementToken.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgAMSendEmail.ReplacementToken)
return object;
var message = new $root.CMsgAMSendEmail.ReplacementToken();
if (object.token_name != null)
message.token_name = String(object.token_name);
if (object.token_value != null)
message.token_value = String(object.token_value);
return message;
};
/**
* Creates a plain object from a ReplacementToken message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgAMSendEmail.ReplacementToken
* @static
* @param {CMsgAMSendEmail.ReplacementToken} message ReplacementToken
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
ReplacementToken.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.token_name = "";
object.token_value = "";
}
if (message.token_name != null && message.hasOwnProperty("token_name"))
object.token_name = message.token_name;
if (message.token_value != null && message.hasOwnProperty("token_value"))
object.token_value = message.token_value;
return object;
};
/**
* Converts this ReplacementToken to JSON.
* @function toJSON
* @memberof CMsgAMSendEmail.ReplacementToken
* @instance
* @returns {Object.<string,*>} JSON object
*/
ReplacementToken.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for ReplacementToken
* @function getTypeUrl
* @memberof CMsgAMSendEmail.ReplacementToken
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
ReplacementToken.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgAMSendEmail.ReplacementToken";
};
return ReplacementToken;
})();
CMsgAMSendEmail.PersonaNameReplacementToken = (function() {
/**
* Properties of a PersonaNameReplacementToken.
* @memberof CMsgAMSendEmail
* @interface IPersonaNameReplacementToken
* @property {number|Long|null} [steamid] PersonaNameReplacementToken steamid
* @property {string|null} [token_name] PersonaNameReplacementToken token_name
*/
/**
* Constructs a new PersonaNameReplacementToken.
* @memberof CMsgAMSendEmail
* @classdesc Represents a PersonaNameReplacementToken.
* @implements IPersonaNameReplacementToken
* @constructor
* @param {CMsgAMSendEmail.IPersonaNameReplacementToken=} [properties] Properties to set
*/
function PersonaNameReplacementToken(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* PersonaNameReplacementToken steamid.
* @member {number|Long} steamid
* @memberof CMsgAMSendEmail.PersonaNameReplacementToken
* @instance
*/
PersonaNameReplacementToken.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* PersonaNameReplacementToken token_name.
* @member {string} token_name
* @memberof CMsgAMSendEmail.PersonaNameReplacementToken
* @instance
*/
PersonaNameReplacementToken.prototype.token_name = "";
/**
* Creates a new PersonaNameReplacementToken instance using the specified properties.
* @function create
* @memberof CMsgAMSendEmail.PersonaNameReplacementToken
* @static
* @param {CMsgAMSendEmail.IPersonaNameReplacementToken=} [properties] Properties to set
* @returns {CMsgAMSendEmail.PersonaNameReplacementToken} PersonaNameReplacementToken instance
*/
PersonaNameReplacementToken.create = function create(properties) {
return new PersonaNameReplacementToken(properties);
};
/**
* Encodes the specified PersonaNameReplacementToken message. Does not implicitly {@link CMsgAMSendEmail.PersonaNameReplacementToken.verify|verify} messages.
* @function encode
* @memberof CMsgAMSendEmail.PersonaNameReplacementToken
* @static
* @param {CMsgAMSendEmail.IPersonaNameReplacementToken} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 2 =*/18).string(message.token_name);
return writer;
};
/**
* Encodes the specified PersonaNameReplacementToken message, length delimited. Does not implicitly {@link CMsgAMSendEmail.PersonaNameReplacementToken.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgAMSendEmail.PersonaNameReplacementToken
* @static
* @param {CMsgAMSendEmail.IPersonaNameReplacementToken} 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();
};
/**
* Decodes a PersonaNameReplacementToken message from the specified reader or buffer.
* @function decode
* @memberof CMsgAMSendEmail.PersonaNameReplacementToken
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgAMSendEmail.PersonaNameReplacementToken} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a PersonaNameReplacementToken message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgAMSendEmail.PersonaNameReplacementToken
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgAMSendEmail.PersonaNameReplacementToken} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a PersonaNameReplacementToken message.
* @function verify
* @memberof CMsgAMSendEmail.PersonaNameReplacementToken
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
PersonaNameReplacementToken.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.steamid != null && message.hasOwnProperty("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 (!$util.isString(message.token_name))
return "token_name: string expected";
return null;
};
/**
* Creates a PersonaNameReplacementToken message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgAMSendEmail.PersonaNameReplacementToken
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgAMSendEmail.PersonaNameReplacementToken} PersonaNameReplacementToken
*/
PersonaNameReplacementToken.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgAMSendEmail.PersonaNameReplacementToken)
return object;
var message = new $root.CMsgAMSendEmail.PersonaNameReplacementToken();
if (object.steamid != null)
if ($util.Long)
(message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false;
else if (typeof object.steamid === "string")
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();
if (object.token_name != null)
message.token_name = String(object.token_name);
return message;
};
/**
* Creates a plain object from a PersonaNameReplacementToken message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgAMSendEmail.PersonaNameReplacementToken
* @static
* @param {CMsgAMSendEmail.PersonaNameReplacementToken} message PersonaNameReplacementToken
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
PersonaNameReplacementToken.toObject = function toObject(message, options) {
if (!options)
options = {};
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;
} else
object.steamid = options.longs === String ? "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;
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.token_name = message.token_name;
return object;
};
/**
* Converts this PersonaNameReplacementToken to JSON.
* @function toJSON
* @memberof CMsgAMSendEmail.PersonaNameReplacementToken
* @instance
* @returns {Object.<string,*>} JSON object
*/
PersonaNameReplacementToken.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for PersonaNameReplacementToken
* @function getTypeUrl
* @memberof CMsgAMSendEmail.PersonaNameReplacementToken
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
PersonaNameReplacementToken.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgAMSendEmail.PersonaNameReplacementToken";
};
return PersonaNameReplacementToken;
})();
return CMsgAMSendEmail;
})();
$root.CMsgAMSendEmailResponse = (function() {
/**
* Properties of a CMsgAMSendEmailResponse.
* @exports ICMsgAMSendEmailResponse
* @interface ICMsgAMSendEmailResponse
* @property {number|null} [eresult] CMsgAMSendEmailResponse eresult
*/
/**
* Constructs a new CMsgAMSendEmailResponse.
* @exports CMsgAMSendEmailResponse
* @classdesc Represents a CMsgAMSendEmailResponse.
* @implements ICMsgAMSendEmailResponse
* @constructor
* @param {ICMsgAMSendEmailResponse=} [properties] Properties to set
*/
function CMsgAMSendEmailResponse(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgAMSendEmailResponse eresult.
* @member {number} eresult
* @memberof CMsgAMSendEmailResponse
* @instance
*/
CMsgAMSendEmailResponse.prototype.eresult = 2;
/**
* Creates a new CMsgAMSendEmailResponse instance using the specified properties.
* @function create
* @memberof CMsgAMSendEmailResponse
* @static
* @param {ICMsgAMSendEmailResponse=} [properties] Properties to set
* @returns {CMsgAMSendEmailResponse} CMsgAMSendEmailResponse instance
*/
CMsgAMSendEmailResponse.create = function create(properties) {
return new CMsgAMSendEmailResponse(properties);
};
/**
* Encodes the specified CMsgAMSendEmailResponse message. Does not implicitly {@link CMsgAMSendEmailResponse.verify|verify} messages.
* @function encode
* @memberof CMsgAMSendEmailResponse
* @static
* @param {ICMsgAMSendEmailResponse} 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) {
if (!writer)
writer = $Writer.create();
if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult"))
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.eresult);
return writer;
};
/**
* Encodes the specified CMsgAMSendEmailResponse message, length delimited. Does not implicitly {@link CMsgAMSendEmailResponse.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgAMSendEmailResponse
* @static
* @param {ICMsgAMSendEmailResponse} 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();
};
/**
* Decodes a CMsgAMSendEmailResponse message from the specified reader or buffer.
* @function decode
* @memberof CMsgAMSendEmailResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgAMSendEmailResponse} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgAMSendEmailResponse message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgAMSendEmailResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgAMSendEmailResponse} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgAMSendEmailResponse message.
* @function verify
* @memberof CMsgAMSendEmailResponse
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgAMSendEmailResponse.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.eresult != null && message.hasOwnProperty("eresult"))
if (!$util.isInteger(message.eresult))
return "eresult: integer expected";
return null;
};
/**
* Creates a CMsgAMSendEmailResponse message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgAMSendEmailResponse
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgAMSendEmailResponse} CMsgAMSendEmailResponse
*/
CMsgAMSendEmailResponse.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgAMSendEmailResponse)
return object;
var message = new $root.CMsgAMSendEmailResponse();
if (object.eresult != null)
message.eresult = object.eresult >>> 0;
return message;
};
/**
* Creates a plain object from a CMsgAMSendEmailResponse message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgAMSendEmailResponse
* @static
* @param {CMsgAMSendEmailResponse} message CMsgAMSendEmailResponse
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgAMSendEmailResponse.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults)
object.eresult = 2;
if (message.eresult != null && message.hasOwnProperty("eresult"))
object.eresult = message.eresult;
return object;
};
/**
* Converts this CMsgAMSendEmailResponse to JSON.
* @function toJSON
* @memberof CMsgAMSendEmailResponse
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgAMSendEmailResponse.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgAMSendEmailResponse
* @function getTypeUrl
* @memberof CMsgAMSendEmailResponse
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgAMSendEmailResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgAMSendEmailResponse";
};
return CMsgAMSendEmailResponse;
})();
$root.CMsgGCGetEmailTemplate = (function() {
/**
* Properties of a CMsgGCGetEmailTemplate.
* @exports ICMsgGCGetEmailTemplate
* @interface ICMsgGCGetEmailTemplate
* @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
*/
/**
* Constructs a new CMsgGCGetEmailTemplate.
* @exports CMsgGCGetEmailTemplate
* @classdesc Represents a CMsgGCGetEmailTemplate.
* @implements ICMsgGCGetEmailTemplate
* @constructor
* @param {ICMsgGCGetEmailTemplate=} [properties] Properties to set
*/
function CMsgGCGetEmailTemplate(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgGCGetEmailTemplate app_id.
* @member {number} app_id
* @memberof CMsgGCGetEmailTemplate
* @instance
*/
CMsgGCGetEmailTemplate.prototype.app_id = 0;
/**
* CMsgGCGetEmailTemplate email_msg_type.
* @member {number} email_msg_type
* @memberof CMsgGCGetEmailTemplate
* @instance
*/
CMsgGCGetEmailTemplate.prototype.email_msg_type = 0;
/**
* CMsgGCGetEmailTemplate email_lang.
* @member {number} email_lang
* @memberof CMsgGCGetEmailTemplate
* @instance
*/
CMsgGCGetEmailTemplate.prototype.email_lang = 0;
/**
* CMsgGCGetEmailTemplate email_format.
* @member {number} email_format
* @memberof CMsgGCGetEmailTemplate
* @instance
*/
CMsgGCGetEmailTemplate.prototype.email_format = 0;
/**
* Creates a new CMsgGCGetEmailTemplate instance using the specified properties.
* @function create
* @memberof CMsgGCGetEmailTemplate
* @static
* @param {ICMsgGCGetEmailTemplate=} [properties] Properties to set
* @returns {CMsgGCGetEmailTemplate} CMsgGCGetEmailTemplate instance
*/
CMsgGCGetEmailTemplate.create = function create(properties) {
return new CMsgGCGetEmailTemplate(properties);
};
/**
* Encodes the specified CMsgGCGetEmailTemplate message. Does not implicitly {@link CMsgGCGetEmailTemplate.verify|verify} messages.
* @function encode
* @memberof CMsgGCGetEmailTemplate
* @static
* @param {ICMsgGCGetEmailTemplate} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.email_msg_type);
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"))
writer.uint32(/* id 4, wireType 0 =*/32).int32(message.email_format);
return writer;
};
/**
* Encodes the specified CMsgGCGetEmailTemplate message, length delimited. Does not implicitly {@link CMsgGCGetEmailTemplate.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCGetEmailTemplate
* @static
* @param {ICMsgGCGetEmailTemplate} 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();
};
/**
* Decodes a CMsgGCGetEmailTemplate message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCGetEmailTemplate
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgGCGetEmailTemplate} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgGCGetEmailTemplate message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCGetEmailTemplate
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCGetEmailTemplate} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgGCGetEmailTemplate message.
* @function verify
* @memberof CMsgGCGetEmailTemplate
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgGCGetEmailTemplate.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.app_id != null && message.hasOwnProperty("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 (!$util.isInteger(message.email_msg_type))
return "email_msg_type: integer expected";
if (message.email_lang != null && message.hasOwnProperty("email_lang"))
if (!$util.isInteger(message.email_lang))
return "email_lang: integer expected";
if (message.email_format != null && message.hasOwnProperty("email_format"))
if (!$util.isInteger(message.email_format))
return "email_format: integer expected";
return null;
};
/**
* Creates a CMsgGCGetEmailTemplate message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCGetEmailTemplate
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCGetEmailTemplate} CMsgGCGetEmailTemplate
*/
CMsgGCGetEmailTemplate.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCGetEmailTemplate)
return object;
var message = new $root.CMsgGCGetEmailTemplate();
if (object.app_id != null)
message.app_id = object.app_id >>> 0;
if (object.email_msg_type != null)
message.email_msg_type = object.email_msg_type >>> 0;
if (object.email_lang != null)
message.email_lang = object.email_lang | 0;
if (object.email_format != null)
message.email_format = object.email_format | 0;
return message;
};
/**
* Creates a plain object from a CMsgGCGetEmailTemplate message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCGetEmailTemplate
* @static
* @param {CMsgGCGetEmailTemplate} message CMsgGCGetEmailTemplate
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgGCGetEmailTemplate.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.app_id = 0;
object.email_msg_type = 0;
object.email_lang = 0;
object.email_format = 0;
}
if (message.app_id != null && message.hasOwnProperty("app_id"))
object.app_id = message.app_id;
if (message.email_msg_type != null && message.hasOwnProperty("email_msg_type"))
object.email_msg_type = message.email_msg_type;
if (message.email_lang != null && message.hasOwnProperty("email_lang"))
object.email_lang = message.email_lang;
if (message.email_format != null && message.hasOwnProperty("email_format"))
object.email_format = message.email_format;
return object;
};
/**
* Converts this CMsgGCGetEmailTemplate to JSON.
* @function toJSON
* @memberof CMsgGCGetEmailTemplate
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgGCGetEmailTemplate.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgGCGetEmailTemplate
* @function getTypeUrl
* @memberof CMsgGCGetEmailTemplate
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgGCGetEmailTemplate.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCGetEmailTemplate";
};
return CMsgGCGetEmailTemplate;
})();
$root.CMsgGCGetEmailTemplateResponse = (function() {
/**
* Properties of a CMsgGCGetEmailTemplateResponse.
* @exports ICMsgGCGetEmailTemplateResponse
* @interface ICMsgGCGetEmailTemplateResponse
* @property {number|null} [eresult] CMsgGCGetEmailTemplateResponse eresult
* @property {boolean|null} [template_exists] CMsgGCGetEmailTemplateResponse template_exists
* @property {string|null} [template] CMsgGCGetEmailTemplateResponse template
*/
/**
* Constructs a new CMsgGCGetEmailTemplateResponse.
* @exports CMsgGCGetEmailTemplateResponse
* @classdesc Represents a CMsgGCGetEmailTemplateResponse.
* @implements ICMsgGCGetEmailTemplateResponse
* @constructor
* @param {ICMsgGCGetEmailTemplateResponse=} [properties] Properties to set
*/
function CMsgGCGetEmailTemplateResponse(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgGCGetEmailTemplateResponse eresult.
* @member {number} eresult
* @memberof CMsgGCGetEmailTemplateResponse
* @instance
*/
CMsgGCGetEmailTemplateResponse.prototype.eresult = 2;
/**
* CMsgGCGetEmailTemplateResponse template_exists.
* @member {boolean} template_exists
* @memberof CMsgGCGetEmailTemplateResponse
* @instance
*/
CMsgGCGetEmailTemplateResponse.prototype.template_exists = false;
/**
* CMsgGCGetEmailTemplateResponse template.
* @member {string} template
* @memberof CMsgGCGetEmailTemplateResponse
* @instance
*/
CMsgGCGetEmailTemplateResponse.prototype.template = "";
/**
* Creates a new CMsgGCGetEmailTemplateResponse instance using the specified properties.
* @function create
* @memberof CMsgGCGetEmailTemplateResponse
* @static
* @param {ICMsgGCGetEmailTemplateResponse=} [properties] Properties to set
* @returns {CMsgGCGetEmailTemplateResponse} CMsgGCGetEmailTemplateResponse instance
*/
CMsgGCGetEmailTemplateResponse.create = function create(properties) {
return new CMsgGCGetEmailTemplateResponse(properties);
};
/**
* Encodes the specified CMsgGCGetEmailTemplateResponse message. Does not implicitly {@link CMsgGCGetEmailTemplateResponse.verify|verify} messages.
* @function encode
* @memberof CMsgGCGetEmailTemplateResponse
* @static
* @param {ICMsgGCGetEmailTemplateResponse} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 0 =*/16).bool(message.template_exists);
if (message.template != null && Object.hasOwnProperty.call(message, "template"))
writer.uint32(/* id 3, wireType 2 =*/26).string(message.template);
return writer;
};
/**
* Encodes the specified CMsgGCGetEmailTemplateResponse message, length delimited. Does not implicitly {@link CMsgGCGetEmailTemplateResponse.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCGetEmailTemplateResponse
* @static
* @param {ICMsgGCGetEmailTemplateResponse} 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();
};
/**
* Decodes a CMsgGCGetEmailTemplateResponse message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCGetEmailTemplateResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgGCGetEmailTemplateResponse} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgGCGetEmailTemplateResponse message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCGetEmailTemplateResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCGetEmailTemplateResponse} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgGCGetEmailTemplateResponse message.
* @function verify
* @memberof CMsgGCGetEmailTemplateResponse
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgGCGetEmailTemplateResponse.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.eresult != null && message.hasOwnProperty("eresult"))
if (!$util.isInteger(message.eresult))
return "eresult: integer expected";
if (message.template_exists != null && message.hasOwnProperty("template_exists"))
if (typeof message.template_exists !== "boolean")
return "template_exists: boolean expected";
if (message.template != null && message.hasOwnProperty("template"))
if (!$util.isString(message.template))
return "template: string expected";
return null;
};
/**
* Creates a CMsgGCGetEmailTemplateResponse message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCGetEmailTemplateResponse
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCGetEmailTemplateResponse} CMsgGCGetEmailTemplateResponse
*/
CMsgGCGetEmailTemplateResponse.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCGetEmailTemplateResponse)
return object;
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);
if (object.template != null)
message.template = String(object.template);
return message;
};
/**
* Creates a plain object from a CMsgGCGetEmailTemplateResponse message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCGetEmailTemplateResponse
* @static
* @param {CMsgGCGetEmailTemplateResponse} message CMsgGCGetEmailTemplateResponse
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgGCGetEmailTemplateResponse.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.eresult = 2;
object.template_exists = false;
object.template = "";
}
if (message.eresult != null && message.hasOwnProperty("eresult"))
object.eresult = message.eresult;
if (message.template_exists != null && message.hasOwnProperty("template_exists"))
object.template_exists = message.template_exists;
if (message.template != null && message.hasOwnProperty("template"))
object.template = message.template;
return object;
};
/**
* Converts this CMsgGCGetEmailTemplateResponse to JSON.
* @function toJSON
* @memberof CMsgGCGetEmailTemplateResponse
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgGCGetEmailTemplateResponse.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgGCGetEmailTemplateResponse
* @function getTypeUrl
* @memberof CMsgGCGetEmailTemplateResponse
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgGCGetEmailTemplateResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCGetEmailTemplateResponse";
};
return CMsgGCGetEmailTemplateResponse;
})();
$root.CMsgAMGrantGuestPasses2 = (function() {
/**
* Properties of a CMsgAMGrantGuestPasses2.
* @exports ICMsgAMGrantGuestPasses2
* @interface ICMsgAMGrantGuestPasses2
* @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
*/
/**
* Constructs a new CMsgAMGrantGuestPasses2.
* @exports CMsgAMGrantGuestPasses2
* @classdesc Represents a CMsgAMGrantGuestPasses2.
* @implements ICMsgAMGrantGuestPasses2
* @constructor
* @param {ICMsgAMGrantGuestPasses2=} [properties] Properties to set
*/
function CMsgAMGrantGuestPasses2(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgAMGrantGuestPasses2 steam_id.
* @member {number|Long} steam_id
* @memberof CMsgAMGrantGuestPasses2
* @instance
*/
CMsgAMGrantGuestPasses2.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* CMsgAMGrantGuestPasses2 package_id.
* @member {number} package_id
* @memberof CMsgAMGrantGuestPasses2
* @instance
*/
CMsgAMGrantGuestPasses2.prototype.package_id = 0;
/**
* CMsgAMGrantGuestPasses2 passes_to_grant.
* @member {number} passes_to_grant
* @memberof CMsgAMGrantGuestPasses2
* @instance
*/
CMsgAMGrantGuestPasses2.prototype.passes_to_grant = 0;
/**
* CMsgAMGrantGuestPasses2 days_to_expiration.
* @member {number} days_to_expiration
* @memberof CMsgAMGrantGuestPasses2
* @instance
*/
CMsgAMGrantGuestPasses2.prototype.days_to_expiration = 0;
/**
* CMsgAMGrantGuestPasses2 action.
* @member {number} action
* @memberof CMsgAMGrantGuestPasses2
* @instance
*/
CMsgAMGrantGuestPasses2.prototype.action = 0;
/**
* Creates a new CMsgAMGrantGuestPasses2 instance using the specified properties.
* @function create
* @memberof CMsgAMGrantGuestPasses2
* @static
* @param {ICMsgAMGrantGuestPasses2=} [properties] Properties to set
* @returns {CMsgAMGrantGuestPasses2} CMsgAMGrantGuestPasses2 instance
*/
CMsgAMGrantGuestPasses2.create = function create(properties) {
return new CMsgAMGrantGuestPasses2(properties);
};
/**
* Encodes the specified CMsgAMGrantGuestPasses2 message. Does not implicitly {@link CMsgAMGrantGuestPasses2.verify|verify} messages.
* @function encode
* @memberof CMsgAMGrantGuestPasses2
* @static
* @param {ICMsgAMGrantGuestPasses2} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.package_id);
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"))
writer.uint32(/* id 4, wireType 0 =*/32).int32(message.days_to_expiration);
if (message.action != null && Object.hasOwnProperty.call(message, "action"))
writer.uint32(/* id 5, wireType 0 =*/40).int32(message.action);
return writer;
};
/**
* Encodes the specified CMsgAMGrantGuestPasses2 message, length delimited. Does not implicitly {@link CMsgAMGrantGuestPasses2.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgAMGrantGuestPasses2
* @static
* @param {ICMsgAMGrantGuestPasses2} 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();
};
/**
* Decodes a CMsgAMGrantGuestPasses2 message from the specified reader or buffer.
* @function decode
* @memberof CMsgAMGrantGuestPasses2
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgAMGrantGuestPasses2} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgAMGrantGuestPasses2 message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgAMGrantGuestPasses2
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgAMGrantGuestPasses2} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgAMGrantGuestPasses2 message.
* @function verify
* @memberof CMsgAMGrantGuestPasses2
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgAMGrantGuestPasses2.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.steam_id != null && message.hasOwnProperty("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 (!$util.isInteger(message.package_id))
return "package_id: integer expected";
if (message.passes_to_grant != null && message.hasOwnProperty("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 (!$util.isInteger(message.days_to_expiration))
return "days_to_expiration: integer expected";
if (message.action != null && message.hasOwnProperty("action"))
if (!$util.isInteger(message.action))
return "action: integer expected";
return null;
};
/**
* Creates a CMsgAMGrantGuestPasses2 message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgAMGrantGuestPasses2
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgAMGrantGuestPasses2} CMsgAMGrantGuestPasses2
*/
CMsgAMGrantGuestPasses2.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgAMGrantGuestPasses2)
return object;
var message = new $root.CMsgAMGrantGuestPasses2();
if (object.steam_id != null)
if ($util.Long)
(message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false;
else if (typeof object.steam_id === "string")
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();
if (object.package_id != null)
message.package_id = object.package_id >>> 0;
if (object.passes_to_grant != null)
message.passes_to_grant = object.passes_to_grant | 0;
if (object.days_to_expiration != null)
message.days_to_expiration = object.days_to_expiration | 0;
if (object.action != null)
message.action = object.action | 0;
return message;
};
/**
* Creates a plain object from a CMsgAMGrantGuestPasses2 message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgAMGrantGuestPasses2
* @static
* @param {CMsgAMGrantGuestPasses2} message CMsgAMGrantGuestPasses2
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgAMGrantGuestPasses2.toObject = function toObject(message, options) {
if (!options)
options = {};
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;
} else
object.steam_id = options.longs === String ? "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;
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.package_id = message.package_id;
if (message.passes_to_grant != null && message.hasOwnProperty("passes_to_grant"))
object.passes_to_grant = message.passes_to_grant;
if (message.days_to_expiration != null && message.hasOwnProperty("days_to_expiration"))
object.days_to_expiration = message.days_to_expiration;
if (message.action != null && message.hasOwnProperty("action"))
object.action = message.action;
return object;
};
/**
* Converts this CMsgAMGrantGuestPasses2 to JSON.
* @function toJSON
* @memberof CMsgAMGrantGuestPasses2
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgAMGrantGuestPasses2.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgAMGrantGuestPasses2
* @function getTypeUrl
* @memberof CMsgAMGrantGuestPasses2
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgAMGrantGuestPasses2.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgAMGrantGuestPasses2";
};
return CMsgAMGrantGuestPasses2;
})();
$root.CMsgAMGrantGuestPasses2Response = (function() {
/**
* Properties of a CMsgAMGrantGuestPasses2Response.
* @exports ICMsgAMGrantGuestPasses2Response
* @interface ICMsgAMGrantGuestPasses2Response
* @property {number|null} [eresult] CMsgAMGrantGuestPasses2Response eresult
* @property {number|null} [passes_granted] CMsgAMGrantGuestPasses2Response passes_granted
*/
/**
* Constructs a new CMsgAMGrantGuestPasses2Response.
* @exports CMsgAMGrantGuestPasses2Response
* @classdesc Represents a CMsgAMGrantGuestPasses2Response.
* @implements ICMsgAMGrantGuestPasses2Response
* @constructor
* @param {ICMsgAMGrantGuestPasses2Response=} [properties] Properties to set
*/
function CMsgAMGrantGuestPasses2Response(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgAMGrantGuestPasses2Response eresult.
* @member {number} eresult
* @memberof CMsgAMGrantGuestPasses2Response
* @instance
*/
CMsgAMGrantGuestPasses2Response.prototype.eresult = 2;
/**
* CMsgAMGrantGuestPasses2Response passes_granted.
* @member {number} passes_granted
* @memberof CMsgAMGrantGuestPasses2Response
* @instance
*/
CMsgAMGrantGuestPasses2Response.prototype.passes_granted = 0;
/**
* Creates a new CMsgAMGrantGuestPasses2Response instance using the specified properties.
* @function create
* @memberof CMsgAMGrantGuestPasses2Response
* @static
* @param {ICMsgAMGrantGuestPasses2Response=} [properties] Properties to set
* @returns {CMsgAMGrantGuestPasses2Response} CMsgAMGrantGuestPasses2Response instance
*/
CMsgAMGrantGuestPasses2Response.create = function create(properties) {
return new CMsgAMGrantGuestPasses2Response(properties);
};
/**
* Encodes the specified CMsgAMGrantGuestPasses2Response message. Does not implicitly {@link CMsgAMGrantGuestPasses2Response.verify|verify} messages.
* @function encode
* @memberof CMsgAMGrantGuestPasses2Response
* @static
* @param {ICMsgAMGrantGuestPasses2Response} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.passes_granted);
return writer;
};
/**
* Encodes the specified CMsgAMGrantGuestPasses2Response message, length delimited. Does not implicitly {@link CMsgAMGrantGuestPasses2Response.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgAMGrantGuestPasses2Response
* @static
* @param {ICMsgAMGrantGuestPasses2Response} 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();
};
/**
* Decodes a CMsgAMGrantGuestPasses2Response message from the specified reader or buffer.
* @function decode
* @memberof CMsgAMGrantGuestPasses2Response
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgAMGrantGuestPasses2Response} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgAMGrantGuestPasses2Response message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgAMGrantGuestPasses2Response
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgAMGrantGuestPasses2Response} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgAMGrantGuestPasses2Response message.
* @function verify
* @memberof CMsgAMGrantGuestPasses2Response
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgAMGrantGuestPasses2Response.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.eresult != null && message.hasOwnProperty("eresult"))
if (!$util.isInteger(message.eresult))
return "eresult: integer expected";
if (message.passes_granted != null && message.hasOwnProperty("passes_granted"))
if (!$util.isInteger(message.passes_granted))
return "passes_granted: integer expected";
return null;
};
/**
* Creates a CMsgAMGrantGuestPasses2Response message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgAMGrantGuestPasses2Response
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgAMGrantGuestPasses2Response} CMsgAMGrantGuestPasses2Response
*/
CMsgAMGrantGuestPasses2Response.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgAMGrantGuestPasses2Response)
return object;
var message = new $root.CMsgAMGrantGuestPasses2Response();
if (object.eresult != null)
message.eresult = object.eresult | 0;
if (object.passes_granted != null)
message.passes_granted = object.passes_granted | 0;
return message;
};
/**
* Creates a plain object from a CMsgAMGrantGuestPasses2Response message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgAMGrantGuestPasses2Response
* @static
* @param {CMsgAMGrantGuestPasses2Response} message CMsgAMGrantGuestPasses2Response
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgAMGrantGuestPasses2Response.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.eresult = 2;
object.passes_granted = 0;
}
if (message.eresult != null && message.hasOwnProperty("eresult"))
object.eresult = message.eresult;
if (message.passes_granted != null && message.hasOwnProperty("passes_granted"))
object.passes_granted = message.passes_granted;
return object;
};
/**
* Converts this CMsgAMGrantGuestPasses2Response to JSON.
* @function toJSON
* @memberof CMsgAMGrantGuestPasses2Response
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgAMGrantGuestPasses2Response.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgAMGrantGuestPasses2Response
* @function getTypeUrl
* @memberof CMsgAMGrantGuestPasses2Response
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgAMGrantGuestPasses2Response.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgAMGrantGuestPasses2Response";
};
return CMsgAMGrantGuestPasses2Response;
})();
$root.CGCSystemMsg_GetAccountDetails = (function() {
/**
* Properties of a CGCSystemMsg_GetAccountDetails.
* @exports ICGCSystemMsg_GetAccountDetails
* @interface ICGCSystemMsg_GetAccountDetails
* @property {number|Long|null} [steamid] CGCSystemMsg_GetAccountDetails steamid
* @property {number|null} [appid] CGCSystemMsg_GetAccountDetails appid
*/
/**
* Constructs a new CGCSystemMsg_GetAccountDetails.
* @exports CGCSystemMsg_GetAccountDetails
* @classdesc Represents a CGCSystemMsg_GetAccountDetails.
* @implements ICGCSystemMsg_GetAccountDetails
* @constructor
* @param {ICGCSystemMsg_GetAccountDetails=} [properties] Properties to set
*/
function CGCSystemMsg_GetAccountDetails(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CGCSystemMsg_GetAccountDetails steamid.
* @member {number|Long} steamid
* @memberof CGCSystemMsg_GetAccountDetails
* @instance
*/
CGCSystemMsg_GetAccountDetails.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* CGCSystemMsg_GetAccountDetails appid.
* @member {number} appid
* @memberof CGCSystemMsg_GetAccountDetails
* @instance
*/
CGCSystemMsg_GetAccountDetails.prototype.appid = 0;
/**
* Creates a new CGCSystemMsg_GetAccountDetails instance using the specified properties.
* @function create
* @memberof CGCSystemMsg_GetAccountDetails
* @static
* @param {ICGCSystemMsg_GetAccountDetails=} [properties] Properties to set
* @returns {CGCSystemMsg_GetAccountDetails} CGCSystemMsg_GetAccountDetails instance
*/
CGCSystemMsg_GetAccountDetails.create = function create(properties) {
return new CGCSystemMsg_GetAccountDetails(properties);
};
/**
* Encodes the specified CGCSystemMsg_GetAccountDetails message. Does not implicitly {@link CGCSystemMsg_GetAccountDetails.verify|verify} messages.
* @function encode
* @memberof CGCSystemMsg_GetAccountDetails
* @static
* @param {ICGCSystemMsg_GetAccountDetails} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.appid);
return writer;
};
/**
* Encodes the specified CGCSystemMsg_GetAccountDetails message, length delimited. Does not implicitly {@link CGCSystemMsg_GetAccountDetails.verify|verify} messages.
* @function encodeDelimited
* @memberof CGCSystemMsg_GetAccountDetails
* @static
* @param {ICGCSystemMsg_GetAccountDetails} 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();
};
/**
* Decodes a CGCSystemMsg_GetAccountDetails message from the specified reader or buffer.
* @function decode
* @memberof CGCSystemMsg_GetAccountDetails
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CGCSystemMsg_GetAccountDetails message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CGCSystemMsg_GetAccountDetails
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CGCSystemMsg_GetAccountDetails} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CGCSystemMsg_GetAccountDetails message.
* @function verify
* @memberof CGCSystemMsg_GetAccountDetails
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CGCSystemMsg_GetAccountDetails.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.steamid != null && message.hasOwnProperty("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 (!$util.isInteger(message.appid))
return "appid: integer expected";
return null;
};
/**
* Creates a CGCSystemMsg_GetAccountDetails message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CGCSystemMsg_GetAccountDetails
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CGCSystemMsg_GetAccountDetails} CGCSystemMsg_GetAccountDetails
*/
CGCSystemMsg_GetAccountDetails.fromObject = function fromObject(object) {
if (object instanceof $root.CGCSystemMsg_GetAccountDetails)
return object;
var message = new $root.CGCSystemMsg_GetAccountDetails();
if (object.steamid != null)
if ($util.Long)
(message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false;
else if (typeof object.steamid === "string")
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();
if (object.appid != null)
message.appid = object.appid >>> 0;
return message;
};
/**
* Creates a plain object from a CGCSystemMsg_GetAccountDetails message. Also converts values to other types if specified.
* @function toObject
* @memberof CGCSystemMsg_GetAccountDetails
* @static
* @param {CGCSystemMsg_GetAccountDetails} message CGCSystemMsg_GetAccountDetails
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CGCSystemMsg_GetAccountDetails.toObject = function toObject(message, options) {
if (!options)
options = {};
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;
} else
object.steamid = options.longs === String ? "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;
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.appid = message.appid;
return object;
};
/**
* Converts this CGCSystemMsg_GetAccountDetails to JSON.
* @function toJSON
* @memberof CGCSystemMsg_GetAccountDetails
* @instance
* @returns {Object.<string,*>} JSON object
*/
CGCSystemMsg_GetAccountDetails.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CGCSystemMsg_GetAccountDetails
* @function getTypeUrl
* @memberof CGCSystemMsg_GetAccountDetails
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CGCSystemMsg_GetAccountDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CGCSystemMsg_GetAccountDetails";
};
return CGCSystemMsg_GetAccountDetails;
})();
$root.CGCSystemMsg_GetAccountDetails_Response = (function() {
/**
* Properties of a CGCSystemMsg_GetAccountDetails_Response.
* @exports ICGCSystemMsg_GetAccountDetails_Response
* @interface ICGCSystemMsg_GetAccountDetails_Response
* @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
* @property {boolean|null} [is_profile_public] CGCSystemMsg_GetAccountDetails_Response is_profile_public
* @property {boolean|null} [is_inventory_public] CGCSystemMsg_GetAccountDetails_Response is_inventory_public
* @property {boolean|null} [is_vac_banned] CGCSystemMsg_GetAccountDetails_Response is_vac_banned
* @property {boolean|null} [is_cyber_cafe] CGCSystemMsg_GetAccountDetails_Response is_cyber_cafe
* @property {boolean|null} [is_school_account] CGCSystemMsg_GetAccountDetails_Response is_school_account
* @property {boolean|null} [is_limited] CGCSystemMsg_GetAccountDetails_Response is_limited
* @property {boolean|null} [is_subscribed] CGCSystemMsg_GetAccountDetails_Response is_subscribed
* @property {number|null} ["package"] CGCSystemMsg_GetAccountDetails_Response package
* @property {boolean|null} [is_free_trial_account] CGCSystemMsg_GetAccountDetails_Response is_free_trial_account
* @property {number|null} [free_trial_expiration] CGCSystemMsg_GetAccountDetails_Response free_trial_expiration
* @property {boolean|null} [is_low_violence] CGCSystemMsg_GetAccountDetails_Response is_low_violence
* @property {boolean|null} [is_account_locked_down] CGCSystemMsg_GetAccountDetails_Response is_account_locked_down
* @property {boolean|null} [is_community_banned] CGCSystemMsg_GetAccountDetails_Response is_community_banned
* @property {boolean|null} [is_trade_banned] CGCSystemMsg_GetAccountDetails_Response is_trade_banned
* @property {number|null} [trade_ban_expiration] CGCSystemMsg_GetAccountDetails_Response trade_ban_expiration
* @property {number|null} [accountid] CGCSystemMsg_GetAccountDetails_Response accountid
* @property {number|null} [suspension_end_time] CGCSystemMsg_GetAccountDetails_Response suspension_end_time
* @property {string|null} [currency] CGCSystemMsg_GetAccountDetails_Response currency
* @property {number|null} [steam_level] CGCSystemMsg_GetAccountDetails_Response steam_level
* @property {number|null} [friend_count] CGCSystemMsg_GetAccountDetails_Response friend_count
* @property {number|null} [account_creation_time] CGCSystemMsg_GetAccountDetails_Response account_creation_time
* @property {boolean|null} [is_steamguard_enabled] CGCSystemMsg_GetAccountDetails_Response is_steamguard_enabled
* @property {boolean|null} [is_phone_verified] CGCSystemMsg_GetAccountDetails_Response is_phone_verified
* @property {boolean|null} [is_two_factor_auth_enabled] CGCSystemMsg_GetAccountDetails_Response is_two_factor_auth_enabled
* @property {number|null} [two_factor_enabled_time] CGCSystemMsg_GetAccountDetails_Response two_factor_enabled_time
* @property {number|null} [phone_verification_time] CGCSystemMsg_GetAccountDetails_Response phone_verification_time
* @property {number|Long|null} [phone_id] CGCSystemMsg_GetAccountDetails_Response phone_id
* @property {boolean|null} [is_phone_identifying] CGCSystemMsg_GetAccountDetails_Response is_phone_identifying
* @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 {boolean|null} [has_accepted_china_ssa] CGCSystemMsg_GetAccountDetails_Response has_accepted_china_ssa
* @property {boolean|null} [is_banned_steam_china] CGCSystemMsg_GetAccountDetails_Response is_banned_steam_china
*/
/**
* 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
*/
function CGCSystemMsg_GetAccountDetails_Response(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CGCSystemMsg_GetAccountDetails_Response eresult_deprecated.
* @member {number} eresult_deprecated
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.eresult_deprecated = 2;
/**
* CGCSystemMsg_GetAccountDetails_Response account_name.
* @member {string} account_name
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.account_name = "";
/**
* CGCSystemMsg_GetAccountDetails_Response persona_name.
* @member {string} persona_name
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.persona_name = "";
/**
* CGCSystemMsg_GetAccountDetails_Response is_profile_public.
* @member {boolean} is_profile_public
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.is_profile_public = false;
/**
* CGCSystemMsg_GetAccountDetails_Response is_inventory_public.
* @member {boolean} is_inventory_public
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.is_inventory_public = false;
/**
* CGCSystemMsg_GetAccountDetails_Response is_vac_banned.
* @member {boolean} is_vac_banned
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.is_vac_banned = false;
/**
* CGCSystemMsg_GetAccountDetails_Response is_cyber_cafe.
* @member {boolean} is_cyber_cafe
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.is_cyber_cafe = false;
/**
* CGCSystemMsg_GetAccountDetails_Response is_school_account.
* @member {boolean} is_school_account
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.is_school_account = false;
/**
* CGCSystemMsg_GetAccountDetails_Response is_limited.
* @member {boolean} is_limited
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.is_limited = false;
/**
* CGCSystemMsg_GetAccountDetails_Response is_subscribed.
* @member {boolean} is_subscribed
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.is_subscribed = false;
/**
* CGCSystemMsg_GetAccountDetails_Response package.
* @member {number} package
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype["package"] = 0;
/**
* CGCSystemMsg_GetAccountDetails_Response is_free_trial_account.
* @member {boolean} is_free_trial_account
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.is_free_trial_account = false;
/**
* CGCSystemMsg_GetAccountDetails_Response free_trial_expiration.
* @member {number} free_trial_expiration
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.free_trial_expiration = 0;
/**
* CGCSystemMsg_GetAccountDetails_Response is_low_violence.
* @member {boolean} is_low_violence
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.is_low_violence = false;
/**
* CGCSystemMsg_GetAccountDetails_Response is_account_locked_down.
* @member {boolean} is_account_locked_down
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.is_account_locked_down = false;
/**
* CGCSystemMsg_GetAccountDetails_Response is_community_banned.
* @member {boolean} is_community_banned
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.is_community_banned = false;
/**
* CGCSystemMsg_GetAccountDetails_Response is_trade_banned.
* @member {boolean} is_trade_banned
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.is_trade_banned = false;
/**
* CGCSystemMsg_GetAccountDetails_Response trade_ban_expiration.
* @member {number} trade_ban_expiration
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.trade_ban_expiration = 0;
/**
* CGCSystemMsg_GetAccountDetails_Response accountid.
* @member {number} accountid
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.accountid = 0;
/**
* CGCSystemMsg_GetAccountDetails_Response suspension_end_time.
* @member {number} suspension_end_time
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.suspension_end_time = 0;
/**
* CGCSystemMsg_GetAccountDetails_Response currency.
* @member {string} currency
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.currency = "";
/**
* CGCSystemMsg_GetAccountDetails_Response steam_level.
* @member {number} steam_level
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.steam_level = 0;
/**
* CGCSystemMsg_GetAccountDetails_Response friend_count.
* @member {number} friend_count
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.friend_count = 0;
/**
* CGCSystemMsg_GetAccountDetails_Response account_creation_time.
* @member {number} account_creation_time
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.account_creation_time = 0;
/**
* CGCSystemMsg_GetAccountDetails_Response is_steamguard_enabled.
* @member {boolean} is_steamguard_enabled
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.is_steamguard_enabled = false;
/**
* CGCSystemMsg_GetAccountDetails_Response is_phone_verified.
* @member {boolean} is_phone_verified
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.is_phone_verified = false;
/**
* CGCSystemMsg_GetAccountDetails_Response is_two_factor_auth_enabled.
* @member {boolean} is_two_factor_auth_enabled
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.is_two_factor_auth_enabled = false;
/**
* CGCSystemMsg_GetAccountDetails_Response two_factor_enabled_time.
* @member {number} two_factor_enabled_time
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.two_factor_enabled_time = 0;
/**
* CGCSystemMsg_GetAccountDetails_Response phone_verification_time.
* @member {number} phone_verification_time
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.phone_verification_time = 0;
/**
* CGCSystemMsg_GetAccountDetails_Response phone_id.
* @member {number|Long} phone_id
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.phone_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
/**
* CGCSystemMsg_GetAccountDetails_Response is_phone_identifying.
* @member {boolean} is_phone_identifying
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.is_phone_identifying = false;
/**
* CGCSystemMsg_GetAccountDetails_Response rt_identity_linked.
* @member {number} rt_identity_linked
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.rt_identity_linked = 0;
/**
* CGCSystemMsg_GetAccountDetails_Response rt_birth_date.
* @member {number} rt_birth_date
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.rt_birth_date = 0;
/**
* CGCSystemMsg_GetAccountDetails_Response txn_country_code.
* @member {string} txn_country_code
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.txn_country_code = "";
/**
* CGCSystemMsg_GetAccountDetails_Response has_accepted_china_ssa.
* @member {boolean} has_accepted_china_ssa
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.has_accepted_china_ssa = false;
/**
* CGCSystemMsg_GetAccountDetails_Response is_banned_steam_china.
* @member {boolean} is_banned_steam_china
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.is_banned_steam_china = false;
/**
* Creates a new CGCSystemMsg_GetAccountDetails_Response instance using the specified properties.
* @function create
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @static
* @param {ICGCSystemMsg_GetAccountDetails_Response=} [properties] Properties to set
* @returns {CGCSystemMsg_GetAccountDetails_Response} CGCSystemMsg_GetAccountDetails_Response instance
*/
CGCSystemMsg_GetAccountDetails_Response.create = function create(properties) {
return new CGCSystemMsg_GetAccountDetails_Response(properties);
};
/**
* Encodes the specified CGCSystemMsg_GetAccountDetails_Response message. Does not implicitly {@link CGCSystemMsg_GetAccountDetails_Response.verify|verify} messages.
* @function encode
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @static
* @param {ICGCSystemMsg_GetAccountDetails_Response} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 2 =*/18).string(message.account_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"))
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"))
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"))
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"))
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"))
writer.uint32(/* id 9, wireType 0 =*/72).bool(message.is_school_account);
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"))
writer.uint32(/* id 11, wireType 0 =*/88).bool(message.is_subscribed);
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"))
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"))
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"))
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"))
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"))
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"))
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"))
writer.uint32(/* id 19, wireType 0 =*/152).uint32(message.trade_ban_expiration);
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"))
writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.suspension_end_time);
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"))
writer.uint32(/* id 23, wireType 0 =*/184).uint32(message.steam_level);
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"))
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"))
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"))
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"))
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"))
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"))
writer.uint32(/* id 31, wireType 0 =*/248).uint32(message.phone_verification_time);
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"))
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"))
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"))
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"))
writer.uint32(/* id 37, wireType 2 =*/298).string(message.txn_country_code);
if (message.has_accepted_china_ssa != null && Object.hasOwnProperty.call(message, "has_accepted_china_ssa"))
writer.uint32(/* id 38, wireType 0 =*/304).bool(message.has_accepted_china_ssa);
if (message.is_banned_steam_china != null && Object.hasOwnProperty.call(message, "is_banned_steam_china"))
writer.uint32(/* id 39, wireType 0 =*/312).bool(message.is_banned_steam_china);
return writer;
};
/**
* Encodes the specified CGCSystemMsg_GetAccountDetails_Response message, length delimited. Does not implicitly {@link CGCSystemMsg_GetAccountDetails_Response.verify|verify} messages.
* @function encodeDelimited
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @static
* @param {ICGCSystemMsg_GetAccountDetails_Response} 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();
};
/**
* Decodes a CGCSystemMsg_GetAccountDetails_Response message from the specified reader or buffer.
* @function decode
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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;
}
case 38: {
message.has_accepted_china_ssa = reader.bool();
break;
}
case 39: {
message.is_banned_steam_china = reader.bool();
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a CGCSystemMsg_GetAccountDetails_Response message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CGCSystemMsg_GetAccountDetails_Response} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CGCSystemMsg_GetAccountDetails_Response message.
* @function verify
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @static
* @param {Object.<string,*>} 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) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.eresult_deprecated != null && message.hasOwnProperty("eresult_deprecated"))
if (!$util.isInteger(message.eresult_deprecated))
return "eresult_deprecated: integer expected";
if (message.account_name != null && message.hasOwnProperty("account_name"))
if (!$util.isString(message.account_name))
return "account_name: string expected";
if (message.persona_name != null && message.hasOwnProperty("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 (typeof message.is_profile_public !== "boolean")
return "is_profile_public: boolean expected";
if (message.is_inventory_public != null && message.hasOwnProperty("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 (typeof message.is_vac_banned !== "boolean")
return "is_vac_banned: boolean expected";
if (message.is_cyber_cafe != null && message.hasOwnProperty("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 (typeof message.is_school_account !== "boolean")
return "is_school_account: boolean expected";
if (message.is_limited != null && message.hasOwnProperty("is_limited"))
if (typeof message.is_limited !== "boolean")
return "is_limited: boolean expected";
if (message.is_subscribed != null && message.hasOwnProperty("is_subscribed"))
if (typeof message.is_subscribed !== "boolean")
return "is_subscribed: boolean expected";
if (message["package"] != null && message.hasOwnProperty("package"))
if (!$util.isInteger(message["package"]))
return "package: integer expected";
if (message.is_free_trial_account != null && message.hasOwnProperty("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 (!$util.isInteger(message.free_trial_expiration))
return "free_trial_expiration: integer expected";
if (message.is_low_violence != null && message.hasOwnProperty("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 (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 (typeof message.is_community_banned !== "boolean")
return "is_community_banned: boolean expected";
if (message.is_trade_banned != null && message.hasOwnProperty("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 (!$util.isInteger(message.trade_ban_expiration))
return "trade_ban_expiration: integer expected";
if (message.accountid != null && message.hasOwnProperty("accountid"))
if (!$util.isInteger(message.accountid))
return "accountid: integer expected";
if (message.suspension_end_time != null && message.hasOwnProperty("suspension_end_time"))
if (!$util.isInteger(message.suspension_end_time))
return "suspension_end_time: integer expected";
if (message.currency != null && message.hasOwnProperty("currency"))
if (!$util.isString(message.currency))
return "currency: string expected";
if (message.steam_level != null && message.hasOwnProperty("steam_level"))
if (!$util.isInteger(message.steam_level))
return "steam_level: integer expected";
if (message.friend_count != null && message.hasOwnProperty("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 (!$util.isInteger(message.account_creation_time))
return "account_creation_time: integer expected";
if (message.is_steamguard_enabled != null && message.hasOwnProperty("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 (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 (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 (!$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 (!$util.isInteger(message.phone_verification_time))
return "phone_verification_time: integer expected";
if (message.phone_id != null && message.hasOwnProperty("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 (typeof message.is_phone_identifying !== "boolean")
return "is_phone_identifying: boolean expected";
if (message.rt_identity_linked != null && message.hasOwnProperty("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 (!$util.isInteger(message.rt_birth_date))
return "rt_birth_date: integer expected";
if (message.txn_country_code != null && message.hasOwnProperty("txn_country_code"))
if (!$util.isString(message.txn_country_code))
return "txn_country_code: string expected";
if (message.has_accepted_china_ssa != null && message.hasOwnProperty("has_accepted_china_ssa"))
if (typeof message.has_accepted_china_ssa !== "boolean")
return "has_accepted_china_ssa: boolean expected";
if (message.is_banned_steam_china != null && message.hasOwnProperty("is_banned_steam_china"))
if (typeof message.is_banned_steam_china !== "boolean")
return "is_banned_steam_china: boolean expected";
return null;
};
/**
* Creates a CGCSystemMsg_GetAccountDetails_Response message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CGCSystemMsg_GetAccountDetails_Response} CGCSystemMsg_GetAccountDetails_Response
*/
CGCSystemMsg_GetAccountDetails_Response.fromObject = function fromObject(object) {
if (object instanceof $root.CGCSystemMsg_GetAccountDetails_Response)
return object;
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);
if (object.persona_name != null)
message.persona_name = String(object.persona_name);
if (object.is_profile_public != null)
message.is_profile_public = Boolean(object.is_profile_public);
if (object.is_inventory_public != null)
message.is_inventory_public = Boolean(object.is_inventory_public);
if (object.is_vac_banned != null)
message.is_vac_banned = Boolean(object.is_vac_banned);
if (object.is_cyber_cafe != null)
message.is_cyber_cafe = Boolean(object.is_cyber_cafe);
if (object.is_school_account != null)
message.is_school_account = Boolean(object.is_school_account);
if (object.is_limited != null)
message.is_limited = Boolean(object.is_limited);
if (object.is_subscribed != null)
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);
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);
if (object.is_account_locked_down != null)
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);
if (object.is_trade_banned != null)
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)
message.accountid = object.accountid >>> 0;
if (object.suspension_end_time != null)
message.suspension_end_time = object.suspension_end_time >>> 0;
if (object.currency != null)
message.currency = String(object.currency);
if (object.steam_level != null)
message.steam_level = object.steam_level >>> 0;
if (object.friend_count != null)
message.friend_count = object.friend_count >>> 0;
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);
if (object.is_phone_verified != null)
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);
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;
else if (typeof object.phone_id === "string")
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);
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);
if (object.has_accepted_china_ssa != null)
message.has_accepted_china_ssa = Boolean(object.has_accepted_china_ssa);
if (object.is_banned_steam_china != null)
message.is_banned_steam_china = Boolean(object.is_banned_steam_china);
return message;
};
/**
* Creates a plain object from a CGCSystemMsg_GetAccountDetails_Response message. Also converts values to other types if specified.
* @function toObject
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @static
* @param {CGCSystemMsg_GetAccountDetails_Response} message CGCSystemMsg_GetAccountDetails_Response
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CGCSystemMsg_GetAccountDetails_Response.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.eresult_deprecated = 2;
object.account_name = "";
object.persona_name = "";
object.is_profile_public = false;
object.is_inventory_public = false;
object.is_vac_banned = false;
object.is_cyber_cafe = false;
object.is_school_account = false;
object.is_limited = false;
object.is_subscribed = false;
object["package"] = 0;
object.is_free_trial_account = false;
object.free_trial_expiration = 0;
object.is_low_violence = false;
object.is_account_locked_down = false;
object.is_community_banned = false;
object.is_trade_banned = false;
object.trade_ban_expiration = 0;
object.accountid = 0;
object.suspension_end_time = 0;
object.currency = "";
object.steam_level = 0;
object.friend_count = 0;
object.account_creation_time = 0;
object.is_steamguard_enabled = false;
object.is_phone_verified = false;
object.is_two_factor_auth_enabled = false;
object.two_factor_enabled_time = 0;
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;
} else
object.phone_id = options.longs === String ? "0" : 0;
object.is_phone_identifying = false;
object.rt_identity_linked = 0;
object.rt_birth_date = 0;
object.txn_country_code = "";
object.has_accepted_china_ssa = false;
object.is_banned_steam_china = false;
}
if (message.eresult_deprecated != null && message.hasOwnProperty("eresult_deprecated"))
object.eresult_deprecated = message.eresult_deprecated;
if (message.account_name != null && message.hasOwnProperty("account_name"))
object.account_name = message.account_name;
if (message.persona_name != null && message.hasOwnProperty("persona_name"))
object.persona_name = message.persona_name;
if (message.is_profile_public != null && message.hasOwnProperty("is_profile_public"))
object.is_profile_public = message.is_profile_public;
if (message.is_inventory_public != null && message.hasOwnProperty("is_inventory_public"))
object.is_inventory_public = message.is_inventory_public;
if (message.is_vac_banned != null && message.hasOwnProperty("is_vac_banned"))
object.is_vac_banned = message.is_vac_banned;
if (message.is_cyber_cafe != null && message.hasOwnProperty("is_cyber_cafe"))
object.is_cyber_cafe = message.is_cyber_cafe;
if (message.is_school_account != null && message.hasOwnProperty("is_school_account"))
object.is_school_account = message.is_school_account;
if (message.is_limited != null && message.hasOwnProperty("is_limited"))
object.is_limited = message.is_limited;
if (message.is_subscribed != null && message.hasOwnProperty("is_subscribed"))
object.is_subscribed = message.is_subscribed;
if (message["package"] != null && message.hasOwnProperty("package"))
object["package"] = message["package"];
if (message.is_free_trial_account != null && message.hasOwnProperty("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"))
object.free_trial_expiration = message.free_trial_expiration;
if (message.is_low_violence != null && message.hasOwnProperty("is_low_violence"))
object.is_low_violence = message.is_low_violence;
if (message.is_account_locked_down != null && message.hasOwnProperty("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"))
object.is_community_banned = message.is_community_banned;
if (message.is_trade_banned != null && message.hasOwnProperty("is_trade_banned"))
object.is_trade_banned = message.is_trade_banned;
if (message.trade_ban_expiration != null && message.hasOwnProperty("trade_ban_expiration"))
object.trade_ban_expiration = message.trade_ban_expiration;
if (message.accountid != null && message.hasOwnProperty("accountid"))
object.accountid = message.accountid;
if (message.suspension_end_time != null && message.hasOwnProperty("suspension_end_time"))
object.suspension_end_time = message.suspension_end_time;
if (message.currency != null && message.hasOwnProperty("currency"))
object.currency = message.currency;
if (message.steam_level != null && message.hasOwnProperty("steam_level"))
object.steam_level = message.steam_level;
if (message.friend_count != null && message.hasOwnProperty("friend_count"))
object.friend_count = message.friend_count;
if (message.account_creation_time != null && message.hasOwnProperty("account_creation_time"))
object.account_creation_time = message.account_creation_time;
if (message.is_steamguard_enabled != null && message.hasOwnProperty("is_steamguard_enabled"))
object.is_steamguard_enabled = message.is_steamguard_enabled;
if (message.is_phone_verified != null && message.hasOwnProperty("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"))
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"))
object.two_factor_enabled_time = message.two_factor_enabled_time;
if (message.phone_verification_time != null && message.hasOwnProperty("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;
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.is_phone_identifying = message.is_phone_identifying;
if (message.rt_identity_linked != null && message.hasOwnProperty("rt_identity_linked"))
object.rt_identity_linked = message.rt_identity_linked;
if (message.rt_birth_date != null && message.hasOwnProperty("rt_birth_date"))
object.rt_birth_date = message.rt_birth_date;
if (message.txn_country_code != null && message.hasOwnProperty("txn_country_code"))
object.txn_country_code = message.txn_country_code;
if (message.has_accepted_china_ssa != null && message.hasOwnProperty("has_accepted_china_ssa"))
object.has_accepted_china_ssa = message.has_accepted_china_ssa;
if (message.is_banned_steam_china != null && message.hasOwnProperty("is_banned_steam_china"))
object.is_banned_steam_china = message.is_banned_steam_china;
return object;
};
/**
* Converts this CGCSystemMsg_GetAccountDetails_Response to JSON.
* @function toJSON
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @instance
* @returns {Object.<string,*>} JSON object
*/
CGCSystemMsg_GetAccountDetails_Response.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CGCSystemMsg_GetAccountDetails_Response
* @function getTypeUrl
* @memberof CGCSystemMsg_GetAccountDetails_Response
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CGCSystemMsg_GetAccountDetails_Response.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CGCSystemMsg_GetAccountDetails_Response";
};
return CGCSystemMsg_GetAccountDetails_Response;
})();
$root.CMsgGCGetPersonaNames = (function() {
/**
* Properties of a CMsgGCGetPersonaNames.
* @exports ICMsgGCGetPersonaNames
* @interface ICMsgGCGetPersonaNames
* @property {Array.<number|Long>|null} [steamids] CMsgGCGetPersonaNames steamids
*/
/**
* Constructs a new CMsgGCGetPersonaNames.
* @exports CMsgGCGetPersonaNames
* @classdesc Represents a CMsgGCGetPersonaNames.
* @implements ICMsgGCGetPersonaNames
* @constructor
* @param {ICMsgGCGetPersonaNames=} [properties] Properties to set
*/
function CMsgGCGetPersonaNames(properties) {
this.steamids = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgGCGetPersonaNames steamids.
* @member {Array.<number|Long>} steamids
* @memberof CMsgGCGetPersonaNames
* @instance
*/
CMsgGCGetPersonaNames.prototype.steamids = $util.emptyArray;
/**
* Creates a new CMsgGCGetPersonaNames instance using the specified properties.
* @function create
* @memberof CMsgGCGetPersonaNames
* @static
* @param {ICMsgGCGetPersonaNames=} [properties] Properties to set
* @returns {CMsgGCGetPersonaNames} CMsgGCGetPersonaNames instance
*/
CMsgGCGetPersonaNames.create = function create(properties) {
return new CMsgGCGetPersonaNames(properties);
};
/**
* Encodes the specified CMsgGCGetPersonaNames message. Does not implicitly {@link CMsgGCGetPersonaNames.verify|verify} messages.
* @function encode
* @memberof CMsgGCGetPersonaNames
* @static
* @param {ICMsgGCGetPersonaNames} 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) {
if (!writer)
writer = $Writer.create();
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]);
return writer;
};
/**
* Encodes the specified CMsgGCGetPersonaNames message, length delimited. Does not implicitly {@link CMsgGCGetPersonaNames.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCGetPersonaNames
* @static
* @param {ICMsgGCGetPersonaNames} 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();
};
/**
* Decodes a CMsgGCGetPersonaNames message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCGetPersonaNames
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgGCGetPersonaNames} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgGCGetPersonaNames message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCGetPersonaNames
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCGetPersonaNames} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgGCGetPersonaNames message.
* @function verify
* @memberof CMsgGCGetPersonaNames
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgGCGetPersonaNames.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.steamids != null && message.hasOwnProperty("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)))
return "steamids: integer|Long[] expected";
}
return null;
};
/**
* Creates a CMsgGCGetPersonaNames message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCGetPersonaNames
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCGetPersonaNames} CMsgGCGetPersonaNames
*/
CMsgGCGetPersonaNames.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCGetPersonaNames)
return object;
var message = new $root.CMsgGCGetPersonaNames();
if (object.steamids) {
if (!Array.isArray(object.steamids))
throw TypeError(".CMsgGCGetPersonaNames.steamids: array expected");
message.steamids = [];
for (var i = 0; i < object.steamids.length; ++i)
if ($util.Long)
(message.steamids[i] = $util.Long.fromValue(object.steamids[i])).unsigned = false;
else if (typeof object.steamids[i] === "string")
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();
}
return message;
};
/**
* Creates a plain object from a CMsgGCGetPersonaNames message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCGetPersonaNames
* @static
* @param {CMsgGCGetPersonaNames} message CMsgGCGetPersonaNames
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgGCGetPersonaNames.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.steamids = [];
if (message.steamids && message.steamids.length) {
object.steamids = [];
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];
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];
}
return object;
};
/**
* Converts this CMsgGCGetPersonaNames to JSON.
* @function toJSON
* @memberof CMsgGCGetPersonaNames
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgGCGetPersonaNames.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgGCGetPersonaNames
* @function getTypeUrl
* @memberof CMsgGCGetPersonaNames
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgGCGetPersonaNames.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCGetPersonaNames";
};
return CMsgGCGetPersonaNames;
})();
$root.CMsgGCGetPersonaNames_Response = (function() {
/**
* Properties of a CMsgGCGetPersonaNames_Response.
* @exports ICMsgGCGetPersonaNames_Response
* @interface ICMsgGCGetPersonaNames_Response
* @property {Array.<CMsgGCGetPersonaNames_Response.IPersonaName>|null} [succeeded_lookups] CMsgGCGetPersonaNames_Response succeeded_lookups
* @property {Array.<number|Long>|null} [failed_lookup_steamids] CMsgGCGetPersonaNames_Response failed_lookup_steamids
*/
/**
* Constructs a new CMsgGCGetPersonaNames_Response.
* @exports CMsgGCGetPersonaNames_Response
* @classdesc Represents a CMsgGCGetPersonaNames_Response.
* @implements ICMsgGCGetPersonaNames_Response
* @constructor
* @param {ICMsgGCGetPersonaNames_Response=} [properties] Properties to set
*/
function CMsgGCGetPersonaNames_Response(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)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgGCGetPersonaNames_Response succeeded_lookups.
* @member {Array.<CMsgGCGetPersonaNames_Response.IPersonaName>} succeeded_lookups
* @memberof CMsgGCGetPersonaNames_Response
* @instance
*/
CMsgGCGetPersonaNames_Response.prototype.succeeded_lookups = $util.emptyArray;
/**
* CMsgGCGetPersonaNames_Response failed_lookup_steamids.
* @member {Array.<number|Long>} failed_lookup_steamids
* @memberof CMsgGCGetPersonaNames_Response
* @instance
*/
CMsgGCGetPersonaNames_Response.prototype.failed_lookup_steamids = $util.emptyArray;
/**
* Creates a new CMsgGCGetPersonaNames_Response instance using the specified properties.
* @function create
* @memberof CMsgGCGetPersonaNames_Response
* @static
* @param {ICMsgGCGetPersonaNames_Response=} [properties] Properties to set
* @returns {CMsgGCGetPersonaNames_Response} CMsgGCGetPersonaNames_Response instance
*/
CMsgGCGetPersonaNames_Response.create = function create(properties) {
return new CMsgGCGetPersonaNames_Response(properties);
};
/**
* Encodes the specified CMsgGCGetPersonaNames_Response message. Does not implicitly {@link CMsgGCGetPersonaNames_Response.verify|verify} messages.
* @function encode
* @memberof CMsgGCGetPersonaNames_Response
* @static
* @param {ICMsgGCGetPersonaNames_Response} 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) {
if (!writer)
writer = $Writer.create();
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();
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]);
return writer;
};
/**
* Encodes the specified CMsgGCGetPersonaNames_Response message, length delimited. Does not implicitly {@link CMsgGCGetPersonaNames_Response.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCGetPersonaNames_Response
* @static
* @param {ICMsgGCGetPersonaNames_Response} 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();
};
/**
* Decodes a CMsgGCGetPersonaNames_Response message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCGetPersonaNames_Response
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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()));
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
message.failed_lookup_steamids.push(reader.fixed64());
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a CMsgGCGetPersonaNames_Response message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCGetPersonaNames_Response
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCGetPersonaNames_Response} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgGCGetPersonaNames_Response message.
* @function verify
* @memberof CMsgGCGetPersonaNames_Response
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgGCGetPersonaNames_Response.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.succeeded_lookups != null && message.hasOwnProperty("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]);
if (error)
return "succeeded_lookups." + error;
}
}
if (message.failed_lookup_steamids != null && message.hasOwnProperty("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)))
return "failed_lookup_steamids: integer|Long[] expected";
}
return null;
};
/**
* Creates a CMsgGCGetPersonaNames_Response message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCGetPersonaNames_Response
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCGetPersonaNames_Response} CMsgGCGetPersonaNames_Response
*/
CMsgGCGetPersonaNames_Response.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCGetPersonaNames_Response)
return object;
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 = [];
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 (object.failed_lookup_steamids) {
if (!Array.isArray(object.failed_lookup_steamids))
throw TypeError(".CMsgGCGetPersonaNames_Response.failed_lookup_steamids: array expected");
message.failed_lookup_steamids = [];
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;
else if (typeof object.failed_lookup_steamids[i] === "string")
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();
}
return message;
};
/**
* Creates a plain object from a CMsgGCGetPersonaNames_Response message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCGetPersonaNames_Response
* @static
* @param {CMsgGCGetPersonaNames_Response} message CMsgGCGetPersonaNames_Response
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgGCGetPersonaNames_Response.toObject = function toObject(message, options) {
if (!options)
options = {};
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 = [];
for (var j = 0; j < message.succeeded_lookups.length; ++j)
object.succeeded_lookups[j] = $root.CMsgGCGetPersonaNames_Response.PersonaName.toObject(message.succeeded_lookups[j], options);
}
if (message.failed_lookup_steamids && message.failed_lookup_steamids.length) {
object.failed_lookup_steamids = [];
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];
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];
}
return object;
};
/**
* Converts this CMsgGCGetPersonaNames_Response to JSON.
* @function toJSON
* @memberof CMsgGCGetPersonaNames_Response
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgGCGetPersonaNames_Response.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgGCGetPersonaNames_Response
* @function getTypeUrl
* @memberof CMsgGCGetPersonaNames_Response
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgGCGetPersonaNames_Response.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCGetPersonaNames_Response";
};
CMsgGCGetPersonaNames_Response.PersonaName = (function() {
/**
* Properties of a PersonaName.
* @memberof CMsgGCGetPersonaNames_Response
* @interface IPersonaName
* @property {number|Long|null} [steamid] PersonaName steamid
* @property {string|null} [persona_name] PersonaName persona_name
*/
/**
* Constructs a new PersonaName.
* @memberof CMsgGCGetPersonaNames_Response
* @classdesc Represents a PersonaName.
* @implements IPersonaName
* @constructor
* @param {CMsgGCGetPersonaNames_Response.IPersonaName=} [properties] Properties to set
*/
function PersonaName(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* PersonaName steamid.
* @member {number|Long} steamid
* @memberof CMsgGCGetPersonaNames_Response.PersonaName
* @instance
*/
PersonaName.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* PersonaName persona_name.
* @member {string} persona_name
* @memberof CMsgGCGetPersonaNames_Response.PersonaName
* @instance
*/
PersonaName.prototype.persona_name = "";
/**
* Creates a new PersonaName instance using the specified properties.
* @function create
* @memberof CMsgGCGetPersonaNames_Response.PersonaName
* @static
* @param {CMsgGCGetPersonaNames_Response.IPersonaName=} [properties] Properties to set
* @returns {CMsgGCGetPersonaNames_Response.PersonaName} PersonaName instance
*/
PersonaName.create = function create(properties) {
return new PersonaName(properties);
};
/**
* Encodes the specified PersonaName message. Does not implicitly {@link CMsgGCGetPersonaNames_Response.PersonaName.verify|verify} messages.
* @function encode
* @memberof CMsgGCGetPersonaNames_Response.PersonaName
* @static
* @param {CMsgGCGetPersonaNames_Response.IPersonaName} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 2 =*/18).string(message.persona_name);
return writer;
};
/**
* Encodes the specified PersonaName message, length delimited. Does not implicitly {@link CMsgGCGetPersonaNames_Response.PersonaName.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCGetPersonaNames_Response.PersonaName
* @static
* @param {CMsgGCGetPersonaNames_Response.IPersonaName} 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();
};
/**
* Decodes a PersonaName message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCGetPersonaNames_Response.PersonaName
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a PersonaName message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCGetPersonaNames_Response.PersonaName
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCGetPersonaNames_Response.PersonaName} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a PersonaName message.
* @function verify
* @memberof CMsgGCGetPersonaNames_Response.PersonaName
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
PersonaName.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.steamid != null && message.hasOwnProperty("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 (!$util.isString(message.persona_name))
return "persona_name: string expected";
return null;
};
/**
* Creates a PersonaName message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCGetPersonaNames_Response.PersonaName
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCGetPersonaNames_Response.PersonaName} PersonaName
*/
PersonaName.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCGetPersonaNames_Response.PersonaName)
return object;
var message = new $root.CMsgGCGetPersonaNames_Response.PersonaName();
if (object.steamid != null)
if ($util.Long)
(message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false;
else if (typeof object.steamid === "string")
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();
if (object.persona_name != null)
message.persona_name = String(object.persona_name);
return message;
};
/**
* Creates a plain object from a PersonaName message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCGetPersonaNames_Response.PersonaName
* @static
* @param {CMsgGCGetPersonaNames_Response.PersonaName} message PersonaName
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
PersonaName.toObject = function toObject(message, options) {
if (!options)
options = {};
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;
} else
object.steamid = options.longs === String ? "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;
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.persona_name = message.persona_name;
return object;
};
/**
* Converts this PersonaName to JSON.
* @function toJSON
* @memberof CMsgGCGetPersonaNames_Response.PersonaName
* @instance
* @returns {Object.<string,*>} JSON object
*/
PersonaName.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for PersonaName
* @function getTypeUrl
* @memberof CMsgGCGetPersonaNames_Response.PersonaName
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
PersonaName.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCGetPersonaNames_Response.PersonaName";
};
return PersonaName;
})();
return CMsgGCGetPersonaNames_Response;
})();
$root.CMsgGCCheckFriendship = (function() {
/**
* Properties of a CMsgGCCheckFriendship.
* @exports ICMsgGCCheckFriendship
* @interface ICMsgGCCheckFriendship
* @property {number|Long|null} [steamid_left] CMsgGCCheckFriendship steamid_left
* @property {number|Long|null} [steamid_right] CMsgGCCheckFriendship steamid_right
*/
/**
* Constructs a new CMsgGCCheckFriendship.
* @exports CMsgGCCheckFriendship
* @classdesc Represents a CMsgGCCheckFriendship.
* @implements ICMsgGCCheckFriendship
* @constructor
* @param {ICMsgGCCheckFriendship=} [properties] Properties to set
*/
function CMsgGCCheckFriendship(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgGCCheckFriendship steamid_left.
* @member {number|Long} steamid_left
* @memberof CMsgGCCheckFriendship
* @instance
*/
CMsgGCCheckFriendship.prototype.steamid_left = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* CMsgGCCheckFriendship steamid_right.
* @member {number|Long} steamid_right
* @memberof CMsgGCCheckFriendship
* @instance
*/
CMsgGCCheckFriendship.prototype.steamid_right = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* Creates a new CMsgGCCheckFriendship instance using the specified properties.
* @function create
* @memberof CMsgGCCheckFriendship
* @static
* @param {ICMsgGCCheckFriendship=} [properties] Properties to set
* @returns {CMsgGCCheckFriendship} CMsgGCCheckFriendship instance
*/
CMsgGCCheckFriendship.create = function create(properties) {
return new CMsgGCCheckFriendship(properties);
};
/**
* Encodes the specified CMsgGCCheckFriendship message. Does not implicitly {@link CMsgGCCheckFriendship.verify|verify} messages.
* @function encode
* @memberof CMsgGCCheckFriendship
* @static
* @param {ICMsgGCCheckFriendship} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.steamid_right);
return writer;
};
/**
* Encodes the specified CMsgGCCheckFriendship message, length delimited. Does not implicitly {@link CMsgGCCheckFriendship.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCCheckFriendship
* @static
* @param {ICMsgGCCheckFriendship} 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();
};
/**
* Decodes a CMsgGCCheckFriendship message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCCheckFriendship
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgGCCheckFriendship} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgGCCheckFriendship message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCCheckFriendship
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCCheckFriendship} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgGCCheckFriendship message.
* @function verify
* @memberof CMsgGCCheckFriendship
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgGCCheckFriendship.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.steamid_left != null && message.hasOwnProperty("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 (!$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;
};
/**
* Creates a CMsgGCCheckFriendship message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCCheckFriendship
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCCheckFriendship} CMsgGCCheckFriendship
*/
CMsgGCCheckFriendship.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCCheckFriendship)
return object;
var message = new $root.CMsgGCCheckFriendship();
if (object.steamid_left != null)
if ($util.Long)
(message.steamid_left = $util.Long.fromValue(object.steamid_left)).unsigned = false;
else if (typeof object.steamid_left === "string")
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();
if (object.steamid_right != null)
if ($util.Long)
(message.steamid_right = $util.Long.fromValue(object.steamid_right)).unsigned = false;
else if (typeof object.steamid_right === "string")
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();
return message;
};
/**
* Creates a plain object from a CMsgGCCheckFriendship message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCCheckFriendship
* @static
* @param {CMsgGCCheckFriendship} message CMsgGCCheckFriendship
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgGCCheckFriendship.toObject = function toObject(message, options) {
if (!options)
options = {};
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;
} else
object.steamid_left = options.longs === String ? "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;
} else
object.steamid_right = options.longs === String ? "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;
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;
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;
return object;
};
/**
* Converts this CMsgGCCheckFriendship to JSON.
* @function toJSON
* @memberof CMsgGCCheckFriendship
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgGCCheckFriendship.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgGCCheckFriendship
* @function getTypeUrl
* @memberof CMsgGCCheckFriendship
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgGCCheckFriendship.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCCheckFriendship";
};
return CMsgGCCheckFriendship;
})();
$root.CMsgGCCheckFriendship_Response = (function() {
/**
* Properties of a CMsgGCCheckFriendship_Response.
* @exports ICMsgGCCheckFriendship_Response
* @interface ICMsgGCCheckFriendship_Response
* @property {boolean|null} [success] CMsgGCCheckFriendship_Response success
* @property {boolean|null} [found_friendship] CMsgGCCheckFriendship_Response found_friendship
*/
/**
* Constructs a new CMsgGCCheckFriendship_Response.
* @exports CMsgGCCheckFriendship_Response
* @classdesc Represents a CMsgGCCheckFriendship_Response.
* @implements ICMsgGCCheckFriendship_Response
* @constructor
* @param {ICMsgGCCheckFriendship_Response=} [properties] Properties to set
*/
function CMsgGCCheckFriendship_Response(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgGCCheckFriendship_Response success.
* @member {boolean} success
* @memberof CMsgGCCheckFriendship_Response
* @instance
*/
CMsgGCCheckFriendship_Response.prototype.success = false;
/**
* CMsgGCCheckFriendship_Response found_friendship.
* @member {boolean} found_friendship
* @memberof CMsgGCCheckFriendship_Response
* @instance
*/
CMsgGCCheckFriendship_Response.prototype.found_friendship = false;
/**
* Creates a new CMsgGCCheckFriendship_Response instance using the specified properties.
* @function create
* @memberof CMsgGCCheckFriendship_Response
* @static
* @param {ICMsgGCCheckFriendship_Response=} [properties] Properties to set
* @returns {CMsgGCCheckFriendship_Response} CMsgGCCheckFriendship_Response instance
*/
CMsgGCCheckFriendship_Response.create = function create(properties) {
return new CMsgGCCheckFriendship_Response(properties);
};
/**
* Encodes the specified CMsgGCCheckFriendship_Response message. Does not implicitly {@link CMsgGCCheckFriendship_Response.verify|verify} messages.
* @function encode
* @memberof CMsgGCCheckFriendship_Response
* @static
* @param {ICMsgGCCheckFriendship_Response} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 0 =*/16).bool(message.found_friendship);
return writer;
};
/**
* Encodes the specified CMsgGCCheckFriendship_Response message, length delimited. Does not implicitly {@link CMsgGCCheckFriendship_Response.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCCheckFriendship_Response
* @static
* @param {ICMsgGCCheckFriendship_Response} 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();
};
/**
* Decodes a CMsgGCCheckFriendship_Response message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCCheckFriendship_Response
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgGCCheckFriendship_Response message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCCheckFriendship_Response
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCCheckFriendship_Response} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgGCCheckFriendship_Response message.
* @function verify
* @memberof CMsgGCCheckFriendship_Response
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgGCCheckFriendship_Response.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.success != null && message.hasOwnProperty("success"))
if (typeof message.success !== "boolean")
return "success: boolean expected";
if (message.found_friendship != null && message.hasOwnProperty("found_friendship"))
if (typeof message.found_friendship !== "boolean")
return "found_friendship: boolean expected";
return null;
};
/**
* Creates a CMsgGCCheckFriendship_Response message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCCheckFriendship_Response
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCCheckFriendship_Response} CMsgGCCheckFriendship_Response
*/
CMsgGCCheckFriendship_Response.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCCheckFriendship_Response)
return object;
var message = new $root.CMsgGCCheckFriendship_Response();
if (object.success != null)
message.success = Boolean(object.success);
if (object.found_friendship != null)
message.found_friendship = Boolean(object.found_friendship);
return message;
};
/**
* Creates a plain object from a CMsgGCCheckFriendship_Response message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCCheckFriendship_Response
* @static
* @param {CMsgGCCheckFriendship_Response} message CMsgGCCheckFriendship_Response
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgGCCheckFriendship_Response.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.success = false;
object.found_friendship = false;
}
if (message.success != null && message.hasOwnProperty("success"))
object.success = message.success;
if (message.found_friendship != null && message.hasOwnProperty("found_friendship"))
object.found_friendship = message.found_friendship;
return object;
};
/**
* Converts this CMsgGCCheckFriendship_Response to JSON.
* @function toJSON
* @memberof CMsgGCCheckFriendship_Response
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgGCCheckFriendship_Response.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgGCCheckFriendship_Response
* @function getTypeUrl
* @memberof CMsgGCCheckFriendship_Response
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgGCCheckFriendship_Response.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCCheckFriendship_Response";
};
return CMsgGCCheckFriendship_Response;
})();
$root.CMsgGCMsgMasterSetDirectory = (function() {
/**
* Properties of a CMsgGCMsgMasterSetDirectory.
* @exports ICMsgGCMsgMasterSetDirectory
* @interface ICMsgGCMsgMasterSetDirectory
* @property {number|null} [master_dir_index] CMsgGCMsgMasterSetDirectory master_dir_index
* @property {Array.<CMsgGCMsgMasterSetDirectory.ISubGC>|null} [dir] CMsgGCMsgMasterSetDirectory dir
*/
/**
* Constructs a new CMsgGCMsgMasterSetDirectory.
* @exports CMsgGCMsgMasterSetDirectory
* @classdesc Represents a CMsgGCMsgMasterSetDirectory.
* @implements ICMsgGCMsgMasterSetDirectory
* @constructor
* @param {ICMsgGCMsgMasterSetDirectory=} [properties] Properties to set
*/
function CMsgGCMsgMasterSetDirectory(properties) {
this.dir = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgGCMsgMasterSetDirectory master_dir_index.
* @member {number} master_dir_index
* @memberof CMsgGCMsgMasterSetDirectory
* @instance
*/
CMsgGCMsgMasterSetDirectory.prototype.master_dir_index = 0;
/**
* CMsgGCMsgMasterSetDirectory dir.
* @member {Array.<CMsgGCMsgMasterSetDirectory.ISubGC>} dir
* @memberof CMsgGCMsgMasterSetDirectory
* @instance
*/
CMsgGCMsgMasterSetDirectory.prototype.dir = $util.emptyArray;
/**
* Creates a new CMsgGCMsgMasterSetDirectory instance using the specified properties.
* @function create
* @memberof CMsgGCMsgMasterSetDirectory
* @static
* @param {ICMsgGCMsgMasterSetDirectory=} [properties] Properties to set
* @returns {CMsgGCMsgMasterSetDirectory} CMsgGCMsgMasterSetDirectory instance
*/
CMsgGCMsgMasterSetDirectory.create = function create(properties) {
return new CMsgGCMsgMasterSetDirectory(properties);
};
/**
* Encodes the specified CMsgGCMsgMasterSetDirectory message. Does not implicitly {@link CMsgGCMsgMasterSetDirectory.verify|verify} messages.
* @function encode
* @memberof CMsgGCMsgMasterSetDirectory
* @static
* @param {ICMsgGCMsgMasterSetDirectory} 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) {
if (!writer)
writer = $Writer.create();
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();
return writer;
};
/**
* Encodes the specified CMsgGCMsgMasterSetDirectory message, length delimited. Does not implicitly {@link CMsgGCMsgMasterSetDirectory.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCMsgMasterSetDirectory
* @static
* @param {ICMsgGCMsgMasterSetDirectory} 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();
};
/**
* Decodes a CMsgGCMsgMasterSetDirectory message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCMsgMasterSetDirectory
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgGCMsgMasterSetDirectory} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgGCMsgMasterSetDirectory message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCMsgMasterSetDirectory
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCMsgMasterSetDirectory} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgGCMsgMasterSetDirectory message.
* @function verify
* @memberof CMsgGCMsgMasterSetDirectory
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgGCMsgMasterSetDirectory.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.master_dir_index != null && message.hasOwnProperty("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))
return "dir: array expected";
for (var i = 0; i < message.dir.length; ++i) {
var error = $root.CMsgGCMsgMasterSetDirectory.SubGC.verify(message.dir[i]);
if (error)
return "dir." + error;
}
}
return null;
};
/**
* Creates a CMsgGCMsgMasterSetDirectory message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCMsgMasterSetDirectory
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCMsgMasterSetDirectory} CMsgGCMsgMasterSetDirectory
*/
CMsgGCMsgMasterSetDirectory.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCMsgMasterSetDirectory)
return object;
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 = [];
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]);
}
}
return message;
};
/**
* Creates a plain object from a CMsgGCMsgMasterSetDirectory message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCMsgMasterSetDirectory
* @static
* @param {CMsgGCMsgMasterSetDirectory} message CMsgGCMsgMasterSetDirectory
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgGCMsgMasterSetDirectory.toObject = function toObject(message, options) {
if (!options)
options = {};
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"))
object.master_dir_index = message.master_dir_index;
if (message.dir && message.dir.length) {
object.dir = [];
for (var j = 0; j < message.dir.length; ++j)
object.dir[j] = $root.CMsgGCMsgMasterSetDirectory.SubGC.toObject(message.dir[j], options);
}
return object;
};
/**
* Converts this CMsgGCMsgMasterSetDirectory to JSON.
* @function toJSON
* @memberof CMsgGCMsgMasterSetDirectory
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgGCMsgMasterSetDirectory.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgGCMsgMasterSetDirectory
* @function getTypeUrl
* @memberof CMsgGCMsgMasterSetDirectory
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgGCMsgMasterSetDirectory.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCMsgMasterSetDirectory";
};
CMsgGCMsgMasterSetDirectory.SubGC = (function() {
/**
* Properties of a SubGC.
* @memberof CMsgGCMsgMasterSetDirectory
* @interface ISubGC
* @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
*/
/**
* Constructs a new SubGC.
* @memberof CMsgGCMsgMasterSetDirectory
* @classdesc Represents a SubGC.
* @implements ISubGC
* @constructor
* @param {CMsgGCMsgMasterSetDirectory.ISubGC=} [properties] Properties to set
*/
function SubGC(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* SubGC dir_index.
* @member {number} dir_index
* @memberof CMsgGCMsgMasterSetDirectory.SubGC
* @instance
*/
SubGC.prototype.dir_index = 0;
/**
* SubGC name.
* @member {string} name
* @memberof CMsgGCMsgMasterSetDirectory.SubGC
* @instance
*/
SubGC.prototype.name = "";
/**
* SubGC box.
* @member {string} box
* @memberof CMsgGCMsgMasterSetDirectory.SubGC
* @instance
*/
SubGC.prototype.box = "";
/**
* SubGC command_line.
* @member {string} command_line
* @memberof CMsgGCMsgMasterSetDirectory.SubGC
* @instance
*/
SubGC.prototype.command_line = "";
/**
* SubGC gc_binary.
* @member {string} gc_binary
* @memberof CMsgGCMsgMasterSetDirectory.SubGC
* @instance
*/
SubGC.prototype.gc_binary = "";
/**
* Creates a new SubGC instance using the specified properties.
* @function create
* @memberof CMsgGCMsgMasterSetDirectory.SubGC
* @static
* @param {CMsgGCMsgMasterSetDirectory.ISubGC=} [properties] Properties to set
* @returns {CMsgGCMsgMasterSetDirectory.SubGC} SubGC instance
*/
SubGC.create = function create(properties) {
return new SubGC(properties);
};
/**
* Encodes the specified SubGC message. Does not implicitly {@link CMsgGCMsgMasterSetDirectory.SubGC.verify|verify} messages.
* @function encode
* @memberof CMsgGCMsgMasterSetDirectory.SubGC
* @static
* @param {CMsgGCMsgMasterSetDirectory.ISubGC} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 2 =*/18).string(message.name);
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"))
writer.uint32(/* id 4, wireType 2 =*/34).string(message.command_line);
if (message.gc_binary != null && Object.hasOwnProperty.call(message, "gc_binary"))
writer.uint32(/* id 5, wireType 2 =*/42).string(message.gc_binary);
return writer;
};
/**
* Encodes the specified SubGC message, length delimited. Does not implicitly {@link CMsgGCMsgMasterSetDirectory.SubGC.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCMsgMasterSetDirectory.SubGC
* @static
* @param {CMsgGCMsgMasterSetDirectory.ISubGC} 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();
};
/**
* Decodes a SubGC message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCMsgMasterSetDirectory.SubGC
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgGCMsgMasterSetDirectory.SubGC} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a SubGC message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCMsgMasterSetDirectory.SubGC
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCMsgMasterSetDirectory.SubGC} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a SubGC message.
* @function verify
* @memberof CMsgGCMsgMasterSetDirectory.SubGC
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
SubGC.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.dir_index != null && message.hasOwnProperty("dir_index"))
if (!$util.isInteger(message.dir_index))
return "dir_index: integer expected";
if (message.name != null && message.hasOwnProperty("name"))
if (!$util.isString(message.name))
return "name: string expected";
if (message.box != null && message.hasOwnProperty("box"))
if (!$util.isString(message.box))
return "box: string expected";
if (message.command_line != null && message.hasOwnProperty("command_line"))
if (!$util.isString(message.command_line))
return "command_line: string expected";
if (message.gc_binary != null && message.hasOwnProperty("gc_binary"))
if (!$util.isString(message.gc_binary))
return "gc_binary: string expected";
return null;
};
/**
* Creates a SubGC message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCMsgMasterSetDirectory.SubGC
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCMsgMasterSetDirectory.SubGC} SubGC
*/
SubGC.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCMsgMasterSetDirectory.SubGC)
return object;
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);
if (object.box != null)
message.box = String(object.box);
if (object.command_line != null)
message.command_line = String(object.command_line);
if (object.gc_binary != null)
message.gc_binary = String(object.gc_binary);
return message;
};
/**
* Creates a plain object from a SubGC message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCMsgMasterSetDirectory.SubGC
* @static
* @param {CMsgGCMsgMasterSetDirectory.SubGC} message SubGC
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
SubGC.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.dir_index = 0;
object.name = "";
object.box = "";
object.command_line = "";
object.gc_binary = "";
}
if (message.dir_index != null && message.hasOwnProperty("dir_index"))
object.dir_index = message.dir_index;
if (message.name != null && message.hasOwnProperty("name"))
object.name = message.name;
if (message.box != null && message.hasOwnProperty("box"))
object.box = message.box;
if (message.command_line != null && message.hasOwnProperty("command_line"))
object.command_line = message.command_line;
if (message.gc_binary != null && message.hasOwnProperty("gc_binary"))
object.gc_binary = message.gc_binary;
return object;
};
/**
* Converts this SubGC to JSON.
* @function toJSON
* @memberof CMsgGCMsgMasterSetDirectory.SubGC
* @instance
* @returns {Object.<string,*>} JSON object
*/
SubGC.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for SubGC
* @function getTypeUrl
* @memberof CMsgGCMsgMasterSetDirectory.SubGC
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
SubGC.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCMsgMasterSetDirectory.SubGC";
};
return SubGC;
})();
return CMsgGCMsgMasterSetDirectory;
})();
$root.CMsgGCMsgMasterSetDirectory_Response = (function() {
/**
* Properties of a CMsgGCMsgMasterSetDirectory_Response.
* @exports ICMsgGCMsgMasterSetDirectory_Response
* @interface ICMsgGCMsgMasterSetDirectory_Response
* @property {number|null} [eresult] CMsgGCMsgMasterSetDirectory_Response eresult
* @property {string|null} [message] CMsgGCMsgMasterSetDirectory_Response message
*/
/**
* Constructs a new CMsgGCMsgMasterSetDirectory_Response.
* @exports CMsgGCMsgMasterSetDirectory_Response
* @classdesc Represents a CMsgGCMsgMasterSetDirectory_Response.
* @implements ICMsgGCMsgMasterSetDirectory_Response
* @constructor
* @param {ICMsgGCMsgMasterSetDirectory_Response=} [properties] Properties to set
*/
function CMsgGCMsgMasterSetDirectory_Response(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgGCMsgMasterSetDirectory_Response eresult.
* @member {number} eresult
* @memberof CMsgGCMsgMasterSetDirectory_Response
* @instance
*/
CMsgGCMsgMasterSetDirectory_Response.prototype.eresult = 2;
/**
* CMsgGCMsgMasterSetDirectory_Response message.
* @member {string} message
* @memberof CMsgGCMsgMasterSetDirectory_Response
* @instance
*/
CMsgGCMsgMasterSetDirectory_Response.prototype.message = "";
/**
* Creates a new CMsgGCMsgMasterSetDirectory_Response instance using the specified properties.
* @function create
* @memberof CMsgGCMsgMasterSetDirectory_Response
* @static
* @param {ICMsgGCMsgMasterSetDirectory_Response=} [properties] Properties to set
* @returns {CMsgGCMsgMasterSetDirectory_Response} CMsgGCMsgMasterSetDirectory_Response instance
*/
CMsgGCMsgMasterSetDirectory_Response.create = function create(properties) {
return new CMsgGCMsgMasterSetDirectory_Response(properties);
};
/**
* Encodes the specified CMsgGCMsgMasterSetDirectory_Response message. Does not implicitly {@link CMsgGCMsgMasterSetDirectory_Response.verify|verify} messages.
* @function encode
* @memberof CMsgGCMsgMasterSetDirectory_Response
* @static
* @param {ICMsgGCMsgMasterSetDirectory_Response} 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) {
if (!writer)
writer = $Writer.create();
if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult"))
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult);
if (message.message != null && Object.hasOwnProperty.call(message, "message"))
writer.uint32(/* id 2, wireType 2 =*/18).string(message.message);
return writer;
};
/**
* Encodes the specified CMsgGCMsgMasterSetDirectory_Response message, length delimited. Does not implicitly {@link CMsgGCMsgMasterSetDirectory_Response.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCMsgMasterSetDirectory_Response
* @static
* @param {ICMsgGCMsgMasterSetDirectory_Response} 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();
};
/**
* Decodes a CMsgGCMsgMasterSetDirectory_Response message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCMsgMasterSetDirectory_Response
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgMasterSetDirectory_Response();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
message.eresult = reader.int32();
break;
}
case 2: {
message.message = reader.string();
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a CMsgGCMsgMasterSetDirectory_Response message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCMsgMasterSetDirectory_Response
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCMsgMasterSetDirectory_Response} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgGCMsgMasterSetDirectory_Response message.
* @function verify
* @memberof CMsgGCMsgMasterSetDirectory_Response
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgGCMsgMasterSetDirectory_Response.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.eresult != null && message.hasOwnProperty("eresult"))
if (!$util.isInteger(message.eresult))
return "eresult: integer expected";
if (message.message != null && message.hasOwnProperty("message"))
if (!$util.isString(message.message))
return "message: string expected";
return null;
};
/**
* Creates a CMsgGCMsgMasterSetDirectory_Response message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCMsgMasterSetDirectory_Response
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCMsgMasterSetDirectory_Response} CMsgGCMsgMasterSetDirectory_Response
*/
CMsgGCMsgMasterSetDirectory_Response.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCMsgMasterSetDirectory_Response)
return object;
var message = new $root.CMsgGCMsgMasterSetDirectory_Response();
if (object.eresult != null)
message.eresult = object.eresult | 0;
if (object.message != null)
message.message = String(object.message);
return message;
};
/**
* Creates a plain object from a CMsgGCMsgMasterSetDirectory_Response message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCMsgMasterSetDirectory_Response
* @static
* @param {CMsgGCMsgMasterSetDirectory_Response} message CMsgGCMsgMasterSetDirectory_Response
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgGCMsgMasterSetDirectory_Response.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.eresult = 2;
object.message = "";
}
if (message.eresult != null && message.hasOwnProperty("eresult"))
object.eresult = message.eresult;
if (message.message != null && message.hasOwnProperty("message"))
object.message = message.message;
return object;
};
/**
* Converts this CMsgGCMsgMasterSetDirectory_Response to JSON.
* @function toJSON
* @memberof CMsgGCMsgMasterSetDirectory_Response
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgGCMsgMasterSetDirectory_Response.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgGCMsgMasterSetDirectory_Response
* @function getTypeUrl
* @memberof CMsgGCMsgMasterSetDirectory_Response
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgGCMsgMasterSetDirectory_Response.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCMsgMasterSetDirectory_Response";
};
return CMsgGCMsgMasterSetDirectory_Response;
})();
$root.CMsgGCMsgWebAPIJobRequestForwardResponse = (function() {
/**
* Properties of a CMsgGCMsgWebAPIJobRequestForwardResponse.
* @exports ICMsgGCMsgWebAPIJobRequestForwardResponse
* @interface ICMsgGCMsgWebAPIJobRequestForwardResponse
* @property {number|null} [dir_index] CMsgGCMsgWebAPIJobRequestForwardResponse dir_index
*/
/**
* Constructs a new CMsgGCMsgWebAPIJobRequestForwardResponse.
* @exports CMsgGCMsgWebAPIJobRequestForwardResponse
* @classdesc Represents a CMsgGCMsgWebAPIJobRequestForwardResponse.
* @implements ICMsgGCMsgWebAPIJobRequestForwardResponse
* @constructor
* @param {ICMsgGCMsgWebAPIJobRequestForwardResponse=} [properties] Properties to set
*/
function CMsgGCMsgWebAPIJobRequestForwardResponse(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgGCMsgWebAPIJobRequestForwardResponse dir_index.
* @member {number} dir_index
* @memberof CMsgGCMsgWebAPIJobRequestForwardResponse
* @instance
*/
CMsgGCMsgWebAPIJobRequestForwardResponse.prototype.dir_index = 0;
/**
* Creates a new CMsgGCMsgWebAPIJobRequestForwardResponse instance using the specified properties.
* @function create
* @memberof CMsgGCMsgWebAPIJobRequestForwardResponse
* @static
* @param {ICMsgGCMsgWebAPIJobRequestForwardResponse=} [properties] Properties to set
* @returns {CMsgGCMsgWebAPIJobRequestForwardResponse} CMsgGCMsgWebAPIJobRequestForwardResponse instance
*/
CMsgGCMsgWebAPIJobRequestForwardResponse.create = function create(properties) {
return new CMsgGCMsgWebAPIJobRequestForwardResponse(properties);
};
/**
* Encodes the specified CMsgGCMsgWebAPIJobRequestForwardResponse message. Does not implicitly {@link CMsgGCMsgWebAPIJobRequestForwardResponse.verify|verify} messages.
* @function encode
* @memberof CMsgGCMsgWebAPIJobRequestForwardResponse
* @static
* @param {ICMsgGCMsgWebAPIJobRequestForwardResponse} 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) {
if (!writer)
writer = $Writer.create();
if (message.dir_index != null && Object.hasOwnProperty.call(message, "dir_index"))
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.dir_index);
return writer;
};
/**
* Encodes the specified CMsgGCMsgWebAPIJobRequestForwardResponse message, length delimited. Does not implicitly {@link CMsgGCMsgWebAPIJobRequestForwardResponse.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCMsgWebAPIJobRequestForwardResponse
* @static
* @param {ICMsgGCMsgWebAPIJobRequestForwardResponse} 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();
};
/**
* Decodes a CMsgGCMsgWebAPIJobRequestForwardResponse message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCMsgWebAPIJobRequestForwardResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgGCMsgWebAPIJobRequestForwardResponse} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgGCMsgWebAPIJobRequestForwardResponse message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCMsgWebAPIJobRequestForwardResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCMsgWebAPIJobRequestForwardResponse} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgGCMsgWebAPIJobRequestForwardResponse message.
* @function verify
* @memberof CMsgGCMsgWebAPIJobRequestForwardResponse
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgGCMsgWebAPIJobRequestForwardResponse.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.dir_index != null && message.hasOwnProperty("dir_index"))
if (!$util.isInteger(message.dir_index))
return "dir_index: integer expected";
return null;
};
/**
* Creates a CMsgGCMsgWebAPIJobRequestForwardResponse message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCMsgWebAPIJobRequestForwardResponse
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCMsgWebAPIJobRequestForwardResponse} CMsgGCMsgWebAPIJobRequestForwardResponse
*/
CMsgGCMsgWebAPIJobRequestForwardResponse.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCMsgWebAPIJobRequestForwardResponse)
return object;
var message = new $root.CMsgGCMsgWebAPIJobRequestForwardResponse();
if (object.dir_index != null)
message.dir_index = object.dir_index >>> 0;
return message;
};
/**
* Creates a plain object from a CMsgGCMsgWebAPIJobRequestForwardResponse message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCMsgWebAPIJobRequestForwardResponse
* @static
* @param {CMsgGCMsgWebAPIJobRequestForwardResponse} message CMsgGCMsgWebAPIJobRequestForwardResponse
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgGCMsgWebAPIJobRequestForwardResponse.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults)
object.dir_index = 0;
if (message.dir_index != null && message.hasOwnProperty("dir_index"))
object.dir_index = message.dir_index;
return object;
};
/**
* Converts this CMsgGCMsgWebAPIJobRequestForwardResponse to JSON.
* @function toJSON
* @memberof CMsgGCMsgWebAPIJobRequestForwardResponse
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgGCMsgWebAPIJobRequestForwardResponse.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgGCMsgWebAPIJobRequestForwardResponse
* @function getTypeUrl
* @memberof CMsgGCMsgWebAPIJobRequestForwardResponse
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgGCMsgWebAPIJobRequestForwardResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCMsgWebAPIJobRequestForwardResponse";
};
return CMsgGCMsgWebAPIJobRequestForwardResponse;
})();
$root.CGCSystemMsg_GetPurchaseTrust_Request = (function() {
/**
* Properties of a CGCSystemMsg_GetPurchaseTrust_Request.
* @exports ICGCSystemMsg_GetPurchaseTrust_Request
* @interface ICGCSystemMsg_GetPurchaseTrust_Request
* @property {number|Long|null} [steamid] CGCSystemMsg_GetPurchaseTrust_Request steamid
*/
/**
* 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
*/
function CGCSystemMsg_GetPurchaseTrust_Request(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CGCSystemMsg_GetPurchaseTrust_Request steamid.
* @member {number|Long} steamid
* @memberof CGCSystemMsg_GetPurchaseTrust_Request
* @instance
*/
CGCSystemMsg_GetPurchaseTrust_Request.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 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
* @returns {CGCSystemMsg_GetPurchaseTrust_Request} CGCSystemMsg_GetPurchaseTrust_Request instance
*/
CGCSystemMsg_GetPurchaseTrust_Request.create = function create(properties) {
return new CGCSystemMsg_GetPurchaseTrust_Request(properties);
};
/**
* Encodes the specified CGCSystemMsg_GetPurchaseTrust_Request message. Does not implicitly {@link CGCSystemMsg_GetPurchaseTrust_Request.verify|verify} messages.
* @function encode
* @memberof CGCSystemMsg_GetPurchaseTrust_Request
* @static
* @param {ICGCSystemMsg_GetPurchaseTrust_Request} 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) {
if (!writer)
writer = $Writer.create();
if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid"))
writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid);
return writer;
};
/**
* Encodes the specified CGCSystemMsg_GetPurchaseTrust_Request message, length delimited. Does not implicitly {@link CGCSystemMsg_GetPurchaseTrust_Request.verify|verify} messages.
* @function encodeDelimited
* @memberof CGCSystemMsg_GetPurchaseTrust_Request
* @static
* @param {ICGCSystemMsg_GetPurchaseTrust_Request} 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();
};
/**
* Decodes a CGCSystemMsg_GetPurchaseTrust_Request message from the specified reader or buffer.
* @function decode
* @memberof CGCSystemMsg_GetPurchaseTrust_Request
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CGCSystemMsg_GetPurchaseTrust_Request message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CGCSystemMsg_GetPurchaseTrust_Request
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CGCSystemMsg_GetPurchaseTrust_Request} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CGCSystemMsg_GetPurchaseTrust_Request message.
* @function verify
* @memberof CGCSystemMsg_GetPurchaseTrust_Request
* @static
* @param {Object.<string,*>} 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) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.steamid != null && message.hasOwnProperty("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;
};
/**
* Creates a CGCSystemMsg_GetPurchaseTrust_Request message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CGCSystemMsg_GetPurchaseTrust_Request
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CGCSystemMsg_GetPurchaseTrust_Request} CGCSystemMsg_GetPurchaseTrust_Request
*/
CGCSystemMsg_GetPurchaseTrust_Request.fromObject = function fromObject(object) {
if (object instanceof $root.CGCSystemMsg_GetPurchaseTrust_Request)
return object;
var message = new $root.CGCSystemMsg_GetPurchaseTrust_Request();
if (object.steamid != null)
if ($util.Long)
(message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false;
else if (typeof object.steamid === "string")
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();
return message;
};
/**
* Creates a plain object from a CGCSystemMsg_GetPurchaseTrust_Request message. Also converts values to other types if specified.
* @function toObject
* @memberof CGCSystemMsg_GetPurchaseTrust_Request
* @static
* @param {CGCSystemMsg_GetPurchaseTrust_Request} message CGCSystemMsg_GetPurchaseTrust_Request
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CGCSystemMsg_GetPurchaseTrust_Request.toObject = function toObject(message, options) {
if (!options)
options = {};
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;
} 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;
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;
return object;
};
/**
* Converts this CGCSystemMsg_GetPurchaseTrust_Request to JSON.
* @function toJSON
* @memberof CGCSystemMsg_GetPurchaseTrust_Request
* @instance
* @returns {Object.<string,*>} JSON object
*/
CGCSystemMsg_GetPurchaseTrust_Request.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CGCSystemMsg_GetPurchaseTrust_Request
* @function getTypeUrl
* @memberof CGCSystemMsg_GetPurchaseTrust_Request
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CGCSystemMsg_GetPurchaseTrust_Request.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CGCSystemMsg_GetPurchaseTrust_Request";
};
return CGCSystemMsg_GetPurchaseTrust_Request;
})();
$root.CGCSystemMsg_GetPurchaseTrust_Response = (function() {
/**
* Properties of a CGCSystemMsg_GetPurchaseTrust_Response.
* @exports ICGCSystemMsg_GetPurchaseTrust_Response
* @interface ICGCSystemMsg_GetPurchaseTrust_Response
* @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
*/
/**
* 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
*/
function CGCSystemMsg_GetPurchaseTrust_Response(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CGCSystemMsg_GetPurchaseTrust_Response has_prior_purchase_history.
* @member {boolean} has_prior_purchase_history
* @memberof CGCSystemMsg_GetPurchaseTrust_Response
* @instance
*/
CGCSystemMsg_GetPurchaseTrust_Response.prototype.has_prior_purchase_history = false;
/**
* CGCSystemMsg_GetPurchaseTrust_Response has_no_recent_password_resets.
* @member {boolean} has_no_recent_password_resets
* @memberof CGCSystemMsg_GetPurchaseTrust_Response
* @instance
*/
CGCSystemMsg_GetPurchaseTrust_Response.prototype.has_no_recent_password_resets = false;
/**
* CGCSystemMsg_GetPurchaseTrust_Response is_wallet_cash_trusted.
* @member {boolean} is_wallet_cash_trusted
* @memberof CGCSystemMsg_GetPurchaseTrust_Response
* @instance
*/
CGCSystemMsg_GetPurchaseTrust_Response.prototype.is_wallet_cash_trusted = false;
/**
* CGCSystemMsg_GetPurchaseTrust_Response time_all_trusted.
* @member {number} time_all_trusted
* @memberof CGCSystemMsg_GetPurchaseTrust_Response
* @instance
*/
CGCSystemMsg_GetPurchaseTrust_Response.prototype.time_all_trusted = 0;
/**
* Creates a new CGCSystemMsg_GetPurchaseTrust_Response instance using the specified properties.
* @function create
* @memberof CGCSystemMsg_GetPurchaseTrust_Response
* @static
* @param {ICGCSystemMsg_GetPurchaseTrust_Response=} [properties] Properties to set
* @returns {CGCSystemMsg_GetPurchaseTrust_Response} CGCSystemMsg_GetPurchaseTrust_Response instance
*/
CGCSystemMsg_GetPurchaseTrust_Response.create = function create(properties) {
return new CGCSystemMsg_GetPurchaseTrust_Response(properties);
};
/**
* Encodes the specified CGCSystemMsg_GetPurchaseTrust_Response message. Does not implicitly {@link CGCSystemMsg_GetPurchaseTrust_Response.verify|verify} messages.
* @function encode
* @memberof CGCSystemMsg_GetPurchaseTrust_Response
* @static
* @param {ICGCSystemMsg_GetPurchaseTrust_Response} 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) {
if (!writer)
writer = $Writer.create();
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"))
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"))
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"))
writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.time_all_trusted);
return writer;
};
/**
* Encodes the specified CGCSystemMsg_GetPurchaseTrust_Response message, length delimited. Does not implicitly {@link CGCSystemMsg_GetPurchaseTrust_Response.verify|verify} messages.
* @function encodeDelimited
* @memberof CGCSystemMsg_GetPurchaseTrust_Response
* @static
* @param {ICGCSystemMsg_GetPurchaseTrust_Response} 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();
};
/**
* Decodes a CGCSystemMsg_GetPurchaseTrust_Response message from the specified reader or buffer.
* @function decode
* @memberof CGCSystemMsg_GetPurchaseTrust_Response
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CGCSystemMsg_GetPurchaseTrust_Response message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CGCSystemMsg_GetPurchaseTrust_Response
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CGCSystemMsg_GetPurchaseTrust_Response} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CGCSystemMsg_GetPurchaseTrust_Response message.
* @function verify
* @memberof CGCSystemMsg_GetPurchaseTrust_Response
* @static
* @param {Object.<string,*>} 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) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.has_prior_purchase_history != null && message.hasOwnProperty("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 (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 (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 (!$util.isInteger(message.time_all_trusted))
return "time_all_trusted: integer expected";
return null;
};
/**
* Creates a CGCSystemMsg_GetPurchaseTrust_Response message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CGCSystemMsg_GetPurchaseTrust_Response
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CGCSystemMsg_GetPurchaseTrust_Response} CGCSystemMsg_GetPurchaseTrust_Response
*/
CGCSystemMsg_GetPurchaseTrust_Response.fromObject = function fromObject(object) {
if (object instanceof $root.CGCSystemMsg_GetPurchaseTrust_Response)
return object;
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);
if (object.has_no_recent_password_resets != null)
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);
if (object.time_all_trusted != null)
message.time_all_trusted = object.time_all_trusted >>> 0;
return message;
};
/**
* Creates a plain object from a CGCSystemMsg_GetPurchaseTrust_Response message. Also converts values to other types if specified.
* @function toObject
* @memberof CGCSystemMsg_GetPurchaseTrust_Response
* @static
* @param {CGCSystemMsg_GetPurchaseTrust_Response} message CGCSystemMsg_GetPurchaseTrust_Response
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CGCSystemMsg_GetPurchaseTrust_Response.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.has_prior_purchase_history = false;
object.has_no_recent_password_resets = false;
object.is_wallet_cash_trusted = false;
object.time_all_trusted = 0;
}
if (message.has_prior_purchase_history != null && message.hasOwnProperty("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"))
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"))
object.is_wallet_cash_trusted = message.is_wallet_cash_trusted;
if (message.time_all_trusted != null && message.hasOwnProperty("time_all_trusted"))
object.time_all_trusted = message.time_all_trusted;
return object;
};
/**
* Converts this CGCSystemMsg_GetPurchaseTrust_Response to JSON.
* @function toJSON
* @memberof CGCSystemMsg_GetPurchaseTrust_Response
* @instance
* @returns {Object.<string,*>} JSON object
*/
CGCSystemMsg_GetPurchaseTrust_Response.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CGCSystemMsg_GetPurchaseTrust_Response
* @function getTypeUrl
* @memberof CGCSystemMsg_GetPurchaseTrust_Response
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CGCSystemMsg_GetPurchaseTrust_Response.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CGCSystemMsg_GetPurchaseTrust_Response";
};
return CGCSystemMsg_GetPurchaseTrust_Response;
})();
$root.CMsgGCHAccountVacStatusChange = (function() {
/**
* Properties of a CMsgGCHAccountVacStatusChange.
* @exports ICMsgGCHAccountVacStatusChange
* @interface ICMsgGCHAccountVacStatusChange
* @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
*/
/**
* Constructs a new CMsgGCHAccountVacStatusChange.
* @exports CMsgGCHAccountVacStatusChange
* @classdesc Represents a CMsgGCHAccountVacStatusChange.
* @implements ICMsgGCHAccountVacStatusChange
* @constructor
* @param {ICMsgGCHAccountVacStatusChange=} [properties] Properties to set
*/
function CMsgGCHAccountVacStatusChange(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgGCHAccountVacStatusChange steam_id.
* @member {number|Long} steam_id
* @memberof CMsgGCHAccountVacStatusChange
* @instance
*/
CMsgGCHAccountVacStatusChange.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* CMsgGCHAccountVacStatusChange app_id.
* @member {number} app_id
* @memberof CMsgGCHAccountVacStatusChange
* @instance
*/
CMsgGCHAccountVacStatusChange.prototype.app_id = 0;
/**
* CMsgGCHAccountVacStatusChange rtime_vacban_starts.
* @member {number} rtime_vacban_starts
* @memberof CMsgGCHAccountVacStatusChange
* @instance
*/
CMsgGCHAccountVacStatusChange.prototype.rtime_vacban_starts = 0;
/**
* CMsgGCHAccountVacStatusChange is_banned_now.
* @member {boolean} is_banned_now
* @memberof CMsgGCHAccountVacStatusChange
* @instance
*/
CMsgGCHAccountVacStatusChange.prototype.is_banned_now = false;
/**
* CMsgGCHAccountVacStatusChange is_banned_future.
* @member {boolean} is_banned_future
* @memberof CMsgGCHAccountVacStatusChange
* @instance
*/
CMsgGCHAccountVacStatusChange.prototype.is_banned_future = false;
/**
* Creates a new CMsgGCHAccountVacStatusChange instance using the specified properties.
* @function create
* @memberof CMsgGCHAccountVacStatusChange
* @static
* @param {ICMsgGCHAccountVacStatusChange=} [properties] Properties to set
* @returns {CMsgGCHAccountVacStatusChange} CMsgGCHAccountVacStatusChange instance
*/
CMsgGCHAccountVacStatusChange.create = function create(properties) {
return new CMsgGCHAccountVacStatusChange(properties);
};
/**
* Encodes the specified CMsgGCHAccountVacStatusChange message. Does not implicitly {@link CMsgGCHAccountVacStatusChange.verify|verify} messages.
* @function encode
* @memberof CMsgGCHAccountVacStatusChange
* @static
* @param {ICMsgGCHAccountVacStatusChange} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.app_id);
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"))
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"))
writer.uint32(/* id 5, wireType 0 =*/40).bool(message.is_banned_future);
return writer;
};
/**
* Encodes the specified CMsgGCHAccountVacStatusChange message, length delimited. Does not implicitly {@link CMsgGCHAccountVacStatusChange.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCHAccountVacStatusChange
* @static
* @param {ICMsgGCHAccountVacStatusChange} 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();
};
/**
* Decodes a CMsgGCHAccountVacStatusChange message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCHAccountVacStatusChange
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgGCHAccountVacStatusChange} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgGCHAccountVacStatusChange message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCHAccountVacStatusChange
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCHAccountVacStatusChange} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgGCHAccountVacStatusChange message.
* @function verify
* @memberof CMsgGCHAccountVacStatusChange
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgGCHAccountVacStatusChange.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.steam_id != null && message.hasOwnProperty("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 (!$util.isInteger(message.app_id))
return "app_id: integer expected";
if (message.rtime_vacban_starts != null && message.hasOwnProperty("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 (typeof message.is_banned_now !== "boolean")
return "is_banned_now: boolean expected";
if (message.is_banned_future != null && message.hasOwnProperty("is_banned_future"))
if (typeof message.is_banned_future !== "boolean")
return "is_banned_future: boolean expected";
return null;
};
/**
* Creates a CMsgGCHAccountVacStatusChange message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCHAccountVacStatusChange
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCHAccountVacStatusChange} CMsgGCHAccountVacStatusChange
*/
CMsgGCHAccountVacStatusChange.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCHAccountVacStatusChange)
return object;
var message = new $root.CMsgGCHAccountVacStatusChange();
if (object.steam_id != null)
if ($util.Long)
(message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false;
else if (typeof object.steam_id === "string")
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();
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);
if (object.is_banned_future != null)
message.is_banned_future = Boolean(object.is_banned_future);
return message;
};
/**
* Creates a plain object from a CMsgGCHAccountVacStatusChange message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCHAccountVacStatusChange
* @static
* @param {CMsgGCHAccountVacStatusChange} message CMsgGCHAccountVacStatusChange
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgGCHAccountVacStatusChange.toObject = function toObject(message, options) {
if (!options)
options = {};
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;
} else
object.steam_id = options.longs === String ? "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;
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.app_id = message.app_id;
if (message.rtime_vacban_starts != null && message.hasOwnProperty("rtime_vacban_starts"))
object.rtime_vacban_starts = message.rtime_vacban_starts;
if (message.is_banned_now != null && message.hasOwnProperty("is_banned_now"))
object.is_banned_now = message.is_banned_now;
if (message.is_banned_future != null && message.hasOwnProperty("is_banned_future"))
object.is_banned_future = message.is_banned_future;
return object;
};
/**
* Converts this CMsgGCHAccountVacStatusChange to JSON.
* @function toJSON
* @memberof CMsgGCHAccountVacStatusChange
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgGCHAccountVacStatusChange.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgGCHAccountVacStatusChange
* @function getTypeUrl
* @memberof CMsgGCHAccountVacStatusChange
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgGCHAccountVacStatusChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCHAccountVacStatusChange";
};
return CMsgGCHAccountVacStatusChange;
})();
$root.CMsgGCGetPartnerAccountLink = (function() {
/**
* Properties of a CMsgGCGetPartnerAccountLink.
* @exports ICMsgGCGetPartnerAccountLink
* @interface ICMsgGCGetPartnerAccountLink
* @property {number|Long|null} [steamid] CMsgGCGetPartnerAccountLink steamid
*/
/**
* Constructs a new CMsgGCGetPartnerAccountLink.
* @exports CMsgGCGetPartnerAccountLink
* @classdesc Represents a CMsgGCGetPartnerAccountLink.
* @implements ICMsgGCGetPartnerAccountLink
* @constructor
* @param {ICMsgGCGetPartnerAccountLink=} [properties] Properties to set
*/
function CMsgGCGetPartnerAccountLink(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgGCGetPartnerAccountLink steamid.
* @member {number|Long} steamid
* @memberof CMsgGCGetPartnerAccountLink
* @instance
*/
CMsgGCGetPartnerAccountLink.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* Creates a new CMsgGCGetPartnerAccountLink instance using the specified properties.
* @function create
* @memberof CMsgGCGetPartnerAccountLink
* @static
* @param {ICMsgGCGetPartnerAccountLink=} [properties] Properties to set
* @returns {CMsgGCGetPartnerAccountLink} CMsgGCGetPartnerAccountLink instance
*/
CMsgGCGetPartnerAccountLink.create = function create(properties) {
return new CMsgGCGetPartnerAccountLink(properties);
};
/**
* Encodes the specified CMsgGCGetPartnerAccountLink message. Does not implicitly {@link CMsgGCGetPartnerAccountLink.verify|verify} messages.
* @function encode
* @memberof CMsgGCGetPartnerAccountLink
* @static
* @param {ICMsgGCGetPartnerAccountLink} 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) {
if (!writer)
writer = $Writer.create();
if (message.steamid != null && Object.hasOwnProperty.call(message, "steamid"))
writer.uint32(/* id 1, wireType 1 =*/9).fixed64(message.steamid);
return writer;
};
/**
* Encodes the specified CMsgGCGetPartnerAccountLink message, length delimited. Does not implicitly {@link CMsgGCGetPartnerAccountLink.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCGetPartnerAccountLink
* @static
* @param {ICMsgGCGetPartnerAccountLink} 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();
};
/**
* Decodes a CMsgGCGetPartnerAccountLink message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCGetPartnerAccountLink
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgGCGetPartnerAccountLink} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgGCGetPartnerAccountLink message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCGetPartnerAccountLink
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCGetPartnerAccountLink} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgGCGetPartnerAccountLink message.
* @function verify
* @memberof CMsgGCGetPartnerAccountLink
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgGCGetPartnerAccountLink.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.steamid != null && message.hasOwnProperty("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;
};
/**
* Creates a CMsgGCGetPartnerAccountLink message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCGetPartnerAccountLink
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCGetPartnerAccountLink} CMsgGCGetPartnerAccountLink
*/
CMsgGCGetPartnerAccountLink.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCGetPartnerAccountLink)
return object;
var message = new $root.CMsgGCGetPartnerAccountLink();
if (object.steamid != null)
if ($util.Long)
(message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false;
else if (typeof object.steamid === "string")
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();
return message;
};
/**
* Creates a plain object from a CMsgGCGetPartnerAccountLink message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCGetPartnerAccountLink
* @static
* @param {CMsgGCGetPartnerAccountLink} message CMsgGCGetPartnerAccountLink
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgGCGetPartnerAccountLink.toObject = function toObject(message, options) {
if (!options)
options = {};
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;
} 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;
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;
return object;
};
/**
* Converts this CMsgGCGetPartnerAccountLink to JSON.
* @function toJSON
* @memberof CMsgGCGetPartnerAccountLink
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgGCGetPartnerAccountLink.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgGCGetPartnerAccountLink
* @function getTypeUrl
* @memberof CMsgGCGetPartnerAccountLink
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgGCGetPartnerAccountLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCGetPartnerAccountLink";
};
return CMsgGCGetPartnerAccountLink;
})();
$root.CMsgGCGetPartnerAccountLink_Response = (function() {
/**
* Properties of a CMsgGCGetPartnerAccountLink_Response.
* @exports ICMsgGCGetPartnerAccountLink_Response
* @interface ICMsgGCGetPartnerAccountLink_Response
* @property {number|null} [pwid] CMsgGCGetPartnerAccountLink_Response pwid
* @property {number|null} [nexonid] CMsgGCGetPartnerAccountLink_Response nexonid
* @property {number|null} [ageclass] CMsgGCGetPartnerAccountLink_Response ageclass
* @property {boolean|null} [id_verified] CMsgGCGetPartnerAccountLink_Response id_verified
* @property {boolean|null} [is_adult] CMsgGCGetPartnerAccountLink_Response is_adult
*/
/**
* Constructs a new CMsgGCGetPartnerAccountLink_Response.
* @exports CMsgGCGetPartnerAccountLink_Response
* @classdesc Represents a CMsgGCGetPartnerAccountLink_Response.
* @implements ICMsgGCGetPartnerAccountLink_Response
* @constructor
* @param {ICMsgGCGetPartnerAccountLink_Response=} [properties] Properties to set
*/
function CMsgGCGetPartnerAccountLink_Response(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgGCGetPartnerAccountLink_Response pwid.
* @member {number} pwid
* @memberof CMsgGCGetPartnerAccountLink_Response
* @instance
*/
CMsgGCGetPartnerAccountLink_Response.prototype.pwid = 0;
/**
* CMsgGCGetPartnerAccountLink_Response nexonid.
* @member {number} nexonid
* @memberof CMsgGCGetPartnerAccountLink_Response
* @instance
*/
CMsgGCGetPartnerAccountLink_Response.prototype.nexonid = 0;
/**
* CMsgGCGetPartnerAccountLink_Response ageclass.
* @member {number} ageclass
* @memberof CMsgGCGetPartnerAccountLink_Response
* @instance
*/
CMsgGCGetPartnerAccountLink_Response.prototype.ageclass = 0;
/**
* CMsgGCGetPartnerAccountLink_Response id_verified.
* @member {boolean} id_verified
* @memberof CMsgGCGetPartnerAccountLink_Response
* @instance
*/
CMsgGCGetPartnerAccountLink_Response.prototype.id_verified = true;
/**
* CMsgGCGetPartnerAccountLink_Response is_adult.
* @member {boolean} is_adult
* @memberof CMsgGCGetPartnerAccountLink_Response
* @instance
*/
CMsgGCGetPartnerAccountLink_Response.prototype.is_adult = false;
/**
* Creates a new CMsgGCGetPartnerAccountLink_Response instance using the specified properties.
* @function create
* @memberof CMsgGCGetPartnerAccountLink_Response
* @static
* @param {ICMsgGCGetPartnerAccountLink_Response=} [properties] Properties to set
* @returns {CMsgGCGetPartnerAccountLink_Response} CMsgGCGetPartnerAccountLink_Response instance
*/
CMsgGCGetPartnerAccountLink_Response.create = function create(properties) {
return new CMsgGCGetPartnerAccountLink_Response(properties);
};
/**
* Encodes the specified CMsgGCGetPartnerAccountLink_Response message. Does not implicitly {@link CMsgGCGetPartnerAccountLink_Response.verify|verify} messages.
* @function encode
* @memberof CMsgGCGetPartnerAccountLink_Response
* @static
* @param {ICMsgGCGetPartnerAccountLink_Response} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.nexonid);
if (message.ageclass != null && Object.hasOwnProperty.call(message, "ageclass"))
writer.uint32(/* id 3, wireType 0 =*/24).int32(message.ageclass);
if (message.id_verified != null && Object.hasOwnProperty.call(message, "id_verified"))
writer.uint32(/* id 4, wireType 0 =*/32).bool(message.id_verified);
if (message.is_adult != null && Object.hasOwnProperty.call(message, "is_adult"))
writer.uint32(/* id 5, wireType 0 =*/40).bool(message.is_adult);
return writer;
};
/**
* Encodes the specified CMsgGCGetPartnerAccountLink_Response message, length delimited. Does not implicitly {@link CMsgGCGetPartnerAccountLink_Response.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCGetPartnerAccountLink_Response
* @static
* @param {ICMsgGCGetPartnerAccountLink_Response} 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();
};
/**
* Decodes a CMsgGCGetPartnerAccountLink_Response message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCGetPartnerAccountLink_Response
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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;
}
case 3: {
message.ageclass = reader.int32();
break;
}
case 4: {
message.id_verified = reader.bool();
break;
}
case 5: {
message.is_adult = reader.bool();
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a CMsgGCGetPartnerAccountLink_Response message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCGetPartnerAccountLink_Response
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCGetPartnerAccountLink_Response} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgGCGetPartnerAccountLink_Response message.
* @function verify
* @memberof CMsgGCGetPartnerAccountLink_Response
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgGCGetPartnerAccountLink_Response.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.pwid != null && message.hasOwnProperty("pwid"))
if (!$util.isInteger(message.pwid))
return "pwid: integer expected";
if (message.nexonid != null && message.hasOwnProperty("nexonid"))
if (!$util.isInteger(message.nexonid))
return "nexonid: integer expected";
if (message.ageclass != null && message.hasOwnProperty("ageclass"))
if (!$util.isInteger(message.ageclass))
return "ageclass: integer expected";
if (message.id_verified != null && message.hasOwnProperty("id_verified"))
if (typeof message.id_verified !== "boolean")
return "id_verified: boolean expected";
if (message.is_adult != null && message.hasOwnProperty("is_adult"))
if (typeof message.is_adult !== "boolean")
return "is_adult: boolean expected";
return null;
};
/**
* Creates a CMsgGCGetPartnerAccountLink_Response message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCGetPartnerAccountLink_Response
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCGetPartnerAccountLink_Response} CMsgGCGetPartnerAccountLink_Response
*/
CMsgGCGetPartnerAccountLink_Response.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCGetPartnerAccountLink_Response)
return object;
var message = new $root.CMsgGCGetPartnerAccountLink_Response();
if (object.pwid != null)
message.pwid = object.pwid >>> 0;
if (object.nexonid != null)
message.nexonid = object.nexonid >>> 0;
if (object.ageclass != null)
message.ageclass = object.ageclass | 0;
if (object.id_verified != null)
message.id_verified = Boolean(object.id_verified);
if (object.is_adult != null)
message.is_adult = Boolean(object.is_adult);
return message;
};
/**
* Creates a plain object from a CMsgGCGetPartnerAccountLink_Response message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCGetPartnerAccountLink_Response
* @static
* @param {CMsgGCGetPartnerAccountLink_Response} message CMsgGCGetPartnerAccountLink_Response
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgGCGetPartnerAccountLink_Response.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.pwid = 0;
object.nexonid = 0;
object.ageclass = 0;
object.id_verified = true;
object.is_adult = false;
}
if (message.pwid != null && message.hasOwnProperty("pwid"))
object.pwid = message.pwid;
if (message.nexonid != null && message.hasOwnProperty("nexonid"))
object.nexonid = message.nexonid;
if (message.ageclass != null && message.hasOwnProperty("ageclass"))
object.ageclass = message.ageclass;
if (message.id_verified != null && message.hasOwnProperty("id_verified"))
object.id_verified = message.id_verified;
if (message.is_adult != null && message.hasOwnProperty("is_adult"))
object.is_adult = message.is_adult;
return object;
};
/**
* Converts this CMsgGCGetPartnerAccountLink_Response to JSON.
* @function toJSON
* @memberof CMsgGCGetPartnerAccountLink_Response
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgGCGetPartnerAccountLink_Response.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgGCGetPartnerAccountLink_Response
* @function getTypeUrl
* @memberof CMsgGCGetPartnerAccountLink_Response
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgGCGetPartnerAccountLink_Response.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCGetPartnerAccountLink_Response";
};
return CMsgGCGetPartnerAccountLink_Response;
})();
$root.CMsgGCAddressMask = (function() {
/**
* Properties of a CMsgGCAddressMask.
* @exports ICMsgGCAddressMask
* @interface ICMsgGCAddressMask
* @property {number|null} [ipv4] CMsgGCAddressMask ipv4
* @property {number|null} [maskbits] CMsgGCAddressMask maskbits
*/
/**
* Constructs a new CMsgGCAddressMask.
* @exports CMsgGCAddressMask
* @classdesc Represents a CMsgGCAddressMask.
* @implements ICMsgGCAddressMask
* @constructor
* @param {ICMsgGCAddressMask=} [properties] Properties to set
*/
function CMsgGCAddressMask(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgGCAddressMask ipv4.
* @member {number} ipv4
* @memberof CMsgGCAddressMask
* @instance
*/
CMsgGCAddressMask.prototype.ipv4 = 0;
/**
* CMsgGCAddressMask maskbits.
* @member {number} maskbits
* @memberof CMsgGCAddressMask
* @instance
*/
CMsgGCAddressMask.prototype.maskbits = 32;
/**
* Creates a new CMsgGCAddressMask instance using the specified properties.
* @function create
* @memberof CMsgGCAddressMask
* @static
* @param {ICMsgGCAddressMask=} [properties] Properties to set
* @returns {CMsgGCAddressMask} CMsgGCAddressMask instance
*/
CMsgGCAddressMask.create = function create(properties) {
return new CMsgGCAddressMask(properties);
};
/**
* Encodes the specified CMsgGCAddressMask message. Does not implicitly {@link CMsgGCAddressMask.verify|verify} messages.
* @function encode
* @memberof CMsgGCAddressMask
* @static
* @param {ICMsgGCAddressMask} message CMsgGCAddressMask message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
CMsgGCAddressMask.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message.ipv4 != null && Object.hasOwnProperty.call(message, "ipv4"))
writer.uint32(/* id 1, wireType 5 =*/13).fixed32(message.ipv4);
if (message.maskbits != null && Object.hasOwnProperty.call(message, "maskbits"))
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.maskbits);
return writer;
};
/**
* Encodes the specified CMsgGCAddressMask message, length delimited. Does not implicitly {@link CMsgGCAddressMask.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCAddressMask
* @static
* @param {ICMsgGCAddressMask} message CMsgGCAddressMask message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
CMsgGCAddressMask.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
* Decodes a CMsgGCAddressMask message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCAddressMask
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgGCAddressMask} CMsgGCAddressMask
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
CMsgGCAddressMask.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.CMsgGCAddressMask();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
message.ipv4 = reader.fixed32();
break;
}
case 2: {
message.maskbits = reader.uint32();
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a CMsgGCAddressMask message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCAddressMask
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCAddressMask} CMsgGCAddressMask
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
CMsgGCAddressMask.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgGCAddressMask message.
* @function verify
* @memberof CMsgGCAddressMask
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgGCAddressMask.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.ipv4 != null && message.hasOwnProperty("ipv4"))
if (!$util.isInteger(message.ipv4))
return "ipv4: integer expected";
if (message.maskbits != null && message.hasOwnProperty("maskbits"))
if (!$util.isInteger(message.maskbits))
return "maskbits: integer expected";
return null;
};
/**
* Creates a CMsgGCAddressMask message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCAddressMask
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCAddressMask} CMsgGCAddressMask
*/
CMsgGCAddressMask.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCAddressMask)
return object;
var message = new $root.CMsgGCAddressMask();
if (object.ipv4 != null)
message.ipv4 = object.ipv4 >>> 0;
if (object.maskbits != null)
message.maskbits = object.maskbits >>> 0;
return message;
};
/**
* Creates a plain object from a CMsgGCAddressMask message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCAddressMask
* @static
* @param {CMsgGCAddressMask} message CMsgGCAddressMask
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgGCAddressMask.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.ipv4 = 0;
object.maskbits = 32;
}
if (message.ipv4 != null && message.hasOwnProperty("ipv4"))
object.ipv4 = message.ipv4;
if (message.maskbits != null && message.hasOwnProperty("maskbits"))
object.maskbits = message.maskbits;
return object;
};
/**
* Converts this CMsgGCAddressMask to JSON.
* @function toJSON
* @memberof CMsgGCAddressMask
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgGCAddressMask.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgGCAddressMask
* @function getTypeUrl
* @memberof CMsgGCAddressMask
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgGCAddressMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCAddressMask";
};
return CMsgGCAddressMask;
})();
$root.CMsgGCAddressMaskGroup = (function() {
/**
* Properties of a CMsgGCAddressMaskGroup.
* @exports ICMsgGCAddressMaskGroup
* @interface ICMsgGCAddressMaskGroup
* @property {Array.<ICMsgGCAddressMask>|null} [addrs] CMsgGCAddressMaskGroup addrs
*/
/**
* Constructs a new CMsgGCAddressMaskGroup.
* @exports CMsgGCAddressMaskGroup
* @classdesc Represents a CMsgGCAddressMaskGroup.
* @implements ICMsgGCAddressMaskGroup
* @constructor
* @param {ICMsgGCAddressMaskGroup=} [properties] Properties to set
*/
function CMsgGCAddressMaskGroup(properties) {
this.addrs = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgGCAddressMaskGroup addrs.
* @member {Array.<ICMsgGCAddressMask>} addrs
* @memberof CMsgGCAddressMaskGroup
* @instance
*/
CMsgGCAddressMaskGroup.prototype.addrs = $util.emptyArray;
/**
* Creates a new CMsgGCAddressMaskGroup instance using the specified properties.
* @function create
* @memberof CMsgGCAddressMaskGroup
* @static
* @param {ICMsgGCAddressMaskGroup=} [properties] Properties to set
* @returns {CMsgGCAddressMaskGroup} CMsgGCAddressMaskGroup instance
*/
CMsgGCAddressMaskGroup.create = function create(properties) {
return new CMsgGCAddressMaskGroup(properties);
};
/**
* Encodes the specified CMsgGCAddressMaskGroup message. Does not implicitly {@link CMsgGCAddressMaskGroup.verify|verify} messages.
* @function encode
* @memberof CMsgGCAddressMaskGroup
* @static
* @param {ICMsgGCAddressMaskGroup} message CMsgGCAddressMaskGroup message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
CMsgGCAddressMaskGroup.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message.addrs != null && message.addrs.length)
for (var i = 0; i < message.addrs.length; ++i)
$root.CMsgGCAddressMask.encode(message.addrs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
return writer;
};
/**
* Encodes the specified CMsgGCAddressMaskGroup message, length delimited. Does not implicitly {@link CMsgGCAddressMaskGroup.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCAddressMaskGroup
* @static
* @param {ICMsgGCAddressMaskGroup} message CMsgGCAddressMaskGroup message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
CMsgGCAddressMaskGroup.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
* Decodes a CMsgGCAddressMaskGroup message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCAddressMaskGroup
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgGCAddressMaskGroup} CMsgGCAddressMaskGroup
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
CMsgGCAddressMaskGroup.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.CMsgGCAddressMaskGroup();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (!(message.addrs && message.addrs.length))
message.addrs = [];
message.addrs.push($root.CMsgGCAddressMask.decode(reader, reader.uint32()));
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a CMsgGCAddressMaskGroup message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCAddressMaskGroup
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCAddressMaskGroup} CMsgGCAddressMaskGroup
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
CMsgGCAddressMaskGroup.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgGCAddressMaskGroup message.
* @function verify
* @memberof CMsgGCAddressMaskGroup
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgGCAddressMaskGroup.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.addrs != null && message.hasOwnProperty("addrs")) {
if (!Array.isArray(message.addrs))
return "addrs: array expected";
for (var i = 0; i < message.addrs.length; ++i) {
var error = $root.CMsgGCAddressMask.verify(message.addrs[i]);
if (error)
return "addrs." + error;
}
}
return null;
};
/**
* Creates a CMsgGCAddressMaskGroup message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCAddressMaskGroup
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCAddressMaskGroup} CMsgGCAddressMaskGroup
*/
CMsgGCAddressMaskGroup.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCAddressMaskGroup)
return object;
var message = new $root.CMsgGCAddressMaskGroup();
if (object.addrs) {
if (!Array.isArray(object.addrs))
throw TypeError(".CMsgGCAddressMaskGroup.addrs: array expected");
message.addrs = [];
for (var i = 0; i < object.addrs.length; ++i) {
if (typeof object.addrs[i] !== "object")
throw TypeError(".CMsgGCAddressMaskGroup.addrs: object expected");
message.addrs[i] = $root.CMsgGCAddressMask.fromObject(object.addrs[i]);
}
}
return message;
};
/**
* Creates a plain object from a CMsgGCAddressMaskGroup message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCAddressMaskGroup
* @static
* @param {CMsgGCAddressMaskGroup} message CMsgGCAddressMaskGroup
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgGCAddressMaskGroup.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.addrs = [];
if (message.addrs && message.addrs.length) {
object.addrs = [];
for (var j = 0; j < message.addrs.length; ++j)
object.addrs[j] = $root.CMsgGCAddressMask.toObject(message.addrs[j], options);
}
return object;
};
/**
* Converts this CMsgGCAddressMaskGroup to JSON.
* @function toJSON
* @memberof CMsgGCAddressMaskGroup
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgGCAddressMaskGroup.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgGCAddressMaskGroup
* @function getTypeUrl
* @memberof CMsgGCAddressMaskGroup
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgGCAddressMaskGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCAddressMaskGroup";
};
return CMsgGCAddressMaskGroup;
})();
$root.CMsgGCRoutingInfo = (function() {
/**
* Properties of a CMsgGCRoutingInfo.
* @exports ICMsgGCRoutingInfo
* @interface ICMsgGCRoutingInfo
* @property {Array.<number>|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.<CMsgGCRoutingInfo.IPolicyRule>|null} [policy_rules] CMsgGCRoutingInfo policy_rules
*/
/**
* Constructs a new CMsgGCRoutingInfo.
* @exports CMsgGCRoutingInfo
* @classdesc Represents a CMsgGCRoutingInfo.
* @implements ICMsgGCRoutingInfo
* @constructor
* @param {ICMsgGCRoutingInfo=} [properties] Properties to set
*/
function CMsgGCRoutingInfo(properties) {
this.dir_index = [];
this.policy_rules = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgGCRoutingInfo dir_index.
* @member {Array.<number>} dir_index
* @memberof CMsgGCRoutingInfo
* @instance
*/
CMsgGCRoutingInfo.prototype.dir_index = $util.emptyArray;
/**
* CMsgGCRoutingInfo method.
* @member {CMsgGCRoutingInfo.RoutingMethod} method
* @memberof CMsgGCRoutingInfo
* @instance
*/
CMsgGCRoutingInfo.prototype.method = 0;
/**
* CMsgGCRoutingInfo fallback.
* @member {CMsgGCRoutingInfo.RoutingMethod} fallback
* @memberof CMsgGCRoutingInfo
* @instance
*/
CMsgGCRoutingInfo.prototype.fallback = 1;
/**
* CMsgGCRoutingInfo protobuf_field.
* @member {number} protobuf_field
* @memberof CMsgGCRoutingInfo
* @instance
*/
CMsgGCRoutingInfo.prototype.protobuf_field = 0;
/**
* CMsgGCRoutingInfo webapi_param.
* @member {string} webapi_param
* @memberof CMsgGCRoutingInfo
* @instance
*/
CMsgGCRoutingInfo.prototype.webapi_param = "";
/**
* CMsgGCRoutingInfo policy_rules.
* @member {Array.<CMsgGCRoutingInfo.IPolicyRule>} policy_rules
* @memberof CMsgGCRoutingInfo
* @instance
*/
CMsgGCRoutingInfo.prototype.policy_rules = $util.emptyArray;
/**
* Creates a new CMsgGCRoutingInfo instance using the specified properties.
* @function create
* @memberof CMsgGCRoutingInfo
* @static
* @param {ICMsgGCRoutingInfo=} [properties] Properties to set
* @returns {CMsgGCRoutingInfo} CMsgGCRoutingInfo instance
*/
CMsgGCRoutingInfo.create = function create(properties) {
return new CMsgGCRoutingInfo(properties);
};
/**
* Encodes the specified CMsgGCRoutingInfo message. Does not implicitly {@link CMsgGCRoutingInfo.verify|verify} messages.
* @function encode
* @memberof CMsgGCRoutingInfo
* @static
* @param {ICMsgGCRoutingInfo} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.method);
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"))
writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.protobuf_field);
if (message.webapi_param != null && Object.hasOwnProperty.call(message, "webapi_param"))
writer.uint32(/* id 5, wireType 2 =*/42).string(message.webapi_param);
if (message.policy_rules != null && message.policy_rules.length)
for (var i = 0; i < message.policy_rules.length; ++i)
$root.CMsgGCRoutingInfo.PolicyRule.encode(message.policy_rules[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
return writer;
};
/**
* Encodes the specified CMsgGCRoutingInfo message, length delimited. Does not implicitly {@link CMsgGCRoutingInfo.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCRoutingInfo
* @static
* @param {ICMsgGCRoutingInfo} 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();
};
/**
* Decodes a CMsgGCRoutingInfo message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCRoutingInfo
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgGCRoutingInfo} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCRoutingInfo();
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;
}
case 6: {
if (!(message.policy_rules && message.policy_rules.length))
message.policy_rules = [];
message.policy_rules.push($root.CMsgGCRoutingInfo.PolicyRule.decode(reader, reader.uint32()));
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a CMsgGCRoutingInfo message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCRoutingInfo
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCRoutingInfo} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgGCRoutingInfo message.
* @function verify
* @memberof CMsgGCRoutingInfo
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgGCRoutingInfo.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.dir_index != null && message.hasOwnProperty("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"))
switch (message.method) {
default:
return "method: enum value expected";
case 0:
case 1:
case 2:
case 3:
case 4:
break;
}
if (message.fallback != null && message.hasOwnProperty("fallback"))
switch (message.fallback) {
default:
return "fallback: enum value expected";
case 0:
case 1:
case 2:
case 3:
case 4:
break;
}
if (message.protobuf_field != null && message.hasOwnProperty("protobuf_field"))
if (!$util.isInteger(message.protobuf_field))
return "protobuf_field: integer expected";
if (message.webapi_param != null && message.hasOwnProperty("webapi_param"))
if (!$util.isString(message.webapi_param))
return "webapi_param: string expected";
if (message.policy_rules != null && message.hasOwnProperty("policy_rules")) {
if (!Array.isArray(message.policy_rules))
return "policy_rules: array expected";
for (var i = 0; i < message.policy_rules.length; ++i) {
var error = $root.CMsgGCRoutingInfo.PolicyRule.verify(message.policy_rules[i]);
if (error)
return "policy_rules." + error;
}
}
return null;
};
/**
* Creates a CMsgGCRoutingInfo message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCRoutingInfo
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCRoutingInfo} CMsgGCRoutingInfo
*/
CMsgGCRoutingInfo.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCRoutingInfo)
return object;
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 = [];
for (var i = 0; i < object.dir_index.length; ++i)
message.dir_index[i] = object.dir_index[i] >>> 0;
}
switch (object.method) {
default:
if (typeof object.method === "number") {
message.method = object.method;
break;
}
break;
case "RANDOM":
case 0:
message.method = 0;
break;
case "DISCARD":
case 1:
message.method = 1;
break;
case "CLIENT_STEAMID":
case 2:
message.method = 2;
break;
case "PROTOBUF_FIELD_UINT64":
case 3:
message.method = 3;
break;
case "WEBAPI_PARAM_UINT64":
case 4:
message.method = 4;
break;
}
switch (object.fallback) {
case "RANDOM":
case 0:
message.fallback = 0;
break;
default:
if (typeof object.fallback === "number") {
message.fallback = object.fallback;
break;
}
break;
case "DISCARD":
case 1:
message.fallback = 1;
break;
case "CLIENT_STEAMID":
case 2:
message.fallback = 2;
break;
case "PROTOBUF_FIELD_UINT64":
case 3:
message.fallback = 3;
break;
case "WEBAPI_PARAM_UINT64":
case 4:
message.fallback = 4;
break;
}
if (object.protobuf_field != null)
message.protobuf_field = object.protobuf_field >>> 0;
if (object.webapi_param != null)
message.webapi_param = String(object.webapi_param);
if (object.policy_rules) {
if (!Array.isArray(object.policy_rules))
throw TypeError(".CMsgGCRoutingInfo.policy_rules: array expected");
message.policy_rules = [];
for (var i = 0; i < object.policy_rules.length; ++i) {
if (typeof object.policy_rules[i] !== "object")
throw TypeError(".CMsgGCRoutingInfo.policy_rules: object expected");
message.policy_rules[i] = $root.CMsgGCRoutingInfo.PolicyRule.fromObject(object.policy_rules[i]);
}
}
return message;
};
/**
* Creates a plain object from a CMsgGCRoutingInfo message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCRoutingInfo
* @static
* @param {CMsgGCRoutingInfo} message CMsgGCRoutingInfo
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgGCRoutingInfo.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults) {
object.dir_index = [];
object.policy_rules = [];
}
if (options.defaults) {
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 = [];
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] === undefined ? message.method : $root.CMsgGCRoutingInfo.RoutingMethod[message.method] : message.method;
if (message.fallback != null && message.hasOwnProperty("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 && message.hasOwnProperty("protobuf_field"))
object.protobuf_field = message.protobuf_field;
if (message.webapi_param != null && message.hasOwnProperty("webapi_param"))
object.webapi_param = message.webapi_param;
if (message.policy_rules && message.policy_rules.length) {
object.policy_rules = [];
for (var j = 0; j < message.policy_rules.length; ++j)
object.policy_rules[j] = $root.CMsgGCRoutingInfo.PolicyRule.toObject(message.policy_rules[j], options);
}
return object;
};
/**
* Converts this CMsgGCRoutingInfo to JSON.
* @function toJSON
* @memberof CMsgGCRoutingInfo
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgGCRoutingInfo.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgGCRoutingInfo
* @function getTypeUrl
* @memberof CMsgGCRoutingInfo
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgGCRoutingInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCRoutingInfo";
};
CMsgGCRoutingInfo.TokenBucketConfiguration = (function() {
/**
* Properties of a TokenBucketConfiguration.
* @memberof CMsgGCRoutingInfo
* @interface ITokenBucketConfiguration
* @property {number|null} [tokens_start] TokenBucketConfiguration tokens_start
* @property {number|null} [tokens_grant] TokenBucketConfiguration tokens_grant
* @property {number|null} [grant_seconds] TokenBucketConfiguration grant_seconds
*/
/**
* Constructs a new TokenBucketConfiguration.
* @memberof CMsgGCRoutingInfo
* @classdesc Represents a TokenBucketConfiguration.
* @implements ITokenBucketConfiguration
* @constructor
* @param {CMsgGCRoutingInfo.ITokenBucketConfiguration=} [properties] Properties to set
*/
function TokenBucketConfiguration(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* TokenBucketConfiguration tokens_start.
* @member {number} tokens_start
* @memberof CMsgGCRoutingInfo.TokenBucketConfiguration
* @instance
*/
TokenBucketConfiguration.prototype.tokens_start = 0;
/**
* TokenBucketConfiguration tokens_grant.
* @member {number} tokens_grant
* @memberof CMsgGCRoutingInfo.TokenBucketConfiguration
* @instance
*/
TokenBucketConfiguration.prototype.tokens_grant = 0;
/**
* TokenBucketConfiguration grant_seconds.
* @member {number} grant_seconds
* @memberof CMsgGCRoutingInfo.TokenBucketConfiguration
* @instance
*/
TokenBucketConfiguration.prototype.grant_seconds = 0;
/**
* Creates a new TokenBucketConfiguration instance using the specified properties.
* @function create
* @memberof CMsgGCRoutingInfo.TokenBucketConfiguration
* @static
* @param {CMsgGCRoutingInfo.ITokenBucketConfiguration=} [properties] Properties to set
* @returns {CMsgGCRoutingInfo.TokenBucketConfiguration} TokenBucketConfiguration instance
*/
TokenBucketConfiguration.create = function create(properties) {
return new TokenBucketConfiguration(properties);
};
/**
* Encodes the specified TokenBucketConfiguration message. Does not implicitly {@link CMsgGCRoutingInfo.TokenBucketConfiguration.verify|verify} messages.
* @function encode
* @memberof CMsgGCRoutingInfo.TokenBucketConfiguration
* @static
* @param {CMsgGCRoutingInfo.ITokenBucketConfiguration} message TokenBucketConfiguration message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
TokenBucketConfiguration.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message.tokens_start != null && Object.hasOwnProperty.call(message, "tokens_start"))
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tokens_start);
if (message.tokens_grant != null && Object.hasOwnProperty.call(message, "tokens_grant"))
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.tokens_grant);
if (message.grant_seconds != null && Object.hasOwnProperty.call(message, "grant_seconds"))
writer.uint32(/* id 3, wireType 0 =*/24).int32(message.grant_seconds);
return writer;
};
/**
* Encodes the specified TokenBucketConfiguration message, length delimited. Does not implicitly {@link CMsgGCRoutingInfo.TokenBucketConfiguration.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCRoutingInfo.TokenBucketConfiguration
* @static
* @param {CMsgGCRoutingInfo.ITokenBucketConfiguration} message TokenBucketConfiguration message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
TokenBucketConfiguration.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
* Decodes a TokenBucketConfiguration message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCRoutingInfo.TokenBucketConfiguration
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgGCRoutingInfo.TokenBucketConfiguration} TokenBucketConfiguration
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
TokenBucketConfiguration.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.CMsgGCRoutingInfo.TokenBucketConfiguration();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
message.tokens_start = reader.int32();
break;
}
case 2: {
message.tokens_grant = reader.int32();
break;
}
case 3: {
message.grant_seconds = reader.int32();
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a TokenBucketConfiguration message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCRoutingInfo.TokenBucketConfiguration
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCRoutingInfo.TokenBucketConfiguration} TokenBucketConfiguration
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
TokenBucketConfiguration.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a TokenBucketConfiguration message.
* @function verify
* @memberof CMsgGCRoutingInfo.TokenBucketConfiguration
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
TokenBucketConfiguration.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.tokens_start != null && message.hasOwnProperty("tokens_start"))
if (!$util.isInteger(message.tokens_start))
return "tokens_start: integer expected";
if (message.tokens_grant != null && message.hasOwnProperty("tokens_grant"))
if (!$util.isInteger(message.tokens_grant))
return "tokens_grant: integer expected";
if (message.grant_seconds != null && message.hasOwnProperty("grant_seconds"))
if (!$util.isInteger(message.grant_seconds))
return "grant_seconds: integer expected";
return null;
};
/**
* Creates a TokenBucketConfiguration message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCRoutingInfo.TokenBucketConfiguration
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCRoutingInfo.TokenBucketConfiguration} TokenBucketConfiguration
*/
TokenBucketConfiguration.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCRoutingInfo.TokenBucketConfiguration)
return object;
var message = new $root.CMsgGCRoutingInfo.TokenBucketConfiguration();
if (object.tokens_start != null)
message.tokens_start = object.tokens_start | 0;
if (object.tokens_grant != null)
message.tokens_grant = object.tokens_grant | 0;
if (object.grant_seconds != null)
message.grant_seconds = object.grant_seconds | 0;
return message;
};
/**
* Creates a plain object from a TokenBucketConfiguration message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCRoutingInfo.TokenBucketConfiguration
* @static
* @param {CMsgGCRoutingInfo.TokenBucketConfiguration} message TokenBucketConfiguration
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
TokenBucketConfiguration.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.tokens_start = 0;
object.tokens_grant = 0;
object.grant_seconds = 0;
}
if (message.tokens_start != null && message.hasOwnProperty("tokens_start"))
object.tokens_start = message.tokens_start;
if (message.tokens_grant != null && message.hasOwnProperty("tokens_grant"))
object.tokens_grant = message.tokens_grant;
if (message.grant_seconds != null && message.hasOwnProperty("grant_seconds"))
object.grant_seconds = message.grant_seconds;
return object;
};
/**
* Converts this TokenBucketConfiguration to JSON.
* @function toJSON
* @memberof CMsgGCRoutingInfo.TokenBucketConfiguration
* @instance
* @returns {Object.<string,*>} JSON object
*/
TokenBucketConfiguration.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for TokenBucketConfiguration
* @function getTypeUrl
* @memberof CMsgGCRoutingInfo.TokenBucketConfiguration
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
TokenBucketConfiguration.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCRoutingInfo.TokenBucketConfiguration";
};
return TokenBucketConfiguration;
})();
CMsgGCRoutingInfo.PolicyRule = (function() {
/**
* Properties of a PolicyRule.
* @memberof CMsgGCRoutingInfo
* @interface IPolicyRule
* @property {number|null} [account_type] PolicyRule account_type
* @property {number|null} [address_mask_group_id] PolicyRule address_mask_group_id
* @property {CMsgGCRoutingInfo.ITokenBucketConfiguration|null} [token_bucket] PolicyRule token_bucket
*/
/**
* Constructs a new PolicyRule.
* @memberof CMsgGCRoutingInfo
* @classdesc Represents a PolicyRule.
* @implements IPolicyRule
* @constructor
* @param {CMsgGCRoutingInfo.IPolicyRule=} [properties] Properties to set
*/
function PolicyRule(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* PolicyRule account_type.
* @member {number} account_type
* @memberof CMsgGCRoutingInfo.PolicyRule
* @instance
*/
PolicyRule.prototype.account_type = 0;
/**
* PolicyRule address_mask_group_id.
* @member {number} address_mask_group_id
* @memberof CMsgGCRoutingInfo.PolicyRule
* @instance
*/
PolicyRule.prototype.address_mask_group_id = 0;
/**
* PolicyRule token_bucket.
* @member {CMsgGCRoutingInfo.ITokenBucketConfiguration|null|undefined} token_bucket
* @memberof CMsgGCRoutingInfo.PolicyRule
* @instance
*/
PolicyRule.prototype.token_bucket = null;
/**
* Creates a new PolicyRule instance using the specified properties.
* @function create
* @memberof CMsgGCRoutingInfo.PolicyRule
* @static
* @param {CMsgGCRoutingInfo.IPolicyRule=} [properties] Properties to set
* @returns {CMsgGCRoutingInfo.PolicyRule} PolicyRule instance
*/
PolicyRule.create = function create(properties) {
return new PolicyRule(properties);
};
/**
* Encodes the specified PolicyRule message. Does not implicitly {@link CMsgGCRoutingInfo.PolicyRule.verify|verify} messages.
* @function encode
* @memberof CMsgGCRoutingInfo.PolicyRule
* @static
* @param {CMsgGCRoutingInfo.IPolicyRule} message PolicyRule message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
PolicyRule.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message.account_type != null && Object.hasOwnProperty.call(message, "account_type"))
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.account_type);
if (message.address_mask_group_id != null && Object.hasOwnProperty.call(message, "address_mask_group_id"))
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.address_mask_group_id);
if (message.token_bucket != null && Object.hasOwnProperty.call(message, "token_bucket"))
$root.CMsgGCRoutingInfo.TokenBucketConfiguration.encode(message.token_bucket, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
return writer;
};
/**
* Encodes the specified PolicyRule message, length delimited. Does not implicitly {@link CMsgGCRoutingInfo.PolicyRule.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCRoutingInfo.PolicyRule
* @static
* @param {CMsgGCRoutingInfo.IPolicyRule} message PolicyRule message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
PolicyRule.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
* Decodes a PolicyRule message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCRoutingInfo.PolicyRule
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgGCRoutingInfo.PolicyRule} PolicyRule
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
PolicyRule.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.CMsgGCRoutingInfo.PolicyRule();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
message.account_type = reader.int32();
break;
}
case 2: {
message.address_mask_group_id = reader.int32();
break;
}
case 3: {
message.token_bucket = $root.CMsgGCRoutingInfo.TokenBucketConfiguration.decode(reader, reader.uint32());
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a PolicyRule message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCRoutingInfo.PolicyRule
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCRoutingInfo.PolicyRule} PolicyRule
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
PolicyRule.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a PolicyRule message.
* @function verify
* @memberof CMsgGCRoutingInfo.PolicyRule
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
PolicyRule.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.account_type != null && message.hasOwnProperty("account_type"))
if (!$util.isInteger(message.account_type))
return "account_type: integer expected";
if (message.address_mask_group_id != null && message.hasOwnProperty("address_mask_group_id"))
if (!$util.isInteger(message.address_mask_group_id))
return "address_mask_group_id: integer expected";
if (message.token_bucket != null && message.hasOwnProperty("token_bucket")) {
var error = $root.CMsgGCRoutingInfo.TokenBucketConfiguration.verify(message.token_bucket);
if (error)
return "token_bucket." + error;
}
return null;
};
/**
* Creates a PolicyRule message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCRoutingInfo.PolicyRule
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCRoutingInfo.PolicyRule} PolicyRule
*/
PolicyRule.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCRoutingInfo.PolicyRule)
return object;
var message = new $root.CMsgGCRoutingInfo.PolicyRule();
if (object.account_type != null)
message.account_type = object.account_type | 0;
if (object.address_mask_group_id != null)
message.address_mask_group_id = object.address_mask_group_id | 0;
if (object.token_bucket != null) {
if (typeof object.token_bucket !== "object")
throw TypeError(".CMsgGCRoutingInfo.PolicyRule.token_bucket: object expected");
message.token_bucket = $root.CMsgGCRoutingInfo.TokenBucketConfiguration.fromObject(object.token_bucket);
}
return message;
};
/**
* Creates a plain object from a PolicyRule message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCRoutingInfo.PolicyRule
* @static
* @param {CMsgGCRoutingInfo.PolicyRule} message PolicyRule
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
PolicyRule.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.account_type = 0;
object.address_mask_group_id = 0;
object.token_bucket = null;
}
if (message.account_type != null && message.hasOwnProperty("account_type"))
object.account_type = message.account_type;
if (message.address_mask_group_id != null && message.hasOwnProperty("address_mask_group_id"))
object.address_mask_group_id = message.address_mask_group_id;
if (message.token_bucket != null && message.hasOwnProperty("token_bucket"))
object.token_bucket = $root.CMsgGCRoutingInfo.TokenBucketConfiguration.toObject(message.token_bucket, options);
return object;
};
/**
* Converts this PolicyRule to JSON.
* @function toJSON
* @memberof CMsgGCRoutingInfo.PolicyRule
* @instance
* @returns {Object.<string,*>} JSON object
*/
PolicyRule.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for PolicyRule
* @function getTypeUrl
* @memberof CMsgGCRoutingInfo.PolicyRule
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
PolicyRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCRoutingInfo.PolicyRule";
};
return PolicyRule;
})();
/**
* RoutingMethod enum.
* @name CMsgGCRoutingInfo.RoutingMethod
* @enum {number}
* @property {number} RANDOM=0 RANDOM value
* @property {number} DISCARD=1 DISCARD value
* @property {number} CLIENT_STEAMID=2 CLIENT_STEAMID value
* @property {number} PROTOBUF_FIELD_UINT64=3 PROTOBUF_FIELD_UINT64 value
* @property {number} WEBAPI_PARAM_UINT64=4 WEBAPI_PARAM_UINT64 value
*/
CMsgGCRoutingInfo.RoutingMethod = (function() {
var valuesById = {}, values = Object.create(valuesById);
values[valuesById[0] = "RANDOM"] = 0;
values[valuesById[1] = "DISCARD"] = 1;
values[valuesById[2] = "CLIENT_STEAMID"] = 2;
values[valuesById[3] = "PROTOBUF_FIELD_UINT64"] = 3;
values[valuesById[4] = "WEBAPI_PARAM_UINT64"] = 4;
return values;
})();
return CMsgGCRoutingInfo;
})();
$root.CMsgGCMsgMasterSetWebAPIRouting = (function() {
/**
* Properties of a CMsgGCMsgMasterSetWebAPIRouting.
* @exports ICMsgGCMsgMasterSetWebAPIRouting
* @interface ICMsgGCMsgMasterSetWebAPIRouting
* @property {Array.<CMsgGCMsgMasterSetWebAPIRouting.IEntry>|null} [entries] CMsgGCMsgMasterSetWebAPIRouting entries
*/
/**
* Constructs a new CMsgGCMsgMasterSetWebAPIRouting.
* @exports CMsgGCMsgMasterSetWebAPIRouting
* @classdesc Represents a CMsgGCMsgMasterSetWebAPIRouting.
* @implements ICMsgGCMsgMasterSetWebAPIRouting
* @constructor
* @param {ICMsgGCMsgMasterSetWebAPIRouting=} [properties] Properties to set
*/
function CMsgGCMsgMasterSetWebAPIRouting(properties) {
this.entries = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgGCMsgMasterSetWebAPIRouting entries.
* @member {Array.<CMsgGCMsgMasterSetWebAPIRouting.IEntry>} entries
* @memberof CMsgGCMsgMasterSetWebAPIRouting
* @instance
*/
CMsgGCMsgMasterSetWebAPIRouting.prototype.entries = $util.emptyArray;
/**
* Creates a new CMsgGCMsgMasterSetWebAPIRouting instance using the specified properties.
* @function create
* @memberof CMsgGCMsgMasterSetWebAPIRouting
* @static
* @param {ICMsgGCMsgMasterSetWebAPIRouting=} [properties] Properties to set
* @returns {CMsgGCMsgMasterSetWebAPIRouting} CMsgGCMsgMasterSetWebAPIRouting instance
*/
CMsgGCMsgMasterSetWebAPIRouting.create = function create(properties) {
return new CMsgGCMsgMasterSetWebAPIRouting(properties);
};
/**
* Encodes the specified CMsgGCMsgMasterSetWebAPIRouting message. Does not implicitly {@link CMsgGCMsgMasterSetWebAPIRouting.verify|verify} messages.
* @function encode
* @memberof CMsgGCMsgMasterSetWebAPIRouting
* @static
* @param {ICMsgGCMsgMasterSetWebAPIRouting} 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) {
if (!writer)
writer = $Writer.create();
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();
return writer;
};
/**
* Encodes the specified CMsgGCMsgMasterSetWebAPIRouting message, length delimited. Does not implicitly {@link CMsgGCMsgMasterSetWebAPIRouting.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCMsgMasterSetWebAPIRouting
* @static
* @param {ICMsgGCMsgMasterSetWebAPIRouting} 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();
};
/**
* Decodes a CMsgGCMsgMasterSetWebAPIRouting message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCMsgMasterSetWebAPIRouting
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgGCMsgMasterSetWebAPIRouting} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgGCMsgMasterSetWebAPIRouting message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCMsgMasterSetWebAPIRouting
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCMsgMasterSetWebAPIRouting} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgGCMsgMasterSetWebAPIRouting message.
* @function verify
* @memberof CMsgGCMsgMasterSetWebAPIRouting
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgGCMsgMasterSetWebAPIRouting.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.entries != null && message.hasOwnProperty("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]);
if (error)
return "entries." + error;
}
}
return null;
};
/**
* Creates a CMsgGCMsgMasterSetWebAPIRouting message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCMsgMasterSetWebAPIRouting
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCMsgMasterSetWebAPIRouting} CMsgGCMsgMasterSetWebAPIRouting
*/
CMsgGCMsgMasterSetWebAPIRouting.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCMsgMasterSetWebAPIRouting)
return object;
var message = new $root.CMsgGCMsgMasterSetWebAPIRouting();
if (object.entries) {
if (!Array.isArray(object.entries))
throw TypeError(".CMsgGCMsgMasterSetWebAPIRouting.entries: array expected");
message.entries = [];
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]);
}
}
return message;
};
/**
* Creates a plain object from a CMsgGCMsgMasterSetWebAPIRouting message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCMsgMasterSetWebAPIRouting
* @static
* @param {CMsgGCMsgMasterSetWebAPIRouting} message CMsgGCMsgMasterSetWebAPIRouting
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgGCMsgMasterSetWebAPIRouting.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.entries = [];
if (message.entries && message.entries.length) {
object.entries = [];
for (var j = 0; j < message.entries.length; ++j)
object.entries[j] = $root.CMsgGCMsgMasterSetWebAPIRouting.Entry.toObject(message.entries[j], options);
}
return object;
};
/**
* Converts this CMsgGCMsgMasterSetWebAPIRouting to JSON.
* @function toJSON
* @memberof CMsgGCMsgMasterSetWebAPIRouting
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgGCMsgMasterSetWebAPIRouting.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgGCMsgMasterSetWebAPIRouting
* @function getTypeUrl
* @memberof CMsgGCMsgMasterSetWebAPIRouting
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgGCMsgMasterSetWebAPIRouting.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCMsgMasterSetWebAPIRouting";
};
CMsgGCMsgMasterSetWebAPIRouting.Entry = (function() {
/**
* Properties of an Entry.
* @memberof CMsgGCMsgMasterSetWebAPIRouting
* @interface IEntry
* @property {string|null} [interface_name] Entry interface_name
* @property {string|null} [method_name] Entry method_name
* @property {ICMsgGCRoutingInfo|null} [routing] Entry routing
*/
/**
* Constructs a new Entry.
* @memberof CMsgGCMsgMasterSetWebAPIRouting
* @classdesc Represents an Entry.
* @implements IEntry
* @constructor
* @param {CMsgGCMsgMasterSetWebAPIRouting.IEntry=} [properties] Properties to set
*/
function Entry(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* Entry interface_name.
* @member {string} interface_name
* @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry
* @instance
*/
Entry.prototype.interface_name = "";
/**
* Entry method_name.
* @member {string} method_name
* @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry
* @instance
*/
Entry.prototype.method_name = "";
/**
* Entry routing.
* @member {ICMsgGCRoutingInfo|null|undefined} routing
* @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry
* @instance
*/
Entry.prototype.routing = null;
/**
* Creates a new Entry instance using the specified properties.
* @function create
* @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry
* @static
* @param {CMsgGCMsgMasterSetWebAPIRouting.IEntry=} [properties] Properties to set
* @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry} Entry instance
*/
Entry.create = function create(properties) {
return new Entry(properties);
};
/**
* Encodes the specified Entry message. Does not implicitly {@link CMsgGCMsgMasterSetWebAPIRouting.Entry.verify|verify} messages.
* @function encode
* @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry
* @static
* @param {CMsgGCMsgMasterSetWebAPIRouting.IEntry} 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) {
if (!writer)
writer = $Writer.create();
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"))
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();
return writer;
};
/**
* Encodes the specified Entry message, length delimited. Does not implicitly {@link CMsgGCMsgMasterSetWebAPIRouting.Entry.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry
* @static
* @param {CMsgGCMsgMasterSetWebAPIRouting.IEntry} 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();
};
/**
* Decodes an Entry message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes an Entry message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies an Entry message.
* @function verify
* @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
Entry.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.interface_name != null && message.hasOwnProperty("interface_name"))
if (!$util.isString(message.interface_name))
return "interface_name: string expected";
if (message.method_name != null && message.hasOwnProperty("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 (error)
return "routing." + error;
}
return null;
};
/**
* Creates an Entry message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCMsgMasterSetWebAPIRouting.Entry} Entry
*/
Entry.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCMsgMasterSetWebAPIRouting.Entry)
return object;
var message = new $root.CMsgGCMsgMasterSetWebAPIRouting.Entry();
if (object.interface_name != null)
message.interface_name = String(object.interface_name);
if (object.method_name != null)
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);
}
return message;
};
/**
* Creates a plain object from an Entry message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry
* @static
* @param {CMsgGCMsgMasterSetWebAPIRouting.Entry} message Entry
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
Entry.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.interface_name = "";
object.method_name = "";
object.routing = null;
}
if (message.interface_name != null && message.hasOwnProperty("interface_name"))
object.interface_name = message.interface_name;
if (message.method_name != null && message.hasOwnProperty("method_name"))
object.method_name = message.method_name;
if (message.routing != null && message.hasOwnProperty("routing"))
object.routing = $root.CMsgGCRoutingInfo.toObject(message.routing, options);
return object;
};
/**
* Converts this Entry to JSON.
* @function toJSON
* @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry
* @instance
* @returns {Object.<string,*>} JSON object
*/
Entry.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for Entry
* @function getTypeUrl
* @memberof CMsgGCMsgMasterSetWebAPIRouting.Entry
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
Entry.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCMsgMasterSetWebAPIRouting.Entry";
};
return Entry;
})();
return CMsgGCMsgMasterSetWebAPIRouting;
})();
$root.CMsgGCMsgMasterSetClientMsgRouting = (function() {
/**
* Properties of a CMsgGCMsgMasterSetClientMsgRouting.
* @exports ICMsgGCMsgMasterSetClientMsgRouting
* @interface ICMsgGCMsgMasterSetClientMsgRouting
* @property {Array.<CMsgGCMsgMasterSetClientMsgRouting.IEntry>|null} [entries] CMsgGCMsgMasterSetClientMsgRouting entries
* @property {Array.<ICMsgGCAddressMaskGroup>|null} [address_mask_groups] CMsgGCMsgMasterSetClientMsgRouting address_mask_groups
*/
/**
* Constructs a new CMsgGCMsgMasterSetClientMsgRouting.
* @exports CMsgGCMsgMasterSetClientMsgRouting
* @classdesc Represents a CMsgGCMsgMasterSetClientMsgRouting.
* @implements ICMsgGCMsgMasterSetClientMsgRouting
* @constructor
* @param {ICMsgGCMsgMasterSetClientMsgRouting=} [properties] Properties to set
*/
function CMsgGCMsgMasterSetClientMsgRouting(properties) {
this.entries = [];
this.address_mask_groups = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgGCMsgMasterSetClientMsgRouting entries.
* @member {Array.<CMsgGCMsgMasterSetClientMsgRouting.IEntry>} entries
* @memberof CMsgGCMsgMasterSetClientMsgRouting
* @instance
*/
CMsgGCMsgMasterSetClientMsgRouting.prototype.entries = $util.emptyArray;
/**
* CMsgGCMsgMasterSetClientMsgRouting address_mask_groups.
* @member {Array.<ICMsgGCAddressMaskGroup>} address_mask_groups
* @memberof CMsgGCMsgMasterSetClientMsgRouting
* @instance
*/
CMsgGCMsgMasterSetClientMsgRouting.prototype.address_mask_groups = $util.emptyArray;
/**
* Creates a new CMsgGCMsgMasterSetClientMsgRouting instance using the specified properties.
* @function create
* @memberof CMsgGCMsgMasterSetClientMsgRouting
* @static
* @param {ICMsgGCMsgMasterSetClientMsgRouting=} [properties] Properties to set
* @returns {CMsgGCMsgMasterSetClientMsgRouting} CMsgGCMsgMasterSetClientMsgRouting instance
*/
CMsgGCMsgMasterSetClientMsgRouting.create = function create(properties) {
return new CMsgGCMsgMasterSetClientMsgRouting(properties);
};
/**
* Encodes the specified CMsgGCMsgMasterSetClientMsgRouting message. Does not implicitly {@link CMsgGCMsgMasterSetClientMsgRouting.verify|verify} messages.
* @function encode
* @memberof CMsgGCMsgMasterSetClientMsgRouting
* @static
* @param {ICMsgGCMsgMasterSetClientMsgRouting} 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) {
if (!writer)
writer = $Writer.create();
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();
if (message.address_mask_groups != null && message.address_mask_groups.length)
for (var i = 0; i < message.address_mask_groups.length; ++i)
$root.CMsgGCAddressMaskGroup.encode(message.address_mask_groups[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
return writer;
};
/**
* Encodes the specified CMsgGCMsgMasterSetClientMsgRouting message, length delimited. Does not implicitly {@link CMsgGCMsgMasterSetClientMsgRouting.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCMsgMasterSetClientMsgRouting
* @static
* @param {ICMsgGCMsgMasterSetClientMsgRouting} 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();
};
/**
* Decodes a CMsgGCMsgMasterSetClientMsgRouting message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCMsgMasterSetClientMsgRouting
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgGCMsgMasterSetClientMsgRouting} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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;
}
case 2: {
if (!(message.address_mask_groups && message.address_mask_groups.length))
message.address_mask_groups = [];
message.address_mask_groups.push($root.CMsgGCAddressMaskGroup.decode(reader, reader.uint32()));
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a CMsgGCMsgMasterSetClientMsgRouting message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCMsgMasterSetClientMsgRouting
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCMsgMasterSetClientMsgRouting} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgGCMsgMasterSetClientMsgRouting message.
* @function verify
* @memberof CMsgGCMsgMasterSetClientMsgRouting
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgGCMsgMasterSetClientMsgRouting.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.entries != null && message.hasOwnProperty("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]);
if (error)
return "entries." + error;
}
}
if (message.address_mask_groups != null && message.hasOwnProperty("address_mask_groups")) {
if (!Array.isArray(message.address_mask_groups))
return "address_mask_groups: array expected";
for (var i = 0; i < message.address_mask_groups.length; ++i) {
var error = $root.CMsgGCAddressMaskGroup.verify(message.address_mask_groups[i]);
if (error)
return "address_mask_groups." + error;
}
}
return null;
};
/**
* Creates a CMsgGCMsgMasterSetClientMsgRouting message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCMsgMasterSetClientMsgRouting
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCMsgMasterSetClientMsgRouting} CMsgGCMsgMasterSetClientMsgRouting
*/
CMsgGCMsgMasterSetClientMsgRouting.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCMsgMasterSetClientMsgRouting)
return object;
var message = new $root.CMsgGCMsgMasterSetClientMsgRouting();
if (object.entries) {
if (!Array.isArray(object.entries))
throw TypeError(".CMsgGCMsgMasterSetClientMsgRouting.entries: array expected");
message.entries = [];
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 (object.address_mask_groups) {
if (!Array.isArray(object.address_mask_groups))
throw TypeError(".CMsgGCMsgMasterSetClientMsgRouting.address_mask_groups: array expected");
message.address_mask_groups = [];
for (var i = 0; i < object.address_mask_groups.length; ++i) {
if (typeof object.address_mask_groups[i] !== "object")
throw TypeError(".CMsgGCMsgMasterSetClientMsgRouting.address_mask_groups: object expected");
message.address_mask_groups[i] = $root.CMsgGCAddressMaskGroup.fromObject(object.address_mask_groups[i]);
}
}
return message;
};
/**
* Creates a plain object from a CMsgGCMsgMasterSetClientMsgRouting message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCMsgMasterSetClientMsgRouting
* @static
* @param {CMsgGCMsgMasterSetClientMsgRouting} message CMsgGCMsgMasterSetClientMsgRouting
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgGCMsgMasterSetClientMsgRouting.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults) {
object.entries = [];
object.address_mask_groups = [];
}
if (message.entries && message.entries.length) {
object.entries = [];
for (var j = 0; j < message.entries.length; ++j)
object.entries[j] = $root.CMsgGCMsgMasterSetClientMsgRouting.Entry.toObject(message.entries[j], options);
}
if (message.address_mask_groups && message.address_mask_groups.length) {
object.address_mask_groups = [];
for (var j = 0; j < message.address_mask_groups.length; ++j)
object.address_mask_groups[j] = $root.CMsgGCAddressMaskGroup.toObject(message.address_mask_groups[j], options);
}
return object;
};
/**
* Converts this CMsgGCMsgMasterSetClientMsgRouting to JSON.
* @function toJSON
* @memberof CMsgGCMsgMasterSetClientMsgRouting
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgGCMsgMasterSetClientMsgRouting.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgGCMsgMasterSetClientMsgRouting
* @function getTypeUrl
* @memberof CMsgGCMsgMasterSetClientMsgRouting
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgGCMsgMasterSetClientMsgRouting.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCMsgMasterSetClientMsgRouting";
};
CMsgGCMsgMasterSetClientMsgRouting.Entry = (function() {
/**
* Properties of an Entry.
* @memberof CMsgGCMsgMasterSetClientMsgRouting
* @interface IEntry
* @property {number|null} [msg_type] Entry msg_type
* @property {ICMsgGCRoutingInfo|null} [routing] Entry routing
*/
/**
* Constructs a new Entry.
* @memberof CMsgGCMsgMasterSetClientMsgRouting
* @classdesc Represents an Entry.
* @implements IEntry
* @constructor
* @param {CMsgGCMsgMasterSetClientMsgRouting.IEntry=} [properties] Properties to set
*/
function Entry(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* Entry msg_type.
* @member {number} msg_type
* @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry
* @instance
*/
Entry.prototype.msg_type = 0;
/**
* Entry routing.
* @member {ICMsgGCRoutingInfo|null|undefined} routing
* @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry
* @instance
*/
Entry.prototype.routing = null;
/**
* Creates a new Entry instance using the specified properties.
* @function create
* @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry
* @static
* @param {CMsgGCMsgMasterSetClientMsgRouting.IEntry=} [properties] Properties to set
* @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry} Entry instance
*/
Entry.create = function create(properties) {
return new Entry(properties);
};
/**
* Encodes the specified Entry message. Does not implicitly {@link CMsgGCMsgMasterSetClientMsgRouting.Entry.verify|verify} messages.
* @function encode
* @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry
* @static
* @param {CMsgGCMsgMasterSetClientMsgRouting.IEntry} 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) {
if (!writer)
writer = $Writer.create();
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();
return writer;
};
/**
* Encodes the specified Entry message, length delimited. Does not implicitly {@link CMsgGCMsgMasterSetClientMsgRouting.Entry.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry
* @static
* @param {CMsgGCMsgMasterSetClientMsgRouting.IEntry} 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();
};
/**
* Decodes an Entry message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes an Entry message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies an Entry message.
* @function verify
* @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
Entry.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.msg_type != null && message.hasOwnProperty("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 (error)
return "routing." + error;
}
return null;
};
/**
* Creates an Entry message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCMsgMasterSetClientMsgRouting.Entry} Entry
*/
Entry.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCMsgMasterSetClientMsgRouting.Entry)
return object;
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);
}
return message;
};
/**
* Creates a plain object from an Entry message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry
* @static
* @param {CMsgGCMsgMasterSetClientMsgRouting.Entry} message Entry
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
Entry.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.msg_type = 0;
object.routing = null;
}
if (message.msg_type != null && message.hasOwnProperty("msg_type"))
object.msg_type = message.msg_type;
if (message.routing != null && message.hasOwnProperty("routing"))
object.routing = $root.CMsgGCRoutingInfo.toObject(message.routing, options);
return object;
};
/**
* Converts this Entry to JSON.
* @function toJSON
* @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry
* @instance
* @returns {Object.<string,*>} JSON object
*/
Entry.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for Entry
* @function getTypeUrl
* @memberof CMsgGCMsgMasterSetClientMsgRouting.Entry
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
Entry.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCMsgMasterSetClientMsgRouting.Entry";
};
return Entry;
})();
return CMsgGCMsgMasterSetClientMsgRouting;
})();
$root.CMsgGCMsgMasterSetWebAPIRouting_Response = (function() {
/**
* Properties of a CMsgGCMsgMasterSetWebAPIRouting_Response.
* @exports ICMsgGCMsgMasterSetWebAPIRouting_Response
* @interface ICMsgGCMsgMasterSetWebAPIRouting_Response
* @property {number|null} [eresult] CMsgGCMsgMasterSetWebAPIRouting_Response eresult
*/
/**
* Constructs a new CMsgGCMsgMasterSetWebAPIRouting_Response.
* @exports CMsgGCMsgMasterSetWebAPIRouting_Response
* @classdesc Represents a CMsgGCMsgMasterSetWebAPIRouting_Response.
* @implements ICMsgGCMsgMasterSetWebAPIRouting_Response
* @constructor
* @param {ICMsgGCMsgMasterSetWebAPIRouting_Response=} [properties] Properties to set
*/
function CMsgGCMsgMasterSetWebAPIRouting_Response(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgGCMsgMasterSetWebAPIRouting_Response eresult.
* @member {number} eresult
* @memberof CMsgGCMsgMasterSetWebAPIRouting_Response
* @instance
*/
CMsgGCMsgMasterSetWebAPIRouting_Response.prototype.eresult = 2;
/**
* Creates a new CMsgGCMsgMasterSetWebAPIRouting_Response instance using the specified properties.
* @function create
* @memberof CMsgGCMsgMasterSetWebAPIRouting_Response
* @static
* @param {ICMsgGCMsgMasterSetWebAPIRouting_Response=} [properties] Properties to set
* @returns {CMsgGCMsgMasterSetWebAPIRouting_Response} CMsgGCMsgMasterSetWebAPIRouting_Response instance
*/
CMsgGCMsgMasterSetWebAPIRouting_Response.create = function create(properties) {
return new CMsgGCMsgMasterSetWebAPIRouting_Response(properties);
};
/**
* Encodes the specified CMsgGCMsgMasterSetWebAPIRouting_Response message. Does not implicitly {@link CMsgGCMsgMasterSetWebAPIRouting_Response.verify|verify} messages.
* @function encode
* @memberof CMsgGCMsgMasterSetWebAPIRouting_Response
* @static
* @param {ICMsgGCMsgMasterSetWebAPIRouting_Response} 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) {
if (!writer)
writer = $Writer.create();
if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult"))
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult);
return writer;
};
/**
* Encodes the specified CMsgGCMsgMasterSetWebAPIRouting_Response message, length delimited. Does not implicitly {@link CMsgGCMsgMasterSetWebAPIRouting_Response.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCMsgMasterSetWebAPIRouting_Response
* @static
* @param {ICMsgGCMsgMasterSetWebAPIRouting_Response} 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();
};
/**
* Decodes a CMsgGCMsgMasterSetWebAPIRouting_Response message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCMsgMasterSetWebAPIRouting_Response
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgGCMsgMasterSetWebAPIRouting_Response message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCMsgMasterSetWebAPIRouting_Response
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCMsgMasterSetWebAPIRouting_Response} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgGCMsgMasterSetWebAPIRouting_Response message.
* @function verify
* @memberof CMsgGCMsgMasterSetWebAPIRouting_Response
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgGCMsgMasterSetWebAPIRouting_Response.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.eresult != null && message.hasOwnProperty("eresult"))
if (!$util.isInteger(message.eresult))
return "eresult: integer expected";
return null;
};
/**
* Creates a CMsgGCMsgMasterSetWebAPIRouting_Response message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCMsgMasterSetWebAPIRouting_Response
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCMsgMasterSetWebAPIRouting_Response} CMsgGCMsgMasterSetWebAPIRouting_Response
*/
CMsgGCMsgMasterSetWebAPIRouting_Response.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCMsgMasterSetWebAPIRouting_Response)
return object;
var message = new $root.CMsgGCMsgMasterSetWebAPIRouting_Response();
if (object.eresult != null)
message.eresult = object.eresult | 0;
return message;
};
/**
* Creates a plain object from a CMsgGCMsgMasterSetWebAPIRouting_Response message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCMsgMasterSetWebAPIRouting_Response
* @static
* @param {CMsgGCMsgMasterSetWebAPIRouting_Response} message CMsgGCMsgMasterSetWebAPIRouting_Response
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgGCMsgMasterSetWebAPIRouting_Response.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults)
object.eresult = 2;
if (message.eresult != null && message.hasOwnProperty("eresult"))
object.eresult = message.eresult;
return object;
};
/**
* Converts this CMsgGCMsgMasterSetWebAPIRouting_Response to JSON.
* @function toJSON
* @memberof CMsgGCMsgMasterSetWebAPIRouting_Response
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgGCMsgMasterSetWebAPIRouting_Response.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgGCMsgMasterSetWebAPIRouting_Response
* @function getTypeUrl
* @memberof CMsgGCMsgMasterSetWebAPIRouting_Response
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgGCMsgMasterSetWebAPIRouting_Response.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCMsgMasterSetWebAPIRouting_Response";
};
return CMsgGCMsgMasterSetWebAPIRouting_Response;
})();
$root.CMsgGCMsgMasterSetClientMsgRouting_Response = (function() {
/**
* Properties of a CMsgGCMsgMasterSetClientMsgRouting_Response.
* @exports ICMsgGCMsgMasterSetClientMsgRouting_Response
* @interface ICMsgGCMsgMasterSetClientMsgRouting_Response
* @property {number|null} [eresult] CMsgGCMsgMasterSetClientMsgRouting_Response eresult
*/
/**
* Constructs a new CMsgGCMsgMasterSetClientMsgRouting_Response.
* @exports CMsgGCMsgMasterSetClientMsgRouting_Response
* @classdesc Represents a CMsgGCMsgMasterSetClientMsgRouting_Response.
* @implements ICMsgGCMsgMasterSetClientMsgRouting_Response
* @constructor
* @param {ICMsgGCMsgMasterSetClientMsgRouting_Response=} [properties] Properties to set
*/
function CMsgGCMsgMasterSetClientMsgRouting_Response(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgGCMsgMasterSetClientMsgRouting_Response eresult.
* @member {number} eresult
* @memberof CMsgGCMsgMasterSetClientMsgRouting_Response
* @instance
*/
CMsgGCMsgMasterSetClientMsgRouting_Response.prototype.eresult = 2;
/**
* Creates a new CMsgGCMsgMasterSetClientMsgRouting_Response instance using the specified properties.
* @function create
* @memberof CMsgGCMsgMasterSetClientMsgRouting_Response
* @static
* @param {ICMsgGCMsgMasterSetClientMsgRouting_Response=} [properties] Properties to set
* @returns {CMsgGCMsgMasterSetClientMsgRouting_Response} CMsgGCMsgMasterSetClientMsgRouting_Response instance
*/
CMsgGCMsgMasterSetClientMsgRouting_Response.create = function create(properties) {
return new CMsgGCMsgMasterSetClientMsgRouting_Response(properties);
};
/**
* Encodes the specified CMsgGCMsgMasterSetClientMsgRouting_Response message. Does not implicitly {@link CMsgGCMsgMasterSetClientMsgRouting_Response.verify|verify} messages.
* @function encode
* @memberof CMsgGCMsgMasterSetClientMsgRouting_Response
* @static
* @param {ICMsgGCMsgMasterSetClientMsgRouting_Response} 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) {
if (!writer)
writer = $Writer.create();
if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult"))
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.eresult);
return writer;
};
/**
* Encodes the specified CMsgGCMsgMasterSetClientMsgRouting_Response message, length delimited. Does not implicitly {@link CMsgGCMsgMasterSetClientMsgRouting_Response.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCMsgMasterSetClientMsgRouting_Response
* @static
* @param {ICMsgGCMsgMasterSetClientMsgRouting_Response} 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();
};
/**
* Decodes a CMsgGCMsgMasterSetClientMsgRouting_Response message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCMsgMasterSetClientMsgRouting_Response
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgGCMsgMasterSetClientMsgRouting_Response message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCMsgMasterSetClientMsgRouting_Response
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCMsgMasterSetClientMsgRouting_Response} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgGCMsgMasterSetClientMsgRouting_Response message.
* @function verify
* @memberof CMsgGCMsgMasterSetClientMsgRouting_Response
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgGCMsgMasterSetClientMsgRouting_Response.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.eresult != null && message.hasOwnProperty("eresult"))
if (!$util.isInteger(message.eresult))
return "eresult: integer expected";
return null;
};
/**
* Creates a CMsgGCMsgMasterSetClientMsgRouting_Response message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCMsgMasterSetClientMsgRouting_Response
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCMsgMasterSetClientMsgRouting_Response} CMsgGCMsgMasterSetClientMsgRouting_Response
*/
CMsgGCMsgMasterSetClientMsgRouting_Response.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCMsgMasterSetClientMsgRouting_Response)
return object;
var message = new $root.CMsgGCMsgMasterSetClientMsgRouting_Response();
if (object.eresult != null)
message.eresult = object.eresult | 0;
return message;
};
/**
* Creates a plain object from a CMsgGCMsgMasterSetClientMsgRouting_Response message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCMsgMasterSetClientMsgRouting_Response
* @static
* @param {CMsgGCMsgMasterSetClientMsgRouting_Response} message CMsgGCMsgMasterSetClientMsgRouting_Response
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgGCMsgMasterSetClientMsgRouting_Response.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults)
object.eresult = 2;
if (message.eresult != null && message.hasOwnProperty("eresult"))
object.eresult = message.eresult;
return object;
};
/**
* Converts this CMsgGCMsgMasterSetClientMsgRouting_Response to JSON.
* @function toJSON
* @memberof CMsgGCMsgMasterSetClientMsgRouting_Response
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgGCMsgMasterSetClientMsgRouting_Response.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgGCMsgMasterSetClientMsgRouting_Response
* @function getTypeUrl
* @memberof CMsgGCMsgMasterSetClientMsgRouting_Response
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgGCMsgMasterSetClientMsgRouting_Response.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCMsgMasterSetClientMsgRouting_Response";
};
return CMsgGCMsgMasterSetClientMsgRouting_Response;
})();
$root.CMsgGCMsgSetOptions = (function() {
/**
* Properties of a CMsgGCMsgSetOptions.
* @exports ICMsgGCMsgSetOptions
* @interface ICMsgGCMsgSetOptions
* @property {Array.<CMsgGCMsgSetOptions.Option>|null} [options] CMsgGCMsgSetOptions options
* @property {Array.<CMsgGCMsgSetOptions.IMessageRange>|null} [client_msg_ranges] CMsgGCMsgSetOptions client_msg_ranges
*/
/**
* Constructs a new CMsgGCMsgSetOptions.
* @exports CMsgGCMsgSetOptions
* @classdesc Represents a CMsgGCMsgSetOptions.
* @implements ICMsgGCMsgSetOptions
* @constructor
* @param {ICMsgGCMsgSetOptions=} [properties] Properties to set
*/
function CMsgGCMsgSetOptions(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)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgGCMsgSetOptions options.
* @member {Array.<CMsgGCMsgSetOptions.Option>} options
* @memberof CMsgGCMsgSetOptions
* @instance
*/
CMsgGCMsgSetOptions.prototype.options = $util.emptyArray;
/**
* CMsgGCMsgSetOptions client_msg_ranges.
* @member {Array.<CMsgGCMsgSetOptions.IMessageRange>} client_msg_ranges
* @memberof CMsgGCMsgSetOptions
* @instance
*/
CMsgGCMsgSetOptions.prototype.client_msg_ranges = $util.emptyArray;
/**
* Creates a new CMsgGCMsgSetOptions instance using the specified properties.
* @function create
* @memberof CMsgGCMsgSetOptions
* @static
* @param {ICMsgGCMsgSetOptions=} [properties] Properties to set
* @returns {CMsgGCMsgSetOptions} CMsgGCMsgSetOptions instance
*/
CMsgGCMsgSetOptions.create = function create(properties) {
return new CMsgGCMsgSetOptions(properties);
};
/**
* Encodes the specified CMsgGCMsgSetOptions message. Does not implicitly {@link CMsgGCMsgSetOptions.verify|verify} messages.
* @function encode
* @memberof CMsgGCMsgSetOptions
* @static
* @param {ICMsgGCMsgSetOptions} 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) {
if (!writer)
writer = $Writer.create();
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();
return writer;
};
/**
* Encodes the specified CMsgGCMsgSetOptions message, length delimited. Does not implicitly {@link CMsgGCMsgSetOptions.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCMsgSetOptions
* @static
* @param {ICMsgGCMsgSetOptions} 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();
};
/**
* Decodes a CMsgGCMsgSetOptions message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCMsgSetOptions
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgGCMsgSetOptions} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgGCMsgSetOptions();
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;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a CMsgGCMsgSetOptions message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCMsgSetOptions
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCMsgSetOptions} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgGCMsgSetOptions message.
* @function verify
* @memberof CMsgGCMsgSetOptions
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgGCMsgSetOptions.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.options != null && message.hasOwnProperty("options")) {
if (!Array.isArray(message.options))
return "options: array expected";
for (var i = 0; i < message.options.length; ++i)
switch (message.options[i]) {
default:
return "options: enum value[] expected";
case 0:
case 1:
case 2:
case 3:
break;
}
}
if (message.client_msg_ranges != null && message.hasOwnProperty("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]);
if (error)
return "client_msg_ranges." + error;
}
}
return null;
};
/**
* Creates a CMsgGCMsgSetOptions message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCMsgSetOptions
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCMsgSetOptions} CMsgGCMsgSetOptions
*/
CMsgGCMsgSetOptions.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCMsgSetOptions)
return object;
var message = new $root.CMsgGCMsgSetOptions();
if (object.options) {
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:
if (typeof object.options[i] === "number") {
message.options[i] = object.options[i];
break;
}
case "NOTIFY_USER_SESSIONS":
case 0:
message.options[i] = 0;
break;
case "NOTIFY_SERVER_SESSIONS":
case 1:
message.options[i] = 1;
break;
case "NOTIFY_ACHIEVEMENTS":
case 2:
message.options[i] = 2;
break;
case "NOTIFY_VAC_ACTION":
case 3:
message.options[i] = 3;
break;
}
}
if (object.client_msg_ranges) {
if (!Array.isArray(object.client_msg_ranges))
throw TypeError(".CMsgGCMsgSetOptions.client_msg_ranges: array expected");
message.client_msg_ranges = [];
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]);
}
}
return message;
};
/**
* Creates a plain object from a CMsgGCMsgSetOptions message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCMsgSetOptions
* @static
* @param {CMsgGCMsgSetOptions} message CMsgGCMsgSetOptions
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgGCMsgSetOptions.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults) {
object.options = [];
object.client_msg_ranges = [];
}
if (message.options && message.options.length) {
object.options = [];
for (var j = 0; j < message.options.length; ++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 = [];
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);
}
return object;
};
/**
* Converts this CMsgGCMsgSetOptions to JSON.
* @function toJSON
* @memberof CMsgGCMsgSetOptions
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgGCMsgSetOptions.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgGCMsgSetOptions
* @function getTypeUrl
* @memberof CMsgGCMsgSetOptions
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgGCMsgSetOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCMsgSetOptions";
};
CMsgGCMsgSetOptions.MessageRange = (function() {
/**
* Properties of a MessageRange.
* @memberof CMsgGCMsgSetOptions
* @interface IMessageRange
* @property {number} low MessageRange low
* @property {number} high MessageRange high
*/
/**
* Constructs a new MessageRange.
* @memberof CMsgGCMsgSetOptions
* @classdesc Represents a MessageRange.
* @implements IMessageRange
* @constructor
* @param {CMsgGCMsgSetOptions.IMessageRange=} [properties] Properties to set
*/
function MessageRange(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* MessageRange low.
* @member {number} low
* @memberof CMsgGCMsgSetOptions.MessageRange
* @instance
*/
MessageRange.prototype.low = 0;
/**
* MessageRange high.
* @member {number} high
* @memberof CMsgGCMsgSetOptions.MessageRange
* @instance
*/
MessageRange.prototype.high = 0;
/**
* Creates a new MessageRange instance using the specified properties.
* @function create
* @memberof CMsgGCMsgSetOptions.MessageRange
* @static
* @param {CMsgGCMsgSetOptions.IMessageRange=} [properties] Properties to set
* @returns {CMsgGCMsgSetOptions.MessageRange} MessageRange instance
*/
MessageRange.create = function create(properties) {
return new MessageRange(properties);
};
/**
* Encodes the specified MessageRange message. Does not implicitly {@link CMsgGCMsgSetOptions.MessageRange.verify|verify} messages.
* @function encode
* @memberof CMsgGCMsgSetOptions.MessageRange
* @static
* @param {CMsgGCMsgSetOptions.IMessageRange} 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) {
if (!writer)
writer = $Writer.create();
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.low);
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.high);
return writer;
};
/**
* Encodes the specified MessageRange message, length delimited. Does not implicitly {@link CMsgGCMsgSetOptions.MessageRange.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCMsgSetOptions.MessageRange
* @static
* @param {CMsgGCMsgSetOptions.IMessageRange} 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();
};
/**
* Decodes a MessageRange message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCMsgSetOptions.MessageRange
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgGCMsgSetOptions.MessageRange} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
if (!message.hasOwnProperty("low"))
throw $util.ProtocolError("missing required 'low'", { instance: message });
if (!message.hasOwnProperty("high"))
throw $util.ProtocolError("missing required 'high'", { instance: message });
return message;
};
/**
* Decodes a MessageRange message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCMsgSetOptions.MessageRange
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCMsgSetOptions.MessageRange} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a MessageRange message.
* @function verify
* @memberof CMsgGCMsgSetOptions.MessageRange
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
MessageRange.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (!$util.isInteger(message.low))
return "low: integer expected";
if (!$util.isInteger(message.high))
return "high: integer expected";
return null;
};
/**
* Creates a MessageRange message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCMsgSetOptions.MessageRange
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCMsgSetOptions.MessageRange} MessageRange
*/
MessageRange.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCMsgSetOptions.MessageRange)
return object;
var message = new $root.CMsgGCMsgSetOptions.MessageRange();
if (object.low != null)
message.low = object.low >>> 0;
if (object.high != null)
message.high = object.high >>> 0;
return message;
};
/**
* Creates a plain object from a MessageRange message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCMsgSetOptions.MessageRange
* @static
* @param {CMsgGCMsgSetOptions.MessageRange} message MessageRange
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
MessageRange.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.low = 0;
object.high = 0;
}
if (message.low != null && message.hasOwnProperty("low"))
object.low = message.low;
if (message.high != null && message.hasOwnProperty("high"))
object.high = message.high;
return object;
};
/**
* Converts this MessageRange to JSON.
* @function toJSON
* @memberof CMsgGCMsgSetOptions.MessageRange
* @instance
* @returns {Object.<string,*>} JSON object
*/
MessageRange.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for MessageRange
* @function getTypeUrl
* @memberof CMsgGCMsgSetOptions.MessageRange
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
MessageRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCMsgSetOptions.MessageRange";
};
return MessageRange;
})();
/**
* Option enum.
* @name CMsgGCMsgSetOptions.Option
* @enum {number}
* @property {number} NOTIFY_USER_SESSIONS=0 NOTIFY_USER_SESSIONS value
* @property {number} NOTIFY_SERVER_SESSIONS=1 NOTIFY_SERVER_SESSIONS value
* @property {number} NOTIFY_ACHIEVEMENTS=2 NOTIFY_ACHIEVEMENTS value
* @property {number} NOTIFY_VAC_ACTION=3 NOTIFY_VAC_ACTION value
*/
CMsgGCMsgSetOptions.Option = (function() {
var valuesById = {}, values = Object.create(valuesById);
values[valuesById[0] = "NOTIFY_USER_SESSIONS"] = 0;
values[valuesById[1] = "NOTIFY_SERVER_SESSIONS"] = 1;
values[valuesById[2] = "NOTIFY_ACHIEVEMENTS"] = 2;
values[valuesById[3] = "NOTIFY_VAC_ACTION"] = 3;
return values;
})();
return CMsgGCMsgSetOptions;
})();
$root.CMsgGCHUpdateSession = (function() {
/**
* Properties of a CMsgGCHUpdateSession.
* @exports ICMsgGCHUpdateSession
* @interface ICMsgGCHUpdateSession
* @property {number|Long|null} [steam_id] CMsgGCHUpdateSession steam_id
* @property {number|null} [app_id] CMsgGCHUpdateSession app_id
* @property {boolean|null} [online] CMsgGCHUpdateSession online
* @property {number|Long|null} [server_steam_id] CMsgGCHUpdateSession server_steam_id
* @property {number|null} [server_addr] CMsgGCHUpdateSession server_addr
* @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.<CMsgGCHUpdateSession.IExtraField>|null} [extra_fields] CMsgGCHUpdateSession extra_fields
* @property {number|Long|null} [owner_id] CMsgGCHUpdateSession owner_id
* @property {number|null} [cm_session_sysid] CMsgGCHUpdateSession cm_session_sysid
* @property {number|null} [cm_session_identifier] CMsgGCHUpdateSession cm_session_identifier
* @property {Array.<number>|null} [depot_ids] CMsgGCHUpdateSession depot_ids
*/
/**
* Constructs a new CMsgGCHUpdateSession.
* @exports CMsgGCHUpdateSession
* @classdesc Represents a CMsgGCHUpdateSession.
* @implements ICMsgGCHUpdateSession
* @constructor
* @param {ICMsgGCHUpdateSession=} [properties] Properties to set
*/
function CMsgGCHUpdateSession(properties) {
this.extra_fields = [];
this.depot_ids = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgGCHUpdateSession steam_id.
* @member {number|Long} steam_id
* @memberof CMsgGCHUpdateSession
* @instance
*/
CMsgGCHUpdateSession.prototype.steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* CMsgGCHUpdateSession app_id.
* @member {number} app_id
* @memberof CMsgGCHUpdateSession
* @instance
*/
CMsgGCHUpdateSession.prototype.app_id = 0;
/**
* CMsgGCHUpdateSession online.
* @member {boolean} online
* @memberof CMsgGCHUpdateSession
* @instance
*/
CMsgGCHUpdateSession.prototype.online = false;
/**
* CMsgGCHUpdateSession server_steam_id.
* @member {number|Long} server_steam_id
* @memberof CMsgGCHUpdateSession
* @instance
*/
CMsgGCHUpdateSession.prototype.server_steam_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* CMsgGCHUpdateSession server_addr.
* @member {number} server_addr
* @memberof CMsgGCHUpdateSession
* @instance
*/
CMsgGCHUpdateSession.prototype.server_addr = 0;
/**
* CMsgGCHUpdateSession server_port.
* @member {number} server_port
* @memberof CMsgGCHUpdateSession
* @instance
*/
CMsgGCHUpdateSession.prototype.server_port = 0;
/**
* CMsgGCHUpdateSession os_type.
* @member {number} os_type
* @memberof CMsgGCHUpdateSession
* @instance
*/
CMsgGCHUpdateSession.prototype.os_type = 0;
/**
* CMsgGCHUpdateSession client_addr.
* @member {number} client_addr
* @memberof CMsgGCHUpdateSession
* @instance
*/
CMsgGCHUpdateSession.prototype.client_addr = 0;
/**
* CMsgGCHUpdateSession extra_fields.
* @member {Array.<CMsgGCHUpdateSession.IExtraField>} extra_fields
* @memberof CMsgGCHUpdateSession
* @instance
*/
CMsgGCHUpdateSession.prototype.extra_fields = $util.emptyArray;
/**
* CMsgGCHUpdateSession owner_id.
* @member {number|Long} owner_id
* @memberof CMsgGCHUpdateSession
* @instance
*/
CMsgGCHUpdateSession.prototype.owner_id = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* CMsgGCHUpdateSession cm_session_sysid.
* @member {number} cm_session_sysid
* @memberof CMsgGCHUpdateSession
* @instance
*/
CMsgGCHUpdateSession.prototype.cm_session_sysid = 0;
/**
* CMsgGCHUpdateSession cm_session_identifier.
* @member {number} cm_session_identifier
* @memberof CMsgGCHUpdateSession
* @instance
*/
CMsgGCHUpdateSession.prototype.cm_session_identifier = 0;
/**
* CMsgGCHUpdateSession depot_ids.
* @member {Array.<number>} depot_ids
* @memberof CMsgGCHUpdateSession
* @instance
*/
CMsgGCHUpdateSession.prototype.depot_ids = $util.emptyArray;
/**
* Creates a new CMsgGCHUpdateSession instance using the specified properties.
* @function create
* @memberof CMsgGCHUpdateSession
* @static
* @param {ICMsgGCHUpdateSession=} [properties] Properties to set
* @returns {CMsgGCHUpdateSession} CMsgGCHUpdateSession instance
*/
CMsgGCHUpdateSession.create = function create(properties) {
return new CMsgGCHUpdateSession(properties);
};
/**
* Encodes the specified CMsgGCHUpdateSession message. Does not implicitly {@link CMsgGCHUpdateSession.verify|verify} messages.
* @function encode
* @memberof CMsgGCHUpdateSession
* @static
* @param {ICMsgGCHUpdateSession} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.app_id);
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"))
writer.uint32(/* id 4, wireType 1 =*/33).fixed64(message.server_steam_id);
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"))
writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.server_port);
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"))
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();
if (message.owner_id != null && Object.hasOwnProperty.call(message, "owner_id"))
writer.uint32(/* id 10, wireType 1 =*/81).fixed64(message.owner_id);
if (message.cm_session_sysid != null && Object.hasOwnProperty.call(message, "cm_session_sysid"))
writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.cm_session_sysid);
if (message.cm_session_identifier != null && Object.hasOwnProperty.call(message, "cm_session_identifier"))
writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.cm_session_identifier);
if (message.depot_ids != null && message.depot_ids.length)
for (var i = 0; i < message.depot_ids.length; ++i)
writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.depot_ids[i]);
return writer;
};
/**
* Encodes the specified CMsgGCHUpdateSession message, length delimited. Does not implicitly {@link CMsgGCHUpdateSession.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCHUpdateSession
* @static
* @param {ICMsgGCHUpdateSession} 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();
};
/**
* Decodes a CMsgGCHUpdateSession message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCHUpdateSession
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgGCHUpdateSession} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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;
}
case 10: {
message.owner_id = reader.fixed64();
break;
}
case 11: {
message.cm_session_sysid = reader.uint32();
break;
}
case 12: {
message.cm_session_identifier = reader.uint32();
break;
}
case 13: {
if (!(message.depot_ids && message.depot_ids.length))
message.depot_ids = [];
if ((tag & 7) === 2) {
var end2 = reader.uint32() + reader.pos;
while (reader.pos < end2)
message.depot_ids.push(reader.uint32());
} else
message.depot_ids.push(reader.uint32());
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a CMsgGCHUpdateSession message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCHUpdateSession
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCHUpdateSession} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgGCHUpdateSession message.
* @function verify
* @memberof CMsgGCHUpdateSession
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgGCHUpdateSession.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.steam_id != null && message.hasOwnProperty("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 (!$util.isInteger(message.app_id))
return "app_id: integer expected";
if (message.online != null && message.hasOwnProperty("online"))
if (typeof message.online !== "boolean")
return "online: boolean expected";
if (message.server_steam_id != null && message.hasOwnProperty("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 (!$util.isInteger(message.server_addr))
return "server_addr: integer expected";
if (message.server_port != null && message.hasOwnProperty("server_port"))
if (!$util.isInteger(message.server_port))
return "server_port: integer expected";
if (message.os_type != null && message.hasOwnProperty("os_type"))
if (!$util.isInteger(message.os_type))
return "os_type: integer expected";
if (message.client_addr != null && message.hasOwnProperty("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))
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]);
if (error)
return "extra_fields." + error;
}
}
if (message.owner_id != null && message.hasOwnProperty("owner_id"))
if (!$util.isInteger(message.owner_id) && !(message.owner_id && $util.isInteger(message.owner_id.low) && $util.isInteger(message.owner_id.high)))
return "owner_id: integer|Long expected";
if (message.cm_session_sysid != null && message.hasOwnProperty("cm_session_sysid"))
if (!$util.isInteger(message.cm_session_sysid))
return "cm_session_sysid: integer expected";
if (message.cm_session_identifier != null && message.hasOwnProperty("cm_session_identifier"))
if (!$util.isInteger(message.cm_session_identifier))
return "cm_session_identifier: integer expected";
if (message.depot_ids != null && message.hasOwnProperty("depot_ids")) {
if (!Array.isArray(message.depot_ids))
return "depot_ids: array expected";
for (var i = 0; i < message.depot_ids.length; ++i)
if (!$util.isInteger(message.depot_ids[i]))
return "depot_ids: integer[] expected";
}
return null;
};
/**
* Creates a CMsgGCHUpdateSession message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCHUpdateSession
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCHUpdateSession} CMsgGCHUpdateSession
*/
CMsgGCHUpdateSession.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCHUpdateSession)
return object;
var message = new $root.CMsgGCHUpdateSession();
if (object.steam_id != null)
if ($util.Long)
(message.steam_id = $util.Long.fromValue(object.steam_id)).unsigned = false;
else if (typeof object.steam_id === "string")
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();
if (object.app_id != null)
message.app_id = object.app_id >>> 0;
if (object.online != null)
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;
else if (typeof object.server_steam_id === "string")
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();
if (object.server_addr != null)
message.server_addr = object.server_addr >>> 0;
if (object.server_port != null)
message.server_port = object.server_port >>> 0;
if (object.os_type != null)
message.os_type = object.os_type >>> 0;
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 = [];
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 (object.owner_id != null)
if ($util.Long)
(message.owner_id = $util.Long.fromValue(object.owner_id)).unsigned = false;
else if (typeof object.owner_id === "string")
message.owner_id = parseInt(object.owner_id, 10);
else if (typeof object.owner_id === "number")
message.owner_id = object.owner_id;
else if (typeof object.owner_id === "object")
message.owner_id = new $util.LongBits(object.owner_id.low >>> 0, object.owner_id.high >>> 0).toNumber();
if (object.cm_session_sysid != null)
message.cm_session_sysid = object.cm_session_sysid >>> 0;
if (object.cm_session_identifier != null)
message.cm_session_identifier = object.cm_session_identifier >>> 0;
if (object.depot_ids) {
if (!Array.isArray(object.depot_ids))
throw TypeError(".CMsgGCHUpdateSession.depot_ids: array expected");
message.depot_ids = [];
for (var i = 0; i < object.depot_ids.length; ++i)
message.depot_ids[i] = object.depot_ids[i] >>> 0;
}
return message;
};
/**
* Creates a plain object from a CMsgGCHUpdateSession message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCHUpdateSession
* @static
* @param {CMsgGCHUpdateSession} message CMsgGCHUpdateSession
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgGCHUpdateSession.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults) {
object.extra_fields = [];
object.depot_ids = [];
}
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;
} else
object.steam_id = options.longs === String ? "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;
} else
object.server_steam_id = options.longs === String ? "0" : 0;
object.server_addr = 0;
object.server_port = 0;
object.os_type = 0;
object.client_addr = 0;
if ($util.Long) {
var long = new $util.Long(0, 0, false);
object.owner_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
} else
object.owner_id = options.longs === String ? "0" : 0;
object.cm_session_sysid = 0;
object.cm_session_identifier = 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;
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.app_id = message.app_id;
if (message.online != null && message.hasOwnProperty("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;
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_addr = message.server_addr;
if (message.server_port != null && message.hasOwnProperty("server_port"))
object.server_port = message.server_port;
if (message.os_type != null && message.hasOwnProperty("os_type"))
object.os_type = message.os_type;
if (message.client_addr != null && message.hasOwnProperty("client_addr"))
object.client_addr = message.client_addr;
if (message.extra_fields && message.extra_fields.length) {
object.extra_fields = [];
for (var j = 0; j < message.extra_fields.length; ++j)
object.extra_fields[j] = $root.CMsgGCHUpdateSession.ExtraField.toObject(message.extra_fields[j], options);
}
if (message.owner_id != null && message.hasOwnProperty("owner_id"))
if (typeof message.owner_id === "number")
object.owner_id = options.longs === String ? String(message.owner_id) : message.owner_id;
else
object.owner_id = options.longs === String ? $util.Long.prototype.toString.call(message.owner_id) : options.longs === Number ? new $util.LongBits(message.owner_id.low >>> 0, message.owner_id.high >>> 0).toNumber() : message.owner_id;
if (message.cm_session_sysid != null && message.hasOwnProperty("cm_session_sysid"))
object.cm_session_sysid = message.cm_session_sysid;
if (message.cm_session_identifier != null && message.hasOwnProperty("cm_session_identifier"))
object.cm_session_identifier = message.cm_session_identifier;
if (message.depot_ids && message.depot_ids.length) {
object.depot_ids = [];
for (var j = 0; j < message.depot_ids.length; ++j)
object.depot_ids[j] = message.depot_ids[j];
}
return object;
};
/**
* Converts this CMsgGCHUpdateSession to JSON.
* @function toJSON
* @memberof CMsgGCHUpdateSession
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgGCHUpdateSession.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgGCHUpdateSession
* @function getTypeUrl
* @memberof CMsgGCHUpdateSession
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgGCHUpdateSession.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCHUpdateSession";
};
CMsgGCHUpdateSession.ExtraField = (function() {
/**
* Properties of an ExtraField.
* @memberof CMsgGCHUpdateSession
* @interface IExtraField
* @property {string|null} [name] ExtraField name
* @property {string|null} [value] ExtraField value
*/
/**
* Constructs a new ExtraField.
* @memberof CMsgGCHUpdateSession
* @classdesc Represents an ExtraField.
* @implements IExtraField
* @constructor
* @param {CMsgGCHUpdateSession.IExtraField=} [properties] Properties to set
*/
function ExtraField(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* ExtraField name.
* @member {string} name
* @memberof CMsgGCHUpdateSession.ExtraField
* @instance
*/
ExtraField.prototype.name = "";
/**
* ExtraField value.
* @member {string} value
* @memberof CMsgGCHUpdateSession.ExtraField
* @instance
*/
ExtraField.prototype.value = "";
/**
* Creates a new ExtraField instance using the specified properties.
* @function create
* @memberof CMsgGCHUpdateSession.ExtraField
* @static
* @param {CMsgGCHUpdateSession.IExtraField=} [properties] Properties to set
* @returns {CMsgGCHUpdateSession.ExtraField} ExtraField instance
*/
ExtraField.create = function create(properties) {
return new ExtraField(properties);
};
/**
* Encodes the specified ExtraField message. Does not implicitly {@link CMsgGCHUpdateSession.ExtraField.verify|verify} messages.
* @function encode
* @memberof CMsgGCHUpdateSession.ExtraField
* @static
* @param {CMsgGCHUpdateSession.IExtraField} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 2 =*/18).string(message.value);
return writer;
};
/**
* Encodes the specified ExtraField message, length delimited. Does not implicitly {@link CMsgGCHUpdateSession.ExtraField.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgGCHUpdateSession.ExtraField
* @static
* @param {CMsgGCHUpdateSession.IExtraField} 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();
};
/**
* Decodes an ExtraField message from the specified reader or buffer.
* @function decode
* @memberof CMsgGCHUpdateSession.ExtraField
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgGCHUpdateSession.ExtraField} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes an ExtraField message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgGCHUpdateSession.ExtraField
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgGCHUpdateSession.ExtraField} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies an ExtraField message.
* @function verify
* @memberof CMsgGCHUpdateSession.ExtraField
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
ExtraField.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.name != null && message.hasOwnProperty("name"))
if (!$util.isString(message.name))
return "name: string expected";
if (message.value != null && message.hasOwnProperty("value"))
if (!$util.isString(message.value))
return "value: string expected";
return null;
};
/**
* Creates an ExtraField message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgGCHUpdateSession.ExtraField
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgGCHUpdateSession.ExtraField} ExtraField
*/
ExtraField.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgGCHUpdateSession.ExtraField)
return object;
var message = new $root.CMsgGCHUpdateSession.ExtraField();
if (object.name != null)
message.name = String(object.name);
if (object.value != null)
message.value = String(object.value);
return message;
};
/**
* Creates a plain object from an ExtraField message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgGCHUpdateSession.ExtraField
* @static
* @param {CMsgGCHUpdateSession.ExtraField} message ExtraField
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
ExtraField.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.name = "";
object.value = "";
}
if (message.name != null && message.hasOwnProperty("name"))
object.name = message.name;
if (message.value != null && message.hasOwnProperty("value"))
object.value = message.value;
return object;
};
/**
* Converts this ExtraField to JSON.
* @function toJSON
* @memberof CMsgGCHUpdateSession.ExtraField
* @instance
* @returns {Object.<string,*>} JSON object
*/
ExtraField.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for ExtraField
* @function getTypeUrl
* @memberof CMsgGCHUpdateSession.ExtraField
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
ExtraField.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgGCHUpdateSession.ExtraField";
};
return ExtraField;
})();
return CMsgGCHUpdateSession;
})();
$root.CMsgNotificationOfSuspiciousActivity = (function() {
/**
* Properties of a CMsgNotificationOfSuspiciousActivity.
* @exports ICMsgNotificationOfSuspiciousActivity
* @interface ICMsgNotificationOfSuspiciousActivity
* @property {number|Long|null} [steamid] CMsgNotificationOfSuspiciousActivity steamid
* @property {number|null} [appid] CMsgNotificationOfSuspiciousActivity appid
* @property {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances|null} [multiple_instances] CMsgNotificationOfSuspiciousActivity multiple_instances
*/
/**
* Constructs a new CMsgNotificationOfSuspiciousActivity.
* @exports CMsgNotificationOfSuspiciousActivity
* @classdesc Represents a CMsgNotificationOfSuspiciousActivity.
* @implements ICMsgNotificationOfSuspiciousActivity
* @constructor
* @param {ICMsgNotificationOfSuspiciousActivity=} [properties] Properties to set
*/
function CMsgNotificationOfSuspiciousActivity(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgNotificationOfSuspiciousActivity steamid.
* @member {number|Long} steamid
* @memberof CMsgNotificationOfSuspiciousActivity
* @instance
*/
CMsgNotificationOfSuspiciousActivity.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* CMsgNotificationOfSuspiciousActivity appid.
* @member {number} appid
* @memberof CMsgNotificationOfSuspiciousActivity
* @instance
*/
CMsgNotificationOfSuspiciousActivity.prototype.appid = 0;
/**
* CMsgNotificationOfSuspiciousActivity multiple_instances.
* @member {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances|null|undefined} multiple_instances
* @memberof CMsgNotificationOfSuspiciousActivity
* @instance
*/
CMsgNotificationOfSuspiciousActivity.prototype.multiple_instances = null;
/**
* Creates a new CMsgNotificationOfSuspiciousActivity instance using the specified properties.
* @function create
* @memberof CMsgNotificationOfSuspiciousActivity
* @static
* @param {ICMsgNotificationOfSuspiciousActivity=} [properties] Properties to set
* @returns {CMsgNotificationOfSuspiciousActivity} CMsgNotificationOfSuspiciousActivity instance
*/
CMsgNotificationOfSuspiciousActivity.create = function create(properties) {
return new CMsgNotificationOfSuspiciousActivity(properties);
};
/**
* Encodes the specified CMsgNotificationOfSuspiciousActivity message. Does not implicitly {@link CMsgNotificationOfSuspiciousActivity.verify|verify} messages.
* @function encode
* @memberof CMsgNotificationOfSuspiciousActivity
* @static
* @param {ICMsgNotificationOfSuspiciousActivity} 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) {
if (!writer)
writer = $Writer.create();
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"))
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();
return writer;
};
/**
* Encodes the specified CMsgNotificationOfSuspiciousActivity message, length delimited. Does not implicitly {@link CMsgNotificationOfSuspiciousActivity.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgNotificationOfSuspiciousActivity
* @static
* @param {ICMsgNotificationOfSuspiciousActivity} 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();
};
/**
* Decodes a CMsgNotificationOfSuspiciousActivity message from the specified reader or buffer.
* @function decode
* @memberof CMsgNotificationOfSuspiciousActivity
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgNotificationOfSuspiciousActivity} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a CMsgNotificationOfSuspiciousActivity message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgNotificationOfSuspiciousActivity
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgNotificationOfSuspiciousActivity} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgNotificationOfSuspiciousActivity message.
* @function verify
* @memberof CMsgNotificationOfSuspiciousActivity
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgNotificationOfSuspiciousActivity.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.steamid != null && message.hasOwnProperty("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 (!$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 (error)
return "multiple_instances." + error;
}
return null;
};
/**
* Creates a CMsgNotificationOfSuspiciousActivity message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgNotificationOfSuspiciousActivity
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgNotificationOfSuspiciousActivity} CMsgNotificationOfSuspiciousActivity
*/
CMsgNotificationOfSuspiciousActivity.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgNotificationOfSuspiciousActivity)
return object;
var message = new $root.CMsgNotificationOfSuspiciousActivity();
if (object.steamid != null)
if ($util.Long)
(message.steamid = $util.Long.fromValue(object.steamid)).unsigned = false;
else if (typeof object.steamid === "string")
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();
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);
}
return message;
};
/**
* Creates a plain object from a CMsgNotificationOfSuspiciousActivity message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgNotificationOfSuspiciousActivity
* @static
* @param {CMsgNotificationOfSuspiciousActivity} message CMsgNotificationOfSuspiciousActivity
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgNotificationOfSuspiciousActivity.toObject = function toObject(message, options) {
if (!options)
options = {};
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;
} else
object.steamid = options.longs === String ? "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;
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.appid = message.appid;
if (message.multiple_instances != null && message.hasOwnProperty("multiple_instances"))
object.multiple_instances = $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.toObject(message.multiple_instances, options);
return object;
};
/**
* Converts this CMsgNotificationOfSuspiciousActivity to JSON.
* @function toJSON
* @memberof CMsgNotificationOfSuspiciousActivity
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgNotificationOfSuspiciousActivity.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgNotificationOfSuspiciousActivity
* @function getTypeUrl
* @memberof CMsgNotificationOfSuspiciousActivity
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgNotificationOfSuspiciousActivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgNotificationOfSuspiciousActivity";
};
CMsgNotificationOfSuspiciousActivity.MultipleGameInstances = (function() {
/**
* Properties of a MultipleGameInstances.
* @memberof CMsgNotificationOfSuspiciousActivity
* @interface IMultipleGameInstances
* @property {number|null} [app_instance_count] MultipleGameInstances app_instance_count
* @property {Array.<number|Long>|null} [other_steamids] MultipleGameInstances other_steamids
*/
/**
* Constructs a new MultipleGameInstances.
* @memberof CMsgNotificationOfSuspiciousActivity
* @classdesc Represents a MultipleGameInstances.
* @implements IMultipleGameInstances
* @constructor
* @param {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances=} [properties] Properties to set
*/
function MultipleGameInstances(properties) {
this.other_steamids = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* MultipleGameInstances app_instance_count.
* @member {number} app_instance_count
* @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances
* @instance
*/
MultipleGameInstances.prototype.app_instance_count = 0;
/**
* MultipleGameInstances other_steamids.
* @member {Array.<number|Long>} other_steamids
* @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances
* @instance
*/
MultipleGameInstances.prototype.other_steamids = $util.emptyArray;
/**
* Creates a new MultipleGameInstances instance using the specified properties.
* @function create
* @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances
* @static
* @param {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances=} [properties] Properties to set
* @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances} MultipleGameInstances instance
*/
MultipleGameInstances.create = function create(properties) {
return new MultipleGameInstances(properties);
};
/**
* Encodes the specified MultipleGameInstances message. Does not implicitly {@link CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.verify|verify} messages.
* @function encode
* @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances
* @static
* @param {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances} 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) {
if (!writer)
writer = $Writer.create();
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]);
return writer;
};
/**
* Encodes the specified MultipleGameInstances message, length delimited. Does not implicitly {@link CMsgNotificationOfSuspiciousActivity.MultipleGameInstances.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances
* @static
* @param {CMsgNotificationOfSuspiciousActivity.IMultipleGameInstances} 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();
};
/**
* Decodes a MultipleGameInstances message from the specified reader or buffer.
* @function decode
* @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances} 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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
message.app_instance_count = reader.uint32();
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
message.other_steamids.push(reader.fixed64());
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a MultipleGameInstances message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a MultipleGameInstances message.
* @function verify
* @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
MultipleGameInstances.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.app_instance_count != null && message.hasOwnProperty("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))
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)))
return "other_steamids: integer|Long[] expected";
}
return null;
};
/**
* Creates a MultipleGameInstances message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances} MultipleGameInstances
*/
MultipleGameInstances.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgNotificationOfSuspiciousActivity.MultipleGameInstances)
return object;
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 = [];
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;
else if (typeof object.other_steamids[i] === "string")
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();
}
return message;
};
/**
* Creates a plain object from a MultipleGameInstances message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances
* @static
* @param {CMsgNotificationOfSuspiciousActivity.MultipleGameInstances} message MultipleGameInstances
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
MultipleGameInstances.toObject = function toObject(message, options) {
if (!options)
options = {};
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"))
object.app_instance_count = message.app_instance_count;
if (message.other_steamids && message.other_steamids.length) {
object.other_steamids = [];
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];
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];
}
return object;
};
/**
* Converts this MultipleGameInstances to JSON.
* @function toJSON
* @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances
* @instance
* @returns {Object.<string,*>} JSON object
*/
MultipleGameInstances.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for MultipleGameInstances
* @function getTypeUrl
* @memberof CMsgNotificationOfSuspiciousActivity.MultipleGameInstances
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
MultipleGameInstances.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgNotificationOfSuspiciousActivity.MultipleGameInstances";
};
return MultipleGameInstances;
})();
return CMsgNotificationOfSuspiciousActivity;
})();
$root.CMsgDPPartnerMicroTxns = (function() {
/**
* Properties of a CMsgDPPartnerMicroTxns.
* @exports ICMsgDPPartnerMicroTxns
* @interface ICMsgDPPartnerMicroTxns
* @property {number|null} [appid] CMsgDPPartnerMicroTxns appid
* @property {string|null} [gc_name] CMsgDPPartnerMicroTxns gc_name
* @property {CMsgDPPartnerMicroTxns.IPartnerInfo|null} [partner] CMsgDPPartnerMicroTxns partner
* @property {Array.<CMsgDPPartnerMicroTxns.IPartnerMicroTxn>|null} [transactions] CMsgDPPartnerMicroTxns transactions
*/
/**
* Constructs a new CMsgDPPartnerMicroTxns.
* @exports CMsgDPPartnerMicroTxns
* @classdesc Represents a CMsgDPPartnerMicroTxns.
* @implements ICMsgDPPartnerMicroTxns
* @constructor
* @param {ICMsgDPPartnerMicroTxns=} [properties] Properties to set
*/
function CMsgDPPartnerMicroTxns(properties) {
this.transactions = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgDPPartnerMicroTxns appid.
* @member {number} appid
* @memberof CMsgDPPartnerMicroTxns
* @instance
*/
CMsgDPPartnerMicroTxns.prototype.appid = 0;
/**
* CMsgDPPartnerMicroTxns gc_name.
* @member {string} gc_name
* @memberof CMsgDPPartnerMicroTxns
* @instance
*/
CMsgDPPartnerMicroTxns.prototype.gc_name = "";
/**
* CMsgDPPartnerMicroTxns partner.
* @member {CMsgDPPartnerMicroTxns.IPartnerInfo|null|undefined} partner
* @memberof CMsgDPPartnerMicroTxns
* @instance
*/
CMsgDPPartnerMicroTxns.prototype.partner = null;
/**
* CMsgDPPartnerMicroTxns transactions.
* @member {Array.<CMsgDPPartnerMicroTxns.IPartnerMicroTxn>} transactions
* @memberof CMsgDPPartnerMicroTxns
* @instance
*/
CMsgDPPartnerMicroTxns.prototype.transactions = $util.emptyArray;
/**
* Creates a new CMsgDPPartnerMicroTxns instance using the specified properties.
* @function create
* @memberof CMsgDPPartnerMicroTxns
* @static
* @param {ICMsgDPPartnerMicroTxns=} [properties] Properties to set
* @returns {CMsgDPPartnerMicroTxns} CMsgDPPartnerMicroTxns instance
*/
CMsgDPPartnerMicroTxns.create = function create(properties) {
return new CMsgDPPartnerMicroTxns(properties);
};
/**
* Encodes the specified CMsgDPPartnerMicroTxns message. Does not implicitly {@link CMsgDPPartnerMicroTxns.verify|verify} messages.
* @function encode
* @memberof CMsgDPPartnerMicroTxns
* @static
* @param {ICMsgDPPartnerMicroTxns} message CMsgDPPartnerMicroTxns message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
CMsgDPPartnerMicroTxns.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message.appid != null && Object.hasOwnProperty.call(message, "appid"))
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.appid);
if (message.gc_name != null && Object.hasOwnProperty.call(message, "gc_name"))
writer.uint32(/* id 2, wireType 2 =*/18).string(message.gc_name);
if (message.partner != null && Object.hasOwnProperty.call(message, "partner"))
$root.CMsgDPPartnerMicroTxns.PartnerInfo.encode(message.partner, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
if (message.transactions != null && message.transactions.length)
for (var i = 0; i < message.transactions.length; ++i)
$root.CMsgDPPartnerMicroTxns.PartnerMicroTxn.encode(message.transactions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
return writer;
};
/**
* Encodes the specified CMsgDPPartnerMicroTxns message, length delimited. Does not implicitly {@link CMsgDPPartnerMicroTxns.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgDPPartnerMicroTxns
* @static
* @param {ICMsgDPPartnerMicroTxns} message CMsgDPPartnerMicroTxns message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
CMsgDPPartnerMicroTxns.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
* Decodes a CMsgDPPartnerMicroTxns message from the specified reader or buffer.
* @function decode
* @memberof CMsgDPPartnerMicroTxns
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgDPPartnerMicroTxns} CMsgDPPartnerMicroTxns
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
CMsgDPPartnerMicroTxns.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.CMsgDPPartnerMicroTxns();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
message.appid = reader.uint32();
break;
}
case 2: {
message.gc_name = reader.string();
break;
}
case 3: {
message.partner = $root.CMsgDPPartnerMicroTxns.PartnerInfo.decode(reader, reader.uint32());
break;
}
case 4: {
if (!(message.transactions && message.transactions.length))
message.transactions = [];
message.transactions.push($root.CMsgDPPartnerMicroTxns.PartnerMicroTxn.decode(reader, reader.uint32()));
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a CMsgDPPartnerMicroTxns message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgDPPartnerMicroTxns
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgDPPartnerMicroTxns} CMsgDPPartnerMicroTxns
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
CMsgDPPartnerMicroTxns.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgDPPartnerMicroTxns message.
* @function verify
* @memberof CMsgDPPartnerMicroTxns
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgDPPartnerMicroTxns.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.appid != null && message.hasOwnProperty("appid"))
if (!$util.isInteger(message.appid))
return "appid: integer expected";
if (message.gc_name != null && message.hasOwnProperty("gc_name"))
if (!$util.isString(message.gc_name))
return "gc_name: string expected";
if (message.partner != null && message.hasOwnProperty("partner")) {
var error = $root.CMsgDPPartnerMicroTxns.PartnerInfo.verify(message.partner);
if (error)
return "partner." + error;
}
if (message.transactions != null && message.hasOwnProperty("transactions")) {
if (!Array.isArray(message.transactions))
return "transactions: array expected";
for (var i = 0; i < message.transactions.length; ++i) {
var error = $root.CMsgDPPartnerMicroTxns.PartnerMicroTxn.verify(message.transactions[i]);
if (error)
return "transactions." + error;
}
}
return null;
};
/**
* Creates a CMsgDPPartnerMicroTxns message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgDPPartnerMicroTxns
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgDPPartnerMicroTxns} CMsgDPPartnerMicroTxns
*/
CMsgDPPartnerMicroTxns.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgDPPartnerMicroTxns)
return object;
var message = new $root.CMsgDPPartnerMicroTxns();
if (object.appid != null)
message.appid = object.appid >>> 0;
if (object.gc_name != null)
message.gc_name = String(object.gc_name);
if (object.partner != null) {
if (typeof object.partner !== "object")
throw TypeError(".CMsgDPPartnerMicroTxns.partner: object expected");
message.partner = $root.CMsgDPPartnerMicroTxns.PartnerInfo.fromObject(object.partner);
}
if (object.transactions) {
if (!Array.isArray(object.transactions))
throw TypeError(".CMsgDPPartnerMicroTxns.transactions: array expected");
message.transactions = [];
for (var i = 0; i < object.transactions.length; ++i) {
if (typeof object.transactions[i] !== "object")
throw TypeError(".CMsgDPPartnerMicroTxns.transactions: object expected");
message.transactions[i] = $root.CMsgDPPartnerMicroTxns.PartnerMicroTxn.fromObject(object.transactions[i]);
}
}
return message;
};
/**
* Creates a plain object from a CMsgDPPartnerMicroTxns message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgDPPartnerMicroTxns
* @static
* @param {CMsgDPPartnerMicroTxns} message CMsgDPPartnerMicroTxns
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgDPPartnerMicroTxns.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.transactions = [];
if (options.defaults) {
object.appid = 0;
object.gc_name = "";
object.partner = null;
}
if (message.appid != null && message.hasOwnProperty("appid"))
object.appid = message.appid;
if (message.gc_name != null && message.hasOwnProperty("gc_name"))
object.gc_name = message.gc_name;
if (message.partner != null && message.hasOwnProperty("partner"))
object.partner = $root.CMsgDPPartnerMicroTxns.PartnerInfo.toObject(message.partner, options);
if (message.transactions && message.transactions.length) {
object.transactions = [];
for (var j = 0; j < message.transactions.length; ++j)
object.transactions[j] = $root.CMsgDPPartnerMicroTxns.PartnerMicroTxn.toObject(message.transactions[j], options);
}
return object;
};
/**
* Converts this CMsgDPPartnerMicroTxns to JSON.
* @function toJSON
* @memberof CMsgDPPartnerMicroTxns
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgDPPartnerMicroTxns.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgDPPartnerMicroTxns
* @function getTypeUrl
* @memberof CMsgDPPartnerMicroTxns
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgDPPartnerMicroTxns.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgDPPartnerMicroTxns";
};
CMsgDPPartnerMicroTxns.PartnerMicroTxn = (function() {
/**
* Properties of a PartnerMicroTxn.
* @memberof CMsgDPPartnerMicroTxns
* @interface IPartnerMicroTxn
* @property {number|null} [init_time] PartnerMicroTxn init_time
* @property {number|null} [last_update_time] PartnerMicroTxn last_update_time
* @property {number|Long|null} [txn_id] PartnerMicroTxn txn_id
* @property {number|null} [account_id] PartnerMicroTxn account_id
* @property {number|null} [line_item] PartnerMicroTxn line_item
* @property {number|Long|null} [item_id] PartnerMicroTxn item_id
* @property {number|null} [def_index] PartnerMicroTxn def_index
* @property {number|Long|null} [price] PartnerMicroTxn price
* @property {number|Long|null} [tax] PartnerMicroTxn tax
* @property {number|Long|null} [price_usd] PartnerMicroTxn price_usd
* @property {number|Long|null} [tax_usd] PartnerMicroTxn tax_usd
* @property {number|null} [purchase_type] PartnerMicroTxn purchase_type
* @property {number|null} [steam_txn_type] PartnerMicroTxn steam_txn_type
* @property {string|null} [country_code] PartnerMicroTxn country_code
* @property {string|null} [region_code] PartnerMicroTxn region_code
* @property {number|null} [quantity] PartnerMicroTxn quantity
* @property {number|Long|null} [ref_trans_id] PartnerMicroTxn ref_trans_id
*/
/**
* Constructs a new PartnerMicroTxn.
* @memberof CMsgDPPartnerMicroTxns
* @classdesc Represents a PartnerMicroTxn.
* @implements IPartnerMicroTxn
* @constructor
* @param {CMsgDPPartnerMicroTxns.IPartnerMicroTxn=} [properties] Properties to set
*/
function PartnerMicroTxn(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* PartnerMicroTxn init_time.
* @member {number} init_time
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @instance
*/
PartnerMicroTxn.prototype.init_time = 0;
/**
* PartnerMicroTxn last_update_time.
* @member {number} last_update_time
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @instance
*/
PartnerMicroTxn.prototype.last_update_time = 0;
/**
* PartnerMicroTxn txn_id.
* @member {number|Long} txn_id
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @instance
*/
PartnerMicroTxn.prototype.txn_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
/**
* PartnerMicroTxn account_id.
* @member {number} account_id
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @instance
*/
PartnerMicroTxn.prototype.account_id = 0;
/**
* PartnerMicroTxn line_item.
* @member {number} line_item
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @instance
*/
PartnerMicroTxn.prototype.line_item = 0;
/**
* PartnerMicroTxn item_id.
* @member {number|Long} item_id
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @instance
*/
PartnerMicroTxn.prototype.item_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
/**
* PartnerMicroTxn def_index.
* @member {number} def_index
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @instance
*/
PartnerMicroTxn.prototype.def_index = 0;
/**
* PartnerMicroTxn price.
* @member {number|Long} price
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @instance
*/
PartnerMicroTxn.prototype.price = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
/**
* PartnerMicroTxn tax.
* @member {number|Long} tax
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @instance
*/
PartnerMicroTxn.prototype.tax = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
/**
* PartnerMicroTxn price_usd.
* @member {number|Long} price_usd
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @instance
*/
PartnerMicroTxn.prototype.price_usd = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
/**
* PartnerMicroTxn tax_usd.
* @member {number|Long} tax_usd
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @instance
*/
PartnerMicroTxn.prototype.tax_usd = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
/**
* PartnerMicroTxn purchase_type.
* @member {number} purchase_type
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @instance
*/
PartnerMicroTxn.prototype.purchase_type = 0;
/**
* PartnerMicroTxn steam_txn_type.
* @member {number} steam_txn_type
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @instance
*/
PartnerMicroTxn.prototype.steam_txn_type = 0;
/**
* PartnerMicroTxn country_code.
* @member {string} country_code
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @instance
*/
PartnerMicroTxn.prototype.country_code = "";
/**
* PartnerMicroTxn region_code.
* @member {string} region_code
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @instance
*/
PartnerMicroTxn.prototype.region_code = "";
/**
* PartnerMicroTxn quantity.
* @member {number} quantity
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @instance
*/
PartnerMicroTxn.prototype.quantity = 0;
/**
* PartnerMicroTxn ref_trans_id.
* @member {number|Long} ref_trans_id
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @instance
*/
PartnerMicroTxn.prototype.ref_trans_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
/**
* Creates a new PartnerMicroTxn instance using the specified properties.
* @function create
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @static
* @param {CMsgDPPartnerMicroTxns.IPartnerMicroTxn=} [properties] Properties to set
* @returns {CMsgDPPartnerMicroTxns.PartnerMicroTxn} PartnerMicroTxn instance
*/
PartnerMicroTxn.create = function create(properties) {
return new PartnerMicroTxn(properties);
};
/**
* Encodes the specified PartnerMicroTxn message. Does not implicitly {@link CMsgDPPartnerMicroTxns.PartnerMicroTxn.verify|verify} messages.
* @function encode
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @static
* @param {CMsgDPPartnerMicroTxns.IPartnerMicroTxn} message PartnerMicroTxn message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
PartnerMicroTxn.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message.init_time != null && Object.hasOwnProperty.call(message, "init_time"))
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.init_time);
if (message.last_update_time != null && Object.hasOwnProperty.call(message, "last_update_time"))
writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.last_update_time);
if (message.txn_id != null && Object.hasOwnProperty.call(message, "txn_id"))
writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.txn_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.line_item != null && Object.hasOwnProperty.call(message, "line_item"))
writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.line_item);
if (message.item_id != null && Object.hasOwnProperty.call(message, "item_id"))
writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.item_id);
if (message.def_index != null && Object.hasOwnProperty.call(message, "def_index"))
writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.def_index);
if (message.price != null && Object.hasOwnProperty.call(message, "price"))
writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.price);
if (message.tax != null && Object.hasOwnProperty.call(message, "tax"))
writer.uint32(/* id 9, wireType 0 =*/72).uint64(message.tax);
if (message.price_usd != null && Object.hasOwnProperty.call(message, "price_usd"))
writer.uint32(/* id 10, wireType 0 =*/80).uint64(message.price_usd);
if (message.tax_usd != null && Object.hasOwnProperty.call(message, "tax_usd"))
writer.uint32(/* id 11, wireType 0 =*/88).uint64(message.tax_usd);
if (message.purchase_type != null && Object.hasOwnProperty.call(message, "purchase_type"))
writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.purchase_type);
if (message.steam_txn_type != null && Object.hasOwnProperty.call(message, "steam_txn_type"))
writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.steam_txn_type);
if (message.country_code != null && Object.hasOwnProperty.call(message, "country_code"))
writer.uint32(/* id 14, wireType 2 =*/114).string(message.country_code);
if (message.region_code != null && Object.hasOwnProperty.call(message, "region_code"))
writer.uint32(/* id 15, wireType 2 =*/122).string(message.region_code);
if (message.quantity != null && Object.hasOwnProperty.call(message, "quantity"))
writer.uint32(/* id 16, wireType 0 =*/128).int32(message.quantity);
if (message.ref_trans_id != null && Object.hasOwnProperty.call(message, "ref_trans_id"))
writer.uint32(/* id 17, wireType 0 =*/136).uint64(message.ref_trans_id);
return writer;
};
/**
* Encodes the specified PartnerMicroTxn message, length delimited. Does not implicitly {@link CMsgDPPartnerMicroTxns.PartnerMicroTxn.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @static
* @param {CMsgDPPartnerMicroTxns.IPartnerMicroTxn} message PartnerMicroTxn message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
PartnerMicroTxn.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
* Decodes a PartnerMicroTxn message from the specified reader or buffer.
* @function decode
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgDPPartnerMicroTxns.PartnerMicroTxn} PartnerMicroTxn
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
PartnerMicroTxn.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.CMsgDPPartnerMicroTxns.PartnerMicroTxn();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
message.init_time = reader.uint32();
break;
}
case 2: {
message.last_update_time = reader.uint32();
break;
}
case 3: {
message.txn_id = reader.uint64();
break;
}
case 4: {
message.account_id = reader.uint32();
break;
}
case 5: {
message.line_item = reader.uint32();
break;
}
case 6: {
message.item_id = reader.uint64();
break;
}
case 7: {
message.def_index = reader.uint32();
break;
}
case 8: {
message.price = reader.uint64();
break;
}
case 9: {
message.tax = reader.uint64();
break;
}
case 10: {
message.price_usd = reader.uint64();
break;
}
case 11: {
message.tax_usd = reader.uint64();
break;
}
case 12: {
message.purchase_type = reader.uint32();
break;
}
case 13: {
message.steam_txn_type = reader.uint32();
break;
}
case 14: {
message.country_code = reader.string();
break;
}
case 15: {
message.region_code = reader.string();
break;
}
case 16: {
message.quantity = reader.int32();
break;
}
case 17: {
message.ref_trans_id = reader.uint64();
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a PartnerMicroTxn message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgDPPartnerMicroTxns.PartnerMicroTxn} PartnerMicroTxn
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
PartnerMicroTxn.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a PartnerMicroTxn message.
* @function verify
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
PartnerMicroTxn.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.init_time != null && message.hasOwnProperty("init_time"))
if (!$util.isInteger(message.init_time))
return "init_time: integer expected";
if (message.last_update_time != null && message.hasOwnProperty("last_update_time"))
if (!$util.isInteger(message.last_update_time))
return "last_update_time: integer expected";
if (message.txn_id != null && message.hasOwnProperty("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";
if (message.account_id != null && message.hasOwnProperty("account_id"))
if (!$util.isInteger(message.account_id))
return "account_id: integer expected";
if (message.line_item != null && message.hasOwnProperty("line_item"))
if (!$util.isInteger(message.line_item))
return "line_item: integer expected";
if (message.item_id != null && message.hasOwnProperty("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.def_index != null && message.hasOwnProperty("def_index"))
if (!$util.isInteger(message.def_index))
return "def_index: integer expected";
if (message.price != null && message.hasOwnProperty("price"))
if (!$util.isInteger(message.price) && !(message.price && $util.isInteger(message.price.low) && $util.isInteger(message.price.high)))
return "price: integer|Long expected";
if (message.tax != null && message.hasOwnProperty("tax"))
if (!$util.isInteger(message.tax) && !(message.tax && $util.isInteger(message.tax.low) && $util.isInteger(message.tax.high)))
return "tax: integer|Long expected";
if (message.price_usd != null && message.hasOwnProperty("price_usd"))
if (!$util.isInteger(message.price_usd) && !(message.price_usd && $util.isInteger(message.price_usd.low) && $util.isInteger(message.price_usd.high)))
return "price_usd: integer|Long expected";
if (message.tax_usd != null && message.hasOwnProperty("tax_usd"))
if (!$util.isInteger(message.tax_usd) && !(message.tax_usd && $util.isInteger(message.tax_usd.low) && $util.isInteger(message.tax_usd.high)))
return "tax_usd: integer|Long expected";
if (message.purchase_type != null && message.hasOwnProperty("purchase_type"))
if (!$util.isInteger(message.purchase_type))
return "purchase_type: integer expected";
if (message.steam_txn_type != null && message.hasOwnProperty("steam_txn_type"))
if (!$util.isInteger(message.steam_txn_type))
return "steam_txn_type: integer expected";
if (message.country_code != null && message.hasOwnProperty("country_code"))
if (!$util.isString(message.country_code))
return "country_code: string expected";
if (message.region_code != null && message.hasOwnProperty("region_code"))
if (!$util.isString(message.region_code))
return "region_code: string expected";
if (message.quantity != null && message.hasOwnProperty("quantity"))
if (!$util.isInteger(message.quantity))
return "quantity: integer expected";
if (message.ref_trans_id != null && message.hasOwnProperty("ref_trans_id"))
if (!$util.isInteger(message.ref_trans_id) && !(message.ref_trans_id && $util.isInteger(message.ref_trans_id.low) && $util.isInteger(message.ref_trans_id.high)))
return "ref_trans_id: integer|Long expected";
return null;
};
/**
* Creates a PartnerMicroTxn message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgDPPartnerMicroTxns.PartnerMicroTxn} PartnerMicroTxn
*/
PartnerMicroTxn.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgDPPartnerMicroTxns.PartnerMicroTxn)
return object;
var message = new $root.CMsgDPPartnerMicroTxns.PartnerMicroTxn();
if (object.init_time != null)
message.init_time = object.init_time >>> 0;
if (object.last_update_time != null)
message.last_update_time = object.last_update_time >>> 0;
if (object.txn_id != null)
if ($util.Long)
(message.txn_id = $util.Long.fromValue(object.txn_id)).unsigned = true;
else if (typeof object.txn_id === "string")
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")
message.txn_id = new $util.LongBits(object.txn_id.low >>> 0, object.txn_id.high >>> 0).toNumber(true);
if (object.account_id != null)
message.account_id = object.account_id >>> 0;
if (object.line_item != null)
message.line_item = object.line_item >>> 0;
if (object.item_id != null)
if ($util.Long)
(message.item_id = $util.Long.fromValue(object.item_id)).unsigned = true;
else if (typeof object.item_id === "string")
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.def_index != null)
message.def_index = object.def_index >>> 0;
if (object.price != null)
if ($util.Long)
(message.price = $util.Long.fromValue(object.price)).unsigned = true;
else if (typeof object.price === "string")
message.price = parseInt(object.price, 10);
else if (typeof object.price === "number")
message.price = object.price;
else if (typeof object.price === "object")
message.price = new $util.LongBits(object.price.low >>> 0, object.price.high >>> 0).toNumber(true);
if (object.tax != null)
if ($util.Long)
(message.tax = $util.Long.fromValue(object.tax)).unsigned = true;
else if (typeof object.tax === "string")
message.tax = parseInt(object.tax, 10);
else if (typeof object.tax === "number")
message.tax = object.tax;
else if (typeof object.tax === "object")
message.tax = new $util.LongBits(object.tax.low >>> 0, object.tax.high >>> 0).toNumber(true);
if (object.price_usd != null)
if ($util.Long)
(message.price_usd = $util.Long.fromValue(object.price_usd)).unsigned = true;
else if (typeof object.price_usd === "string")
message.price_usd = parseInt(object.price_usd, 10);
else if (typeof object.price_usd === "number")
message.price_usd = object.price_usd;
else if (typeof object.price_usd === "object")
message.price_usd = new $util.LongBits(object.price_usd.low >>> 0, object.price_usd.high >>> 0).toNumber(true);
if (object.tax_usd != null)
if ($util.Long)
(message.tax_usd = $util.Long.fromValue(object.tax_usd)).unsigned = true;
else if (typeof object.tax_usd === "string")
message.tax_usd = parseInt(object.tax_usd, 10);
else if (typeof object.tax_usd === "number")
message.tax_usd = object.tax_usd;
else if (typeof object.tax_usd === "object")
message.tax_usd = new $util.LongBits(object.tax_usd.low >>> 0, object.tax_usd.high >>> 0).toNumber(true);
if (object.purchase_type != null)
message.purchase_type = object.purchase_type >>> 0;
if (object.steam_txn_type != null)
message.steam_txn_type = object.steam_txn_type >>> 0;
if (object.country_code != null)
message.country_code = String(object.country_code);
if (object.region_code != null)
message.region_code = String(object.region_code);
if (object.quantity != null)
message.quantity = object.quantity | 0;
if (object.ref_trans_id != null)
if ($util.Long)
(message.ref_trans_id = $util.Long.fromValue(object.ref_trans_id)).unsigned = true;
else if (typeof object.ref_trans_id === "string")
message.ref_trans_id = parseInt(object.ref_trans_id, 10);
else if (typeof object.ref_trans_id === "number")
message.ref_trans_id = object.ref_trans_id;
else if (typeof object.ref_trans_id === "object")
message.ref_trans_id = new $util.LongBits(object.ref_trans_id.low >>> 0, object.ref_trans_id.high >>> 0).toNumber(true);
return message;
};
/**
* Creates a plain object from a PartnerMicroTxn message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @static
* @param {CMsgDPPartnerMicroTxns.PartnerMicroTxn} message PartnerMicroTxn
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
PartnerMicroTxn.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.init_time = 0;
object.last_update_time = 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;
} else
object.txn_id = options.longs === String ? "0" : 0;
object.account_id = 0;
object.line_item = 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;
} else
object.item_id = options.longs === String ? "0" : 0;
object.def_index = 0;
if ($util.Long) {
var long = new $util.Long(0, 0, true);
object.price = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
} else
object.price = options.longs === String ? "0" : 0;
if ($util.Long) {
var long = new $util.Long(0, 0, true);
object.tax = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
} else
object.tax = options.longs === String ? "0" : 0;
if ($util.Long) {
var long = new $util.Long(0, 0, true);
object.price_usd = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
} else
object.price_usd = options.longs === String ? "0" : 0;
if ($util.Long) {
var long = new $util.Long(0, 0, true);
object.tax_usd = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
} else
object.tax_usd = options.longs === String ? "0" : 0;
object.purchase_type = 0;
object.steam_txn_type = 0;
object.country_code = "";
object.region_code = "";
object.quantity = 0;
if ($util.Long) {
var long = new $util.Long(0, 0, true);
object.ref_trans_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
} else
object.ref_trans_id = options.longs === String ? "0" : 0;
}
if (message.init_time != null && message.hasOwnProperty("init_time"))
object.init_time = message.init_time;
if (message.last_update_time != null && message.hasOwnProperty("last_update_time"))
object.last_update_time = message.last_update_time;
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;
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;
if (message.account_id != null && message.hasOwnProperty("account_id"))
object.account_id = message.account_id;
if (message.line_item != null && message.hasOwnProperty("line_item"))
object.line_item = message.line_item;
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;
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.def_index != null && message.hasOwnProperty("def_index"))
object.def_index = message.def_index;
if (message.price != null && message.hasOwnProperty("price"))
if (typeof message.price === "number")
object.price = options.longs === String ? String(message.price) : message.price;
else
object.price = options.longs === String ? $util.Long.prototype.toString.call(message.price) : options.longs === Number ? new $util.LongBits(message.price.low >>> 0, message.price.high >>> 0).toNumber(true) : message.price;
if (message.tax != null && message.hasOwnProperty("tax"))
if (typeof message.tax === "number")
object.tax = options.longs === String ? String(message.tax) : message.tax;
else
object.tax = options.longs === String ? $util.Long.prototype.toString.call(message.tax) : options.longs === Number ? new $util.LongBits(message.tax.low >>> 0, message.tax.high >>> 0).toNumber(true) : message.tax;
if (message.price_usd != null && message.hasOwnProperty("price_usd"))
if (typeof message.price_usd === "number")
object.price_usd = options.longs === String ? String(message.price_usd) : message.price_usd;
else
object.price_usd = options.longs === String ? $util.Long.prototype.toString.call(message.price_usd) : options.longs === Number ? new $util.LongBits(message.price_usd.low >>> 0, message.price_usd.high >>> 0).toNumber(true) : message.price_usd;
if (message.tax_usd != null && message.hasOwnProperty("tax_usd"))
if (typeof message.tax_usd === "number")
object.tax_usd = options.longs === String ? String(message.tax_usd) : message.tax_usd;
else
object.tax_usd = options.longs === String ? $util.Long.prototype.toString.call(message.tax_usd) : options.longs === Number ? new $util.LongBits(message.tax_usd.low >>> 0, message.tax_usd.high >>> 0).toNumber(true) : message.tax_usd;
if (message.purchase_type != null && message.hasOwnProperty("purchase_type"))
object.purchase_type = message.purchase_type;
if (message.steam_txn_type != null && message.hasOwnProperty("steam_txn_type"))
object.steam_txn_type = message.steam_txn_type;
if (message.country_code != null && message.hasOwnProperty("country_code"))
object.country_code = message.country_code;
if (message.region_code != null && message.hasOwnProperty("region_code"))
object.region_code = message.region_code;
if (message.quantity != null && message.hasOwnProperty("quantity"))
object.quantity = message.quantity;
if (message.ref_trans_id != null && message.hasOwnProperty("ref_trans_id"))
if (typeof message.ref_trans_id === "number")
object.ref_trans_id = options.longs === String ? String(message.ref_trans_id) : message.ref_trans_id;
else
object.ref_trans_id = options.longs === String ? $util.Long.prototype.toString.call(message.ref_trans_id) : options.longs === Number ? new $util.LongBits(message.ref_trans_id.low >>> 0, message.ref_trans_id.high >>> 0).toNumber(true) : message.ref_trans_id;
return object;
};
/**
* Converts this PartnerMicroTxn to JSON.
* @function toJSON
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @instance
* @returns {Object.<string,*>} JSON object
*/
PartnerMicroTxn.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for PartnerMicroTxn
* @function getTypeUrl
* @memberof CMsgDPPartnerMicroTxns.PartnerMicroTxn
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
PartnerMicroTxn.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgDPPartnerMicroTxns.PartnerMicroTxn";
};
return PartnerMicroTxn;
})();
CMsgDPPartnerMicroTxns.PartnerInfo = (function() {
/**
* Properties of a PartnerInfo.
* @memberof CMsgDPPartnerMicroTxns
* @interface IPartnerInfo
* @property {number|null} [partner_id] PartnerInfo partner_id
* @property {string|null} [partner_name] PartnerInfo partner_name
* @property {string|null} [currency_code] PartnerInfo currency_code
* @property {string|null} [currency_name] PartnerInfo currency_name
*/
/**
* Constructs a new PartnerInfo.
* @memberof CMsgDPPartnerMicroTxns
* @classdesc Represents a PartnerInfo.
* @implements IPartnerInfo
* @constructor
* @param {CMsgDPPartnerMicroTxns.IPartnerInfo=} [properties] Properties to set
*/
function PartnerInfo(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* PartnerInfo partner_id.
* @member {number} partner_id
* @memberof CMsgDPPartnerMicroTxns.PartnerInfo
* @instance
*/
PartnerInfo.prototype.partner_id = 0;
/**
* PartnerInfo partner_name.
* @member {string} partner_name
* @memberof CMsgDPPartnerMicroTxns.PartnerInfo
* @instance
*/
PartnerInfo.prototype.partner_name = "";
/**
* PartnerInfo currency_code.
* @member {string} currency_code
* @memberof CMsgDPPartnerMicroTxns.PartnerInfo
* @instance
*/
PartnerInfo.prototype.currency_code = "";
/**
* PartnerInfo currency_name.
* @member {string} currency_name
* @memberof CMsgDPPartnerMicroTxns.PartnerInfo
* @instance
*/
PartnerInfo.prototype.currency_name = "";
/**
* Creates a new PartnerInfo instance using the specified properties.
* @function create
* @memberof CMsgDPPartnerMicroTxns.PartnerInfo
* @static
* @param {CMsgDPPartnerMicroTxns.IPartnerInfo=} [properties] Properties to set
* @returns {CMsgDPPartnerMicroTxns.PartnerInfo} PartnerInfo instance
*/
PartnerInfo.create = function create(properties) {
return new PartnerInfo(properties);
};
/**
* Encodes the specified PartnerInfo message. Does not implicitly {@link CMsgDPPartnerMicroTxns.PartnerInfo.verify|verify} messages.
* @function encode
* @memberof CMsgDPPartnerMicroTxns.PartnerInfo
* @static
* @param {CMsgDPPartnerMicroTxns.IPartnerInfo} message PartnerInfo message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
PartnerInfo.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message.partner_id != null && Object.hasOwnProperty.call(message, "partner_id"))
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.partner_id);
if (message.partner_name != null && Object.hasOwnProperty.call(message, "partner_name"))
writer.uint32(/* id 2, wireType 2 =*/18).string(message.partner_name);
if (message.currency_code != null && Object.hasOwnProperty.call(message, "currency_code"))
writer.uint32(/* id 3, wireType 2 =*/26).string(message.currency_code);
if (message.currency_name != null && Object.hasOwnProperty.call(message, "currency_name"))
writer.uint32(/* id 4, wireType 2 =*/34).string(message.currency_name);
return writer;
};
/**
* Encodes the specified PartnerInfo message, length delimited. Does not implicitly {@link CMsgDPPartnerMicroTxns.PartnerInfo.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgDPPartnerMicroTxns.PartnerInfo
* @static
* @param {CMsgDPPartnerMicroTxns.IPartnerInfo} message PartnerInfo message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
PartnerInfo.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
* Decodes a PartnerInfo message from the specified reader or buffer.
* @function decode
* @memberof CMsgDPPartnerMicroTxns.PartnerInfo
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgDPPartnerMicroTxns.PartnerInfo} PartnerInfo
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
PartnerInfo.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.CMsgDPPartnerMicroTxns.PartnerInfo();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
message.partner_id = reader.uint32();
break;
}
case 2: {
message.partner_name = reader.string();
break;
}
case 3: {
message.currency_code = reader.string();
break;
}
case 4: {
message.currency_name = reader.string();
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a PartnerInfo message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgDPPartnerMicroTxns.PartnerInfo
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgDPPartnerMicroTxns.PartnerInfo} PartnerInfo
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
PartnerInfo.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a PartnerInfo message.
* @function verify
* @memberof CMsgDPPartnerMicroTxns.PartnerInfo
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
PartnerInfo.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.partner_id != null && message.hasOwnProperty("partner_id"))
if (!$util.isInteger(message.partner_id))
return "partner_id: integer expected";
if (message.partner_name != null && message.hasOwnProperty("partner_name"))
if (!$util.isString(message.partner_name))
return "partner_name: string expected";
if (message.currency_code != null && message.hasOwnProperty("currency_code"))
if (!$util.isString(message.currency_code))
return "currency_code: string expected";
if (message.currency_name != null && message.hasOwnProperty("currency_name"))
if (!$util.isString(message.currency_name))
return "currency_name: string expected";
return null;
};
/**
* Creates a PartnerInfo message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgDPPartnerMicroTxns.PartnerInfo
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgDPPartnerMicroTxns.PartnerInfo} PartnerInfo
*/
PartnerInfo.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgDPPartnerMicroTxns.PartnerInfo)
return object;
var message = new $root.CMsgDPPartnerMicroTxns.PartnerInfo();
if (object.partner_id != null)
message.partner_id = object.partner_id >>> 0;
if (object.partner_name != null)
message.partner_name = String(object.partner_name);
if (object.currency_code != null)
message.currency_code = String(object.currency_code);
if (object.currency_name != null)
message.currency_name = String(object.currency_name);
return message;
};
/**
* Creates a plain object from a PartnerInfo message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgDPPartnerMicroTxns.PartnerInfo
* @static
* @param {CMsgDPPartnerMicroTxns.PartnerInfo} message PartnerInfo
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
PartnerInfo.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.partner_id = 0;
object.partner_name = "";
object.currency_code = "";
object.currency_name = "";
}
if (message.partner_id != null && message.hasOwnProperty("partner_id"))
object.partner_id = message.partner_id;
if (message.partner_name != null && message.hasOwnProperty("partner_name"))
object.partner_name = message.partner_name;
if (message.currency_code != null && message.hasOwnProperty("currency_code"))
object.currency_code = message.currency_code;
if (message.currency_name != null && message.hasOwnProperty("currency_name"))
object.currency_name = message.currency_name;
return object;
};
/**
* Converts this PartnerInfo to JSON.
* @function toJSON
* @memberof CMsgDPPartnerMicroTxns.PartnerInfo
* @instance
* @returns {Object.<string,*>} JSON object
*/
PartnerInfo.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for PartnerInfo
* @function getTypeUrl
* @memberof CMsgDPPartnerMicroTxns.PartnerInfo
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
PartnerInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgDPPartnerMicroTxns.PartnerInfo";
};
return PartnerInfo;
})();
return CMsgDPPartnerMicroTxns;
})();
$root.CMsgDPPartnerMicroTxnsResponse = (function() {
/**
* Properties of a CMsgDPPartnerMicroTxnsResponse.
* @exports ICMsgDPPartnerMicroTxnsResponse
* @interface ICMsgDPPartnerMicroTxnsResponse
* @property {number|null} [eresult] CMsgDPPartnerMicroTxnsResponse eresult
* @property {CMsgDPPartnerMicroTxnsResponse.EErrorCode|null} [eerrorcode] CMsgDPPartnerMicroTxnsResponse eerrorcode
*/
/**
* Constructs a new CMsgDPPartnerMicroTxnsResponse.
* @exports CMsgDPPartnerMicroTxnsResponse
* @classdesc Represents a CMsgDPPartnerMicroTxnsResponse.
* @implements ICMsgDPPartnerMicroTxnsResponse
* @constructor
* @param {ICMsgDPPartnerMicroTxnsResponse=} [properties] Properties to set
*/
function CMsgDPPartnerMicroTxnsResponse(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CMsgDPPartnerMicroTxnsResponse eresult.
* @member {number} eresult
* @memberof CMsgDPPartnerMicroTxnsResponse
* @instance
*/
CMsgDPPartnerMicroTxnsResponse.prototype.eresult = 2;
/**
* CMsgDPPartnerMicroTxnsResponse eerrorcode.
* @member {CMsgDPPartnerMicroTxnsResponse.EErrorCode} eerrorcode
* @memberof CMsgDPPartnerMicroTxnsResponse
* @instance
*/
CMsgDPPartnerMicroTxnsResponse.prototype.eerrorcode = 0;
/**
* Creates a new CMsgDPPartnerMicroTxnsResponse instance using the specified properties.
* @function create
* @memberof CMsgDPPartnerMicroTxnsResponse
* @static
* @param {ICMsgDPPartnerMicroTxnsResponse=} [properties] Properties to set
* @returns {CMsgDPPartnerMicroTxnsResponse} CMsgDPPartnerMicroTxnsResponse instance
*/
CMsgDPPartnerMicroTxnsResponse.create = function create(properties) {
return new CMsgDPPartnerMicroTxnsResponse(properties);
};
/**
* Encodes the specified CMsgDPPartnerMicroTxnsResponse message. Does not implicitly {@link CMsgDPPartnerMicroTxnsResponse.verify|verify} messages.
* @function encode
* @memberof CMsgDPPartnerMicroTxnsResponse
* @static
* @param {ICMsgDPPartnerMicroTxnsResponse} message CMsgDPPartnerMicroTxnsResponse message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
CMsgDPPartnerMicroTxnsResponse.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message.eresult != null && Object.hasOwnProperty.call(message, "eresult"))
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.eresult);
if (message.eerrorcode != null && Object.hasOwnProperty.call(message, "eerrorcode"))
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.eerrorcode);
return writer;
};
/**
* Encodes the specified CMsgDPPartnerMicroTxnsResponse message, length delimited. Does not implicitly {@link CMsgDPPartnerMicroTxnsResponse.verify|verify} messages.
* @function encodeDelimited
* @memberof CMsgDPPartnerMicroTxnsResponse
* @static
* @param {ICMsgDPPartnerMicroTxnsResponse} message CMsgDPPartnerMicroTxnsResponse message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
CMsgDPPartnerMicroTxnsResponse.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
* Decodes a CMsgDPPartnerMicroTxnsResponse message from the specified reader or buffer.
* @function decode
* @memberof CMsgDPPartnerMicroTxnsResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CMsgDPPartnerMicroTxnsResponse} CMsgDPPartnerMicroTxnsResponse
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
CMsgDPPartnerMicroTxnsResponse.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.CMsgDPPartnerMicroTxnsResponse();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
message.eresult = reader.uint32();
break;
}
case 2: {
message.eerrorcode = reader.int32();
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a CMsgDPPartnerMicroTxnsResponse message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CMsgDPPartnerMicroTxnsResponse
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CMsgDPPartnerMicroTxnsResponse} CMsgDPPartnerMicroTxnsResponse
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
CMsgDPPartnerMicroTxnsResponse.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CMsgDPPartnerMicroTxnsResponse message.
* @function verify
* @memberof CMsgDPPartnerMicroTxnsResponse
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CMsgDPPartnerMicroTxnsResponse.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.eresult != null && message.hasOwnProperty("eresult"))
if (!$util.isInteger(message.eresult))
return "eresult: integer expected";
if (message.eerrorcode != null && message.hasOwnProperty("eerrorcode"))
switch (message.eerrorcode) {
default:
return "eerrorcode: enum value expected";
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 7:
case 8:
case 9:
break;
}
return null;
};
/**
* Creates a CMsgDPPartnerMicroTxnsResponse message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CMsgDPPartnerMicroTxnsResponse
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CMsgDPPartnerMicroTxnsResponse} CMsgDPPartnerMicroTxnsResponse
*/
CMsgDPPartnerMicroTxnsResponse.fromObject = function fromObject(object) {
if (object instanceof $root.CMsgDPPartnerMicroTxnsResponse)
return object;
var message = new $root.CMsgDPPartnerMicroTxnsResponse();
if (object.eresult != null)
message.eresult = object.eresult >>> 0;
switch (object.eerrorcode) {
default:
if (typeof object.eerrorcode === "number") {
message.eerrorcode = object.eerrorcode;
break;
}
break;
case "k_MsgValid":
case 0:
message.eerrorcode = 0;
break;
case "k_MsgInvalidAppID":
case 1:
message.eerrorcode = 1;
break;
case "k_MsgInvalidPartnerInfo":
case 2:
message.eerrorcode = 2;
break;
case "k_MsgNoTransactions":
case 3:
message.eerrorcode = 3;
break;
case "k_MsgSQLFailure":
case 4:
message.eerrorcode = 4;
break;
case "k_MsgPartnerInfoDiscrepancy":
case 5:
message.eerrorcode = 5;
break;
case "k_MsgTransactionInsertFailed":
case 7:
message.eerrorcode = 7;
break;
case "k_MsgAlreadyRunning":
case 8:
message.eerrorcode = 8;
break;
case "k_MsgInvalidTransactionData":
case 9:
message.eerrorcode = 9;
break;
}
return message;
};
/**
* Creates a plain object from a CMsgDPPartnerMicroTxnsResponse message. Also converts values to other types if specified.
* @function toObject
* @memberof CMsgDPPartnerMicroTxnsResponse
* @static
* @param {CMsgDPPartnerMicroTxnsResponse} message CMsgDPPartnerMicroTxnsResponse
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CMsgDPPartnerMicroTxnsResponse.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.eresult = 2;
object.eerrorcode = options.enums === String ? "k_MsgValid" : 0;
}
if (message.eresult != null && message.hasOwnProperty("eresult"))
object.eresult = message.eresult;
if (message.eerrorcode != null && message.hasOwnProperty("eerrorcode"))
object.eerrorcode = options.enums === String ? $root.CMsgDPPartnerMicroTxnsResponse.EErrorCode[message.eerrorcode] === undefined ? message.eerrorcode : $root.CMsgDPPartnerMicroTxnsResponse.EErrorCode[message.eerrorcode] : message.eerrorcode;
return object;
};
/**
* Converts this CMsgDPPartnerMicroTxnsResponse to JSON.
* @function toJSON
* @memberof CMsgDPPartnerMicroTxnsResponse
* @instance
* @returns {Object.<string,*>} JSON object
*/
CMsgDPPartnerMicroTxnsResponse.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CMsgDPPartnerMicroTxnsResponse
* @function getTypeUrl
* @memberof CMsgDPPartnerMicroTxnsResponse
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CMsgDPPartnerMicroTxnsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CMsgDPPartnerMicroTxnsResponse";
};
/**
* EErrorCode enum.
* @name CMsgDPPartnerMicroTxnsResponse.EErrorCode
* @enum {number}
* @property {number} k_MsgValid=0 k_MsgValid value
* @property {number} k_MsgInvalidAppID=1 k_MsgInvalidAppID value
* @property {number} k_MsgInvalidPartnerInfo=2 k_MsgInvalidPartnerInfo value
* @property {number} k_MsgNoTransactions=3 k_MsgNoTransactions value
* @property {number} k_MsgSQLFailure=4 k_MsgSQLFailure value
* @property {number} k_MsgPartnerInfoDiscrepancy=5 k_MsgPartnerInfoDiscrepancy value
* @property {number} k_MsgTransactionInsertFailed=7 k_MsgTransactionInsertFailed value
* @property {number} k_MsgAlreadyRunning=8 k_MsgAlreadyRunning value
* @property {number} k_MsgInvalidTransactionData=9 k_MsgInvalidTransactionData value
*/
CMsgDPPartnerMicroTxnsResponse.EErrorCode = (function() {
var valuesById = {}, values = Object.create(valuesById);
values[valuesById[0] = "k_MsgValid"] = 0;
values[valuesById[1] = "k_MsgInvalidAppID"] = 1;
values[valuesById[2] = "k_MsgInvalidPartnerInfo"] = 2;
values[valuesById[3] = "k_MsgNoTransactions"] = 3;
values[valuesById[4] = "k_MsgSQLFailure"] = 4;
values[valuesById[5] = "k_MsgPartnerInfoDiscrepancy"] = 5;
values[valuesById[7] = "k_MsgTransactionInsertFailed"] = 7;
values[valuesById[8] = "k_MsgAlreadyRunning"] = 8;
values[valuesById[9] = "k_MsgInvalidTransactionData"] = 9;
return values;
})();
return CMsgDPPartnerMicroTxnsResponse;
})();
$root.CChinaAgreementSessions_StartAgreementSessionInGame_Request = (function() {
/**
* Properties of a CChinaAgreementSessions_StartAgreementSessionInGame_Request.
* @exports ICChinaAgreementSessions_StartAgreementSessionInGame_Request
* @interface ICChinaAgreementSessions_StartAgreementSessionInGame_Request
* @property {number|null} [appid] CChinaAgreementSessions_StartAgreementSessionInGame_Request appid
* @property {number|Long|null} [steamid] CChinaAgreementSessions_StartAgreementSessionInGame_Request steamid
* @property {string|null} [client_ipaddress] CChinaAgreementSessions_StartAgreementSessionInGame_Request client_ipaddress
*/
/**
* Constructs a new CChinaAgreementSessions_StartAgreementSessionInGame_Request.
* @exports CChinaAgreementSessions_StartAgreementSessionInGame_Request
* @classdesc Represents a CChinaAgreementSessions_StartAgreementSessionInGame_Request.
* @implements ICChinaAgreementSessions_StartAgreementSessionInGame_Request
* @constructor
* @param {ICChinaAgreementSessions_StartAgreementSessionInGame_Request=} [properties] Properties to set
*/
function CChinaAgreementSessions_StartAgreementSessionInGame_Request(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CChinaAgreementSessions_StartAgreementSessionInGame_Request appid.
* @member {number} appid
* @memberof CChinaAgreementSessions_StartAgreementSessionInGame_Request
* @instance
*/
CChinaAgreementSessions_StartAgreementSessionInGame_Request.prototype.appid = 0;
/**
* CChinaAgreementSessions_StartAgreementSessionInGame_Request steamid.
* @member {number|Long} steamid
* @memberof CChinaAgreementSessions_StartAgreementSessionInGame_Request
* @instance
*/
CChinaAgreementSessions_StartAgreementSessionInGame_Request.prototype.steamid = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* CChinaAgreementSessions_StartAgreementSessionInGame_Request client_ipaddress.
* @member {string} client_ipaddress
* @memberof CChinaAgreementSessions_StartAgreementSessionInGame_Request
* @instance
*/
CChinaAgreementSessions_StartAgreementSessionInGame_Request.prototype.client_ipaddress = "";
/**
* Creates a new CChinaAgreementSessions_StartAgreementSessionInGame_Request instance using the specified properties.
* @function create
* @memberof CChinaAgreementSessions_StartAgreementSessionInGame_Request
* @static
* @param {ICChinaAgreementSessions_StartAgreementSessionInGame_Request=} [properties] Properties to set
* @returns {CChinaAgreementSessions_StartAgreementSessionInGame_Request} CChinaAgreementSessions_StartAgreementSessionInGame_Request instance
*/
CChinaAgreementSessions_StartAgreementSessionInGame_Request.create = function create(properties) {
return new CChinaAgreementSessions_StartAgreementSessionInGame_Request(properties);
};
/**
* Encodes the specified CChinaAgreementSessions_StartAgreementSessionInGame_Request message. Does not implicitly {@link CChinaAgreementSessions_StartAgreementSessionInGame_Request.verify|verify} messages.
* @function encode
* @memberof CChinaAgreementSessions_StartAgreementSessionInGame_Request
* @static
* @param {ICChinaAgreementSessions_StartAgreementSessionInGame_Request} message CChinaAgreementSessions_StartAgreementSessionInGame_Request message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
CChinaAgreementSessions_StartAgreementSessionInGame_Request.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 1 =*/17).fixed64(message.steamid);
if (message.client_ipaddress != null && Object.hasOwnProperty.call(message, "client_ipaddress"))
writer.uint32(/* id 3, wireType 2 =*/26).string(message.client_ipaddress);
return writer;
};
/**
* Encodes the specified CChinaAgreementSessions_StartAgreementSessionInGame_Request message, length delimited. Does not implicitly {@link CChinaAgreementSessions_StartAgreementSessionInGame_Request.verify|verify} messages.
* @function encodeDelimited
* @memberof CChinaAgreementSessions_StartAgreementSessionInGame_Request
* @static
* @param {ICChinaAgreementSessions_StartAgreementSessionInGame_Request} message CChinaAgreementSessions_StartAgreementSessionInGame_Request message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
CChinaAgreementSessions_StartAgreementSessionInGame_Request.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
* Decodes a CChinaAgreementSessions_StartAgreementSessionInGame_Request message from the specified reader or buffer.
* @function decode
* @memberof CChinaAgreementSessions_StartAgreementSessionInGame_Request
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CChinaAgreementSessions_StartAgreementSessionInGame_Request} CChinaAgreementSessions_StartAgreementSessionInGame_Request
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
CChinaAgreementSessions_StartAgreementSessionInGame_Request.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.CChinaAgreementSessions_StartAgreementSessionInGame_Request();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
message.appid = reader.uint32();
break;
}
case 2: {
message.steamid = reader.fixed64();
break;
}
case 3: {
message.client_ipaddress = reader.string();
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a CChinaAgreementSessions_StartAgreementSessionInGame_Request message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CChinaAgreementSessions_StartAgreementSessionInGame_Request
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CChinaAgreementSessions_StartAgreementSessionInGame_Request} CChinaAgreementSessions_StartAgreementSessionInGame_Request
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
CChinaAgreementSessions_StartAgreementSessionInGame_Request.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CChinaAgreementSessions_StartAgreementSessionInGame_Request message.
* @function verify
* @memberof CChinaAgreementSessions_StartAgreementSessionInGame_Request
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CChinaAgreementSessions_StartAgreementSessionInGame_Request.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.appid != null && message.hasOwnProperty("appid"))
if (!$util.isInteger(message.appid))
return "appid: integer expected";
if (message.steamid != null && message.hasOwnProperty("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.client_ipaddress != null && message.hasOwnProperty("client_ipaddress"))
if (!$util.isString(message.client_ipaddress))
return "client_ipaddress: string expected";
return null;
};
/**
* Creates a CChinaAgreementSessions_StartAgreementSessionInGame_Request message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CChinaAgreementSessions_StartAgreementSessionInGame_Request
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CChinaAgreementSessions_StartAgreementSessionInGame_Request} CChinaAgreementSessions_StartAgreementSessionInGame_Request
*/
CChinaAgreementSessions_StartAgreementSessionInGame_Request.fromObject = function fromObject(object) {
if (object instanceof $root.CChinaAgreementSessions_StartAgreementSessionInGame_Request)
return object;
var message = new $root.CChinaAgreementSessions_StartAgreementSessionInGame_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 = false;
else if (typeof object.steamid === "string")
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();
if (object.client_ipaddress != null)
message.client_ipaddress = String(object.client_ipaddress);
return message;
};
/**
* Creates a plain object from a CChinaAgreementSessions_StartAgreementSessionInGame_Request message. Also converts values to other types if specified.
* @function toObject
* @memberof CChinaAgreementSessions_StartAgreementSessionInGame_Request
* @static
* @param {CChinaAgreementSessions_StartAgreementSessionInGame_Request} message CChinaAgreementSessions_StartAgreementSessionInGame_Request
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CChinaAgreementSessions_StartAgreementSessionInGame_Request.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.appid = 0;
if ($util.Long) {
var long = new $util.Long(0, 0, false);
object.steamid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
} else
object.steamid = options.longs === String ? "0" : 0;
object.client_ipaddress = "";
}
if (message.appid != null && message.hasOwnProperty("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;
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.client_ipaddress != null && message.hasOwnProperty("client_ipaddress"))
object.client_ipaddress = message.client_ipaddress;
return object;
};
/**
* Converts this CChinaAgreementSessions_StartAgreementSessionInGame_Request to JSON.
* @function toJSON
* @memberof CChinaAgreementSessions_StartAgreementSessionInGame_Request
* @instance
* @returns {Object.<string,*>} JSON object
*/
CChinaAgreementSessions_StartAgreementSessionInGame_Request.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CChinaAgreementSessions_StartAgreementSessionInGame_Request
* @function getTypeUrl
* @memberof CChinaAgreementSessions_StartAgreementSessionInGame_Request
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CChinaAgreementSessions_StartAgreementSessionInGame_Request.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CChinaAgreementSessions_StartAgreementSessionInGame_Request";
};
return CChinaAgreementSessions_StartAgreementSessionInGame_Request;
})();
$root.CChinaAgreementSessions_StartAgreementSessionInGame_Response = (function() {
/**
* Properties of a CChinaAgreementSessions_StartAgreementSessionInGame_Response.
* @exports ICChinaAgreementSessions_StartAgreementSessionInGame_Response
* @interface ICChinaAgreementSessions_StartAgreementSessionInGame_Response
* @property {string|null} [agreement_url] CChinaAgreementSessions_StartAgreementSessionInGame_Response agreement_url
*/
/**
* Constructs a new CChinaAgreementSessions_StartAgreementSessionInGame_Response.
* @exports CChinaAgreementSessions_StartAgreementSessionInGame_Response
* @classdesc Represents a CChinaAgreementSessions_StartAgreementSessionInGame_Response.
* @implements ICChinaAgreementSessions_StartAgreementSessionInGame_Response
* @constructor
* @param {ICChinaAgreementSessions_StartAgreementSessionInGame_Response=} [properties] Properties to set
*/
function CChinaAgreementSessions_StartAgreementSessionInGame_Response(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CChinaAgreementSessions_StartAgreementSessionInGame_Response agreement_url.
* @member {string} agreement_url
* @memberof CChinaAgreementSessions_StartAgreementSessionInGame_Response
* @instance
*/
CChinaAgreementSessions_StartAgreementSessionInGame_Response.prototype.agreement_url = "";
/**
* Creates a new CChinaAgreementSessions_StartAgreementSessionInGame_Response instance using the specified properties.
* @function create
* @memberof CChinaAgreementSessions_StartAgreementSessionInGame_Response
* @static
* @param {ICChinaAgreementSessions_StartAgreementSessionInGame_Response=} [properties] Properties to set
* @returns {CChinaAgreementSessions_StartAgreementSessionInGame_Response} CChinaAgreementSessions_StartAgreementSessionInGame_Response instance
*/
CChinaAgreementSessions_StartAgreementSessionInGame_Response.create = function create(properties) {
return new CChinaAgreementSessions_StartAgreementSessionInGame_Response(properties);
};
/**
* Encodes the specified CChinaAgreementSessions_StartAgreementSessionInGame_Response message. Does not implicitly {@link CChinaAgreementSessions_StartAgreementSessionInGame_Response.verify|verify} messages.
* @function encode
* @memberof CChinaAgreementSessions_StartAgreementSessionInGame_Response
* @static
* @param {ICChinaAgreementSessions_StartAgreementSessionInGame_Response} message CChinaAgreementSessions_StartAgreementSessionInGame_Response message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
CChinaAgreementSessions_StartAgreementSessionInGame_Response.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message.agreement_url != null && Object.hasOwnProperty.call(message, "agreement_url"))
writer.uint32(/* id 1, wireType 2 =*/10).string(message.agreement_url);
return writer;
};
/**
* Encodes the specified CChinaAgreementSessions_StartAgreementSessionInGame_Response message, length delimited. Does not implicitly {@link CChinaAgreementSessions_StartAgreementSessionInGame_Response.verify|verify} messages.
* @function encodeDelimited
* @memberof CChinaAgreementSessions_StartAgreementSessionInGame_Response
* @static
* @param {ICChinaAgreementSessions_StartAgreementSessionInGame_Response} message CChinaAgreementSessions_StartAgreementSessionInGame_Response message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
CChinaAgreementSessions_StartAgreementSessionInGame_Response.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
* Decodes a CChinaAgreementSessions_StartAgreementSessionInGame_Response message from the specified reader or buffer.
* @function decode
* @memberof CChinaAgreementSessions_StartAgreementSessionInGame_Response
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {CChinaAgreementSessions_StartAgreementSessionInGame_Response} CChinaAgreementSessions_StartAgreementSessionInGame_Response
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
CChinaAgreementSessions_StartAgreementSessionInGame_Response.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.CChinaAgreementSessions_StartAgreementSessionInGame_Response();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
message.agreement_url = reader.string();
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a CChinaAgreementSessions_StartAgreementSessionInGame_Response message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof CChinaAgreementSessions_StartAgreementSessionInGame_Response
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {CChinaAgreementSessions_StartAgreementSessionInGame_Response} CChinaAgreementSessions_StartAgreementSessionInGame_Response
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
CChinaAgreementSessions_StartAgreementSessionInGame_Response.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CChinaAgreementSessions_StartAgreementSessionInGame_Response message.
* @function verify
* @memberof CChinaAgreementSessions_StartAgreementSessionInGame_Response
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CChinaAgreementSessions_StartAgreementSessionInGame_Response.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.agreement_url != null && message.hasOwnProperty("agreement_url"))
if (!$util.isString(message.agreement_url))
return "agreement_url: string expected";
return null;
};
/**
* Creates a CChinaAgreementSessions_StartAgreementSessionInGame_Response message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof CChinaAgreementSessions_StartAgreementSessionInGame_Response
* @static
* @param {Object.<string,*>} object Plain object
* @returns {CChinaAgreementSessions_StartAgreementSessionInGame_Response} CChinaAgreementSessions_StartAgreementSessionInGame_Response
*/
CChinaAgreementSessions_StartAgreementSessionInGame_Response.fromObject = function fromObject(object) {
if (object instanceof $root.CChinaAgreementSessions_StartAgreementSessionInGame_Response)
return object;
var message = new $root.CChinaAgreementSessions_StartAgreementSessionInGame_Response();
if (object.agreement_url != null)
message.agreement_url = String(object.agreement_url);
return message;
};
/**
* Creates a plain object from a CChinaAgreementSessions_StartAgreementSessionInGame_Response message. Also converts values to other types if specified.
* @function toObject
* @memberof CChinaAgreementSessions_StartAgreementSessionInGame_Response
* @static
* @param {CChinaAgreementSessions_StartAgreementSessionInGame_Response} message CChinaAgreementSessions_StartAgreementSessionInGame_Response
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CChinaAgreementSessions_StartAgreementSessionInGame_Response.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults)
object.agreement_url = "";
if (message.agreement_url != null && message.hasOwnProperty("agreement_url"))
object.agreement_url = message.agreement_url;
return object;
};
/**
* Converts this CChinaAgreementSessions_StartAgreementSessionInGame_Response to JSON.
* @function toJSON
* @memberof CChinaAgreementSessions_StartAgreementSessionInGame_Response
* @instance
* @returns {Object.<string,*>} JSON object
*/
CChinaAgreementSessions_StartAgreementSessionInGame_Response.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CChinaAgreementSessions_StartAgreementSessionInGame_Response
* @function getTypeUrl
* @memberof CChinaAgreementSessions_StartAgreementSessionInGame_Response
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CChinaAgreementSessions_StartAgreementSessionInGame_Response.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/CChinaAgreementSessions_StartAgreementSessionInGame_Response";
};
return CChinaAgreementSessions_StartAgreementSessionInGame_Response;
})();
$root.google = (function() {
/**
* Namespace google.
* @exports google
* @namespace
*/
var google = {};
google.protobuf = (function() {
/**
* Namespace protobuf.
* @memberof google
* @namespace
*/
var protobuf = {};
protobuf.FileDescriptorSet = (function() {
/**
* Properties of a FileDescriptorSet.
* @memberof google.protobuf
* @interface IFileDescriptorSet
* @property {Array.<google.protobuf.IFileDescriptorProto>|null} [file] FileDescriptorSet file
*/
/**
* Constructs a new FileDescriptorSet.
* @memberof google.protobuf
* @classdesc Represents a FileDescriptorSet.
* @implements IFileDescriptorSet
* @constructor
* @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set
*/
function FileDescriptorSet(properties) {
this.file = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* FileDescriptorSet file.
* @member {Array.<google.protobuf.IFileDescriptorProto>} file
* @memberof google.protobuf.FileDescriptorSet
* @instance
*/
FileDescriptorSet.prototype.file = $util.emptyArray;
/**
* Creates a new FileDescriptorSet instance using the specified properties.
* @function create
* @memberof google.protobuf.FileDescriptorSet
* @static
* @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set
* @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance
*/
FileDescriptorSet.create = function create(properties) {
return new FileDescriptorSet(properties);
};
/**
* Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages.
* @function encode
* @memberof google.protobuf.FileDescriptorSet
* @static
* @param {google.protobuf.IFileDescriptorSet} 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) {
if (!writer)
writer = $Writer.create();
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();
return writer;
};
/**
* Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages.
* @function encodeDelimited
* @memberof google.protobuf.FileDescriptorSet
* @static
* @param {google.protobuf.IFileDescriptorSet} 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();
};
/**
* Decodes a FileDescriptorSet message from the specified reader or buffer.
* @function decode
* @memberof google.protobuf.FileDescriptorSet
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof google.protobuf.FileDescriptorSet
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {google.protobuf.FileDescriptorSet} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a FileDescriptorSet message.
* @function verify
* @memberof google.protobuf.FileDescriptorSet
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
FileDescriptorSet.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.file != null && message.hasOwnProperty("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]);
if (error)
return "file." + error;
}
}
return null;
};
/**
* Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof google.protobuf.FileDescriptorSet
* @static
* @param {Object.<string,*>} object Plain object
* @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet
*/
FileDescriptorSet.fromObject = function fromObject(object) {
if (object instanceof $root.google.protobuf.FileDescriptorSet)
return object;
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 = [];
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]);
}
}
return message;
};
/**
* Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified.
* @function toObject
* @memberof google.protobuf.FileDescriptorSet
* @static
* @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
FileDescriptorSet.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.file = [];
if (message.file && message.file.length) {
object.file = [];
for (var j = 0; j < message.file.length; ++j)
object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options);
}
return object;
};
/**
* Converts this FileDescriptorSet to JSON.
* @function toJSON
* @memberof google.protobuf.FileDescriptorSet
* @instance
* @returns {Object.<string,*>} JSON object
*/
FileDescriptorSet.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for FileDescriptorSet
* @function getTypeUrl
* @memberof google.protobuf.FileDescriptorSet
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/google.protobuf.FileDescriptorSet";
};
return FileDescriptorSet;
})();
protobuf.FileDescriptorProto = (function() {
/**
* Properties of a FileDescriptorProto.
* @memberof google.protobuf
* @interface IFileDescriptorProto
* @property {string|null} [name] FileDescriptorProto name
* @property {string|null} ["package"] FileDescriptorProto package
* @property {Array.<string>|null} [dependency] FileDescriptorProto dependency
* @property {Array.<google.protobuf.IDescriptorProto>|null} [message_type] FileDescriptorProto message_type
* @property {Array.<google.protobuf.IEnumDescriptorProto>|null} [enum_type] FileDescriptorProto enum_type
* @property {Array.<google.protobuf.IServiceDescriptorProto>|null} [service] FileDescriptorProto service
* @property {Array.<google.protobuf.IFieldDescriptorProto>|null} [extension] FileDescriptorProto extension
* @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options
* @property {google.protobuf.ISourceCodeInfo|null} [source_code_info] FileDescriptorProto source_code_info
*/
/**
* Constructs a new FileDescriptorProto.
* @memberof google.protobuf
* @classdesc Represents a FileDescriptorProto.
* @implements IFileDescriptorProto
* @constructor
* @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set
*/
function FileDescriptorProto(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)
this[keys[i]] = properties[keys[i]];
}
/**
* FileDescriptorProto name.
* @member {string} name
* @memberof google.protobuf.FileDescriptorProto
* @instance
*/
FileDescriptorProto.prototype.name = "";
/**
* FileDescriptorProto package.
* @member {string} package
* @memberof google.protobuf.FileDescriptorProto
* @instance
*/
FileDescriptorProto.prototype["package"] = "";
/**
* FileDescriptorProto dependency.
* @member {Array.<string>} dependency
* @memberof google.protobuf.FileDescriptorProto
* @instance
*/
FileDescriptorProto.prototype.dependency = $util.emptyArray;
/**
* FileDescriptorProto message_type.
* @member {Array.<google.protobuf.IDescriptorProto>} message_type
* @memberof google.protobuf.FileDescriptorProto
* @instance
*/
FileDescriptorProto.prototype.message_type = $util.emptyArray;
/**
* FileDescriptorProto enum_type.
* @member {Array.<google.protobuf.IEnumDescriptorProto>} enum_type
* @memberof google.protobuf.FileDescriptorProto
* @instance
*/
FileDescriptorProto.prototype.enum_type = $util.emptyArray;
/**
* FileDescriptorProto service.
* @member {Array.<google.protobuf.IServiceDescriptorProto>} service
* @memberof google.protobuf.FileDescriptorProto
* @instance
*/
FileDescriptorProto.prototype.service = $util.emptyArray;
/**
* FileDescriptorProto extension.
* @member {Array.<google.protobuf.IFieldDescriptorProto>} extension
* @memberof google.protobuf.FileDescriptorProto
* @instance
*/
FileDescriptorProto.prototype.extension = $util.emptyArray;
/**
* FileDescriptorProto options.
* @member {google.protobuf.IFileOptions|null|undefined} options
* @memberof google.protobuf.FileDescriptorProto
* @instance
*/
FileDescriptorProto.prototype.options = null;
/**
* FileDescriptorProto source_code_info.
* @member {google.protobuf.ISourceCodeInfo|null|undefined} source_code_info
* @memberof google.protobuf.FileDescriptorProto
* @instance
*/
FileDescriptorProto.prototype.source_code_info = null;
/**
* Creates a new FileDescriptorProto instance using the specified properties.
* @function create
* @memberof google.protobuf.FileDescriptorProto
* @static
* @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set
* @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance
*/
FileDescriptorProto.create = function create(properties) {
return new FileDescriptorProto(properties);
};
/**
* Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages.
* @function encode
* @memberof google.protobuf.FileDescriptorProto
* @static
* @param {google.protobuf.IFileDescriptorProto} 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) {
if (!writer)
writer = $Writer.create();
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"))
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();
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();
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();
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();
return writer;
};
/**
* Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages.
* @function encodeDelimited
* @memberof google.protobuf.FileDescriptorProto
* @static
* @param {google.protobuf.IFileDescriptorProto} 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();
};
/**
* Decodes a FileDescriptorProto message from the specified reader or buffer.
* @function decode
* @memberof google.protobuf.FileDescriptorProto
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof google.protobuf.FileDescriptorProto
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {google.protobuf.FileDescriptorProto} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a FileDescriptorProto message.
* @function verify
* @memberof google.protobuf.FileDescriptorProto
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
FileDescriptorProto.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.name != null && message.hasOwnProperty("name"))
if (!$util.isString(message.name))
return "name: string expected";
if (message["package"] != null && message.hasOwnProperty("package"))
if (!$util.isString(message["package"]))
return "package: string expected";
if (message.dependency != null && message.hasOwnProperty("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))
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]);
if (error)
return "message_type." + error;
}
}
if (message.enum_type != null && message.hasOwnProperty("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]);
if (error)
return "enum_type." + error;
}
}
if (message.service != null && message.hasOwnProperty("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]);
if (error)
return "service." + error;
}
}
if (message.extension != null && message.hasOwnProperty("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]);
if (error)
return "extension." + error;
}
}
if (message.options != null && message.hasOwnProperty("options")) {
var error = $root.google.protobuf.FileOptions.verify(message.options);
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 (error)
return "source_code_info." + error;
}
return null;
};
/**
* Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof google.protobuf.FileDescriptorProto
* @static
* @param {Object.<string,*>} object Plain object
* @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto
*/
FileDescriptorProto.fromObject = function fromObject(object) {
if (object instanceof $root.google.protobuf.FileDescriptorProto)
return object;
var message = new $root.google.protobuf.FileDescriptorProto();
if (object.name != null)
message.name = String(object.name);
if (object["package"] != null)
message["package"] = String(object["package"]);
if (object.dependency) {
if (!Array.isArray(object.dependency))
throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected");
message.dependency = [];
for (var i = 0; i < object.dependency.length; ++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 = [];
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 (object.enum_type) {
if (!Array.isArray(object.enum_type))
throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: array expected");
message.enum_type = [];
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 (object.service) {
if (!Array.isArray(object.service))
throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected");
message.service = [];
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 (object.extension) {
if (!Array.isArray(object.extension))
throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected");
message.extension = [];
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 (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 (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);
}
return message;
};
/**
* Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified.
* @function toObject
* @memberof google.protobuf.FileDescriptorProto
* @static
* @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
FileDescriptorProto.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults) {
object.dependency = [];
object.message_type = [];
object.enum_type = [];
object.service = [];
object.extension = [];
}
if (options.defaults) {
object.name = "";
object["package"] = "";
object.options = null;
object.source_code_info = null;
}
if (message.name != null && message.hasOwnProperty("name"))
object.name = message.name;
if (message["package"] != null && message.hasOwnProperty("package"))
object["package"] = message["package"];
if (message.dependency && message.dependency.length) {
object.dependency = [];
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 = [];
for (var j = 0; j < message.message_type.length; ++j)
object.message_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.message_type[j], options);
}
if (message.enum_type && message.enum_type.length) {
object.enum_type = [];
for (var j = 0; j < message.enum_type.length; ++j)
object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options);
}
if (message.service && message.service.length) {
object.service = [];
for (var j = 0; j < message.service.length; ++j)
object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options);
}
if (message.extension && message.extension.length) {
object.extension = [];
for (var j = 0; j < message.extension.length; ++j)
object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options);
}
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);
return object;
};
/**
* Converts this FileDescriptorProto to JSON.
* @function toJSON
* @memberof google.protobuf.FileDescriptorProto
* @instance
* @returns {Object.<string,*>} JSON object
*/
FileDescriptorProto.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for FileDescriptorProto
* @function getTypeUrl
* @memberof google.protobuf.FileDescriptorProto
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/google.protobuf.FileDescriptorProto";
};
return FileDescriptorProto;
})();
protobuf.DescriptorProto = (function() {
/**
* Properties of a DescriptorProto.
* @memberof google.protobuf
* @interface IDescriptorProto
* @property {string|null} [name] DescriptorProto name
* @property {Array.<google.protobuf.IFieldDescriptorProto>|null} [field] DescriptorProto field
* @property {Array.<google.protobuf.IFieldDescriptorProto>|null} [extension] DescriptorProto extension
* @property {Array.<google.protobuf.IDescriptorProto>|null} [nested_type] DescriptorProto nested_type
* @property {Array.<google.protobuf.IEnumDescriptorProto>|null} [enum_type] DescriptorProto enum_type
* @property {Array.<google.protobuf.DescriptorProto.IExtensionRange>|null} [extension_range] DescriptorProto extension_range
* @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options
*/
/**
* Constructs a new DescriptorProto.
* @memberof google.protobuf
* @classdesc Represents a DescriptorProto.
* @implements IDescriptorProto
* @constructor
* @param {google.protobuf.IDescriptorProto=} [properties] Properties to set
*/
function DescriptorProto(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)
this[keys[i]] = properties[keys[i]];
}
/**
* DescriptorProto name.
* @member {string} name
* @memberof google.protobuf.DescriptorProto
* @instance
*/
DescriptorProto.prototype.name = "";
/**
* DescriptorProto field.
* @member {Array.<google.protobuf.IFieldDescriptorProto>} field
* @memberof google.protobuf.DescriptorProto
* @instance
*/
DescriptorProto.prototype.field = $util.emptyArray;
/**
* DescriptorProto extension.
* @member {Array.<google.protobuf.IFieldDescriptorProto>} extension
* @memberof google.protobuf.DescriptorProto
* @instance
*/
DescriptorProto.prototype.extension = $util.emptyArray;
/**
* DescriptorProto nested_type.
* @member {Array.<google.protobuf.IDescriptorProto>} nested_type
* @memberof google.protobuf.DescriptorProto
* @instance
*/
DescriptorProto.prototype.nested_type = $util.emptyArray;
/**
* DescriptorProto enum_type.
* @member {Array.<google.protobuf.IEnumDescriptorProto>} enum_type
* @memberof google.protobuf.DescriptorProto
* @instance
*/
DescriptorProto.prototype.enum_type = $util.emptyArray;
/**
* DescriptorProto extension_range.
* @member {Array.<google.protobuf.DescriptorProto.IExtensionRange>} extension_range
* @memberof google.protobuf.DescriptorProto
* @instance
*/
DescriptorProto.prototype.extension_range = $util.emptyArray;
/**
* DescriptorProto options.
* @member {google.protobuf.IMessageOptions|null|undefined} options
* @memberof google.protobuf.DescriptorProto
* @instance
*/
DescriptorProto.prototype.options = null;
/**
* Creates a new DescriptorProto instance using the specified properties.
* @function create
* @memberof google.protobuf.DescriptorProto
* @static
* @param {google.protobuf.IDescriptorProto=} [properties] Properties to set
* @returns {google.protobuf.DescriptorProto} DescriptorProto instance
*/
DescriptorProto.create = function create(properties) {
return new DescriptorProto(properties);
};
/**
* Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages.
* @function encode
* @memberof google.protobuf.DescriptorProto
* @static
* @param {google.protobuf.IDescriptorProto} 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) {
if (!writer)
writer = $Writer.create();
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();
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();
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();
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();
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();
return writer;
};
/**
* Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages.
* @function encodeDelimited
* @memberof google.protobuf.DescriptorProto
* @static
* @param {google.protobuf.IDescriptorProto} 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();
};
/**
* Decodes a DescriptorProto message from the specified reader or buffer.
* @function decode
* @memberof google.protobuf.DescriptorProto
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a DescriptorProto message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof google.protobuf.DescriptorProto
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {google.protobuf.DescriptorProto} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a DescriptorProto message.
* @function verify
* @memberof google.protobuf.DescriptorProto
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
DescriptorProto.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.name != null && message.hasOwnProperty("name"))
if (!$util.isString(message.name))
return "name: string expected";
if (message.field != null && message.hasOwnProperty("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]);
if (error)
return "field." + error;
}
}
if (message.extension != null && message.hasOwnProperty("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]);
if (error)
return "extension." + error;
}
}
if (message.nested_type != null && message.hasOwnProperty("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]);
if (error)
return "nested_type." + error;
}
}
if (message.enum_type != null && message.hasOwnProperty("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]);
if (error)
return "enum_type." + error;
}
}
if (message.extension_range != null && message.hasOwnProperty("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]);
if (error)
return "extension_range." + error;
}
}
if (message.options != null && message.hasOwnProperty("options")) {
var error = $root.google.protobuf.MessageOptions.verify(message.options);
if (error)
return "options." + error;
}
return null;
};
/**
* Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof google.protobuf.DescriptorProto
* @static
* @param {Object.<string,*>} object Plain object
* @returns {google.protobuf.DescriptorProto} DescriptorProto
*/
DescriptorProto.fromObject = function fromObject(object) {
if (object instanceof $root.google.protobuf.DescriptorProto)
return object;
var message = new $root.google.protobuf.DescriptorProto();
if (object.name != null)
message.name = String(object.name);
if (object.field) {
if (!Array.isArray(object.field))
throw TypeError(".google.protobuf.DescriptorProto.field: array expected");
message.field = [];
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 (object.extension) {
if (!Array.isArray(object.extension))
throw TypeError(".google.protobuf.DescriptorProto.extension: array expected");
message.extension = [];
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 (object.nested_type) {
if (!Array.isArray(object.nested_type))
throw TypeError(".google.protobuf.DescriptorProto.nested_type: array expected");
message.nested_type = [];
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 (object.enum_type) {
if (!Array.isArray(object.enum_type))
throw TypeError(".google.protobuf.DescriptorProto.enum_type: array expected");
message.enum_type = [];
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 (object.extension_range) {
if (!Array.isArray(object.extension_range))
throw TypeError(".google.protobuf.DescriptorProto.extension_range: array expected");
message.extension_range = [];
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 (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);
}
return message;
};
/**
* Creates a plain object from a DescriptorProto message. Also converts values to other types if specified.
* @function toObject
* @memberof google.protobuf.DescriptorProto
* @static
* @param {google.protobuf.DescriptorProto} message DescriptorProto
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
DescriptorProto.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults) {
object.field = [];
object.nested_type = [];
object.enum_type = [];
object.extension_range = [];
object.extension = [];
}
if (options.defaults) {
object.name = "";
object.options = null;
}
if (message.name != null && message.hasOwnProperty("name"))
object.name = message.name;
if (message.field && message.field.length) {
object.field = [];
for (var j = 0; j < message.field.length; ++j)
object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options);
}
if (message.nested_type && message.nested_type.length) {
object.nested_type = [];
for (var j = 0; j < message.nested_type.length; ++j)
object.nested_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.nested_type[j], options);
}
if (message.enum_type && message.enum_type.length) {
object.enum_type = [];
for (var j = 0; j < message.enum_type.length; ++j)
object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options);
}
if (message.extension_range && message.extension_range.length) {
object.extension_range = [];
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);
}
if (message.extension && message.extension.length) {
object.extension = [];
for (var j = 0; j < message.extension.length; ++j)
object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options);
}
if (message.options != null && message.hasOwnProperty("options"))
object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options);
return object;
};
/**
* Converts this DescriptorProto to JSON.
* @function toJSON
* @memberof google.protobuf.DescriptorProto
* @instance
* @returns {Object.<string,*>} JSON object
*/
DescriptorProto.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for DescriptorProto
* @function getTypeUrl
* @memberof google.protobuf.DescriptorProto
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/google.protobuf.DescriptorProto";
};
DescriptorProto.ExtensionRange = (function() {
/**
* Properties of an ExtensionRange.
* @memberof google.protobuf.DescriptorProto
* @interface IExtensionRange
* @property {number|null} [start] ExtensionRange start
* @property {number|null} [end] ExtensionRange end
*/
/**
* Constructs a new ExtensionRange.
* @memberof google.protobuf.DescriptorProto
* @classdesc Represents an ExtensionRange.
* @implements IExtensionRange
* @constructor
* @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set
*/
function ExtensionRange(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* ExtensionRange start.
* @member {number} start
* @memberof google.protobuf.DescriptorProto.ExtensionRange
* @instance
*/
ExtensionRange.prototype.start = 0;
/**
* ExtensionRange end.
* @member {number} end
* @memberof google.protobuf.DescriptorProto.ExtensionRange
* @instance
*/
ExtensionRange.prototype.end = 0;
/**
* Creates a new ExtensionRange instance using the specified properties.
* @function create
* @memberof google.protobuf.DescriptorProto.ExtensionRange
* @static
* @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set
* @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance
*/
ExtensionRange.create = function create(properties) {
return new ExtensionRange(properties);
};
/**
* Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages.
* @function encode
* @memberof google.protobuf.DescriptorProto.ExtensionRange
* @static
* @param {google.protobuf.DescriptorProto.IExtensionRange} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end);
return writer;
};
/**
* Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages.
* @function encodeDelimited
* @memberof google.protobuf.DescriptorProto.ExtensionRange
* @static
* @param {google.protobuf.DescriptorProto.IExtensionRange} 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();
};
/**
* Decodes an ExtensionRange message from the specified reader or buffer.
* @function decode
* @memberof google.protobuf.DescriptorProto.ExtensionRange
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes an ExtensionRange message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof google.protobuf.DescriptorProto.ExtensionRange
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {google.protobuf.DescriptorProto.ExtensionRange} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies an ExtensionRange message.
* @function verify
* @memberof google.protobuf.DescriptorProto.ExtensionRange
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
ExtensionRange.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.start != null && message.hasOwnProperty("start"))
if (!$util.isInteger(message.start))
return "start: integer expected";
if (message.end != null && message.hasOwnProperty("end"))
if (!$util.isInteger(message.end))
return "end: integer expected";
return null;
};
/**
* Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof google.protobuf.DescriptorProto.ExtensionRange
* @static
* @param {Object.<string,*>} object Plain object
* @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange
*/
ExtensionRange.fromObject = function fromObject(object) {
if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange)
return object;
var message = new $root.google.protobuf.DescriptorProto.ExtensionRange();
if (object.start != null)
message.start = object.start | 0;
if (object.end != null)
message.end = object.end | 0;
return message;
};
/**
* Creates a plain object from an ExtensionRange message. Also converts values to other types if specified.
* @function toObject
* @memberof google.protobuf.DescriptorProto.ExtensionRange
* @static
* @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
ExtensionRange.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.start = 0;
object.end = 0;
}
if (message.start != null && message.hasOwnProperty("start"))
object.start = message.start;
if (message.end != null && message.hasOwnProperty("end"))
object.end = message.end;
return object;
};
/**
* Converts this ExtensionRange to JSON.
* @function toJSON
* @memberof google.protobuf.DescriptorProto.ExtensionRange
* @instance
* @returns {Object.<string,*>} JSON object
*/
ExtensionRange.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for ExtensionRange
* @function getTypeUrl
* @memberof google.protobuf.DescriptorProto.ExtensionRange
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange";
};
return ExtensionRange;
})();
return DescriptorProto;
})();
protobuf.FieldDescriptorProto = (function() {
/**
* Properties of a FieldDescriptorProto.
* @memberof google.protobuf
* @interface IFieldDescriptorProto
* @property {string|null} [name] FieldDescriptorProto name
* @property {number|null} [number] FieldDescriptorProto number
* @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label
* @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type
* @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
*/
/**
* Constructs a new FieldDescriptorProto.
* @memberof google.protobuf
* @classdesc Represents a FieldDescriptorProto.
* @implements IFieldDescriptorProto
* @constructor
* @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set
*/
function FieldDescriptorProto(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* FieldDescriptorProto name.
* @member {string} name
* @memberof google.protobuf.FieldDescriptorProto
* @instance
*/
FieldDescriptorProto.prototype.name = "";
/**
* FieldDescriptorProto number.
* @member {number} number
* @memberof google.protobuf.FieldDescriptorProto
* @instance
*/
FieldDescriptorProto.prototype.number = 0;
/**
* FieldDescriptorProto label.
* @member {google.protobuf.FieldDescriptorProto.Label} label
* @memberof google.protobuf.FieldDescriptorProto
* @instance
*/
FieldDescriptorProto.prototype.label = 1;
/**
* FieldDescriptorProto type.
* @member {google.protobuf.FieldDescriptorProto.Type} type
* @memberof google.protobuf.FieldDescriptorProto
* @instance
*/
FieldDescriptorProto.prototype.type = 1;
/**
* FieldDescriptorProto type_name.
* @member {string} type_name
* @memberof google.protobuf.FieldDescriptorProto
* @instance
*/
FieldDescriptorProto.prototype.type_name = "";
/**
* FieldDescriptorProto extendee.
* @member {string} extendee
* @memberof google.protobuf.FieldDescriptorProto
* @instance
*/
FieldDescriptorProto.prototype.extendee = "";
/**
* FieldDescriptorProto default_value.
* @member {string} default_value
* @memberof google.protobuf.FieldDescriptorProto
* @instance
*/
FieldDescriptorProto.prototype.default_value = "";
/**
* FieldDescriptorProto options.
* @member {google.protobuf.IFieldOptions|null|undefined} options
* @memberof google.protobuf.FieldDescriptorProto
* @instance
*/
FieldDescriptorProto.prototype.options = null;
/**
* Creates a new FieldDescriptorProto instance using the specified properties.
* @function create
* @memberof google.protobuf.FieldDescriptorProto
* @static
* @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set
* @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance
*/
FieldDescriptorProto.create = function create(properties) {
return new FieldDescriptorProto(properties);
};
/**
* Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages.
* @function encode
* @memberof google.protobuf.FieldDescriptorProto
* @static
* @param {google.protobuf.IFieldDescriptorProto} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee);
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"))
writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label);
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"))
writer.uint32(/* id 6, wireType 2 =*/50).string(message.type_name);
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();
return writer;
};
/**
* Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages.
* @function encodeDelimited
* @memberof google.protobuf.FieldDescriptorProto
* @static
* @param {google.protobuf.IFieldDescriptorProto} 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();
};
/**
* Decodes a FieldDescriptorProto message from the specified reader or buffer.
* @function decode
* @memberof google.protobuf.FieldDescriptorProto
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto();
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);
break;
}
}
return message;
};
/**
* Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof google.protobuf.FieldDescriptorProto
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {google.protobuf.FieldDescriptorProto} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a FieldDescriptorProto message.
* @function verify
* @memberof google.protobuf.FieldDescriptorProto
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
FieldDescriptorProto.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.name != null && message.hasOwnProperty("name"))
if (!$util.isString(message.name))
return "name: string expected";
if (message.number != null && message.hasOwnProperty("number"))
if (!$util.isInteger(message.number))
return "number: integer expected";
if (message.label != null && message.hasOwnProperty("label"))
switch (message.label) {
default:
return "label: enum value expected";
case 1:
case 2:
case 3:
break;
}
if (message.type != null && message.hasOwnProperty("type"))
switch (message.type) {
default:
return "type: enum value expected";
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:
case 16:
case 17:
case 18:
break;
}
if (message.type_name != null && message.hasOwnProperty("type_name"))
if (!$util.isString(message.type_name))
return "type_name: string expected";
if (message.extendee != null && message.hasOwnProperty("extendee"))
if (!$util.isString(message.extendee))
return "extendee: string expected";
if (message.default_value != null && message.hasOwnProperty("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 (error)
return "options." + error;
}
return null;
};
/**
* Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof google.protobuf.FieldDescriptorProto
* @static
* @param {Object.<string,*>} object Plain object
* @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto
*/
FieldDescriptorProto.fromObject = function fromObject(object) {
if (object instanceof $root.google.protobuf.FieldDescriptorProto)
return object;
var message = new $root.google.protobuf.FieldDescriptorProto();
if (object.name != null)
message.name = String(object.name);
if (object.number != null)
message.number = object.number | 0;
switch (object.label) {
default:
if (typeof object.label === "number") {
message.label = object.label;
break;
}
break;
case "LABEL_OPTIONAL":
case 1:
message.label = 1;
break;
case "LABEL_REQUIRED":
case 2:
message.label = 2;
break;
case "LABEL_REPEATED":
case 3:
message.label = 3;
break;
}
switch (object.type) {
default:
if (typeof object.type === "number") {
message.type = object.type;
break;
}
break;
case "TYPE_DOUBLE":
case 1:
message.type = 1;
break;
case "TYPE_FLOAT":
case 2:
message.type = 2;
break;
case "TYPE_INT64":
case 3:
message.type = 3;
break;
case "TYPE_UINT64":
case 4:
message.type = 4;
break;
case "TYPE_INT32":
case 5:
message.type = 5;
break;
case "TYPE_FIXED64":
case 6:
message.type = 6;
break;
case "TYPE_FIXED32":
case 7:
message.type = 7;
break;
case "TYPE_BOOL":
case 8:
message.type = 8;
break;
case "TYPE_STRING":
case 9:
message.type = 9;
break;
case "TYPE_GROUP":
case 10:
message.type = 10;
break;
case "TYPE_MESSAGE":
case 11:
message.type = 11;
break;
case "TYPE_BYTES":
case 12:
message.type = 12;
break;
case "TYPE_UINT32":
case 13:
message.type = 13;
break;
case "TYPE_ENUM":
case 14:
message.type = 14;
break;
case "TYPE_SFIXED32":
case 15:
message.type = 15;
break;
case "TYPE_SFIXED64":
case 16:
message.type = 16;
break;
case "TYPE_SINT32":
case 17:
message.type = 17;
break;
case "TYPE_SINT64":
case 18:
message.type = 18;
break;
}
if (object.type_name != null)
message.type_name = String(object.type_name);
if (object.extendee != null)
message.extendee = String(object.extendee);
if (object.default_value != null)
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);
}
return message;
};
/**
* Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified.
* @function toObject
* @memberof google.protobuf.FieldDescriptorProto
* @static
* @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
FieldDescriptorProto.toObject = function toObject(message, options) {
if (!options)
options = {};
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.type_name = "";
object.default_value = "";
object.options = null;
}
if (message.name != null && message.hasOwnProperty("name"))
object.name = message.name;
if (message.extendee != null && message.hasOwnProperty("extendee"))
object.extendee = message.extendee;
if (message.number != null && message.hasOwnProperty("number"))
object.number = message.number;
if (message.label != null && message.hasOwnProperty("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 && message.hasOwnProperty("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 && message.hasOwnProperty("type_name"))
object.type_name = message.type_name;
if (message.default_value != null && message.hasOwnProperty("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);
return object;
};
/**
* Converts this FieldDescriptorProto to JSON.
* @function toJSON
* @memberof google.protobuf.FieldDescriptorProto
* @instance
* @returns {Object.<string,*>} JSON object
*/
FieldDescriptorProto.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for FieldDescriptorProto
* @function getTypeUrl
* @memberof google.protobuf.FieldDescriptorProto
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto";
};
/**
* Type enum.
* @name google.protobuf.FieldDescriptorProto.Type
* @enum {number}
* @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value
* @property {number} TYPE_FLOAT=2 TYPE_FLOAT value
* @property {number} TYPE_INT64=3 TYPE_INT64 value
* @property {number} TYPE_UINT64=4 TYPE_UINT64 value
* @property {number} TYPE_INT32=5 TYPE_INT32 value
* @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value
* @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value
* @property {number} TYPE_BOOL=8 TYPE_BOOL value
* @property {number} TYPE_STRING=9 TYPE_STRING value
* @property {number} TYPE_GROUP=10 TYPE_GROUP value
* @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value
* @property {number} TYPE_BYTES=12 TYPE_BYTES value
* @property {number} TYPE_UINT32=13 TYPE_UINT32 value
* @property {number} TYPE_ENUM=14 TYPE_ENUM value
* @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value
* @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value
* @property {number} TYPE_SINT32=17 TYPE_SINT32 value
* @property {number} TYPE_SINT64=18 TYPE_SINT64 value
*/
FieldDescriptorProto.Type = (function() {
var valuesById = {}, values = Object.create(valuesById);
values[valuesById[1] = "TYPE_DOUBLE"] = 1;
values[valuesById[2] = "TYPE_FLOAT"] = 2;
values[valuesById[3] = "TYPE_INT64"] = 3;
values[valuesById[4] = "TYPE_UINT64"] = 4;
values[valuesById[5] = "TYPE_INT32"] = 5;
values[valuesById[6] = "TYPE_FIXED64"] = 6;
values[valuesById[7] = "TYPE_FIXED32"] = 7;
values[valuesById[8] = "TYPE_BOOL"] = 8;
values[valuesById[9] = "TYPE_STRING"] = 9;
values[valuesById[10] = "TYPE_GROUP"] = 10;
values[valuesById[11] = "TYPE_MESSAGE"] = 11;
values[valuesById[12] = "TYPE_BYTES"] = 12;
values[valuesById[13] = "TYPE_UINT32"] = 13;
values[valuesById[14] = "TYPE_ENUM"] = 14;
values[valuesById[15] = "TYPE_SFIXED32"] = 15;
values[valuesById[16] = "TYPE_SFIXED64"] = 16;
values[valuesById[17] = "TYPE_SINT32"] = 17;
values[valuesById[18] = "TYPE_SINT64"] = 18;
return values;
})();
/**
* Label enum.
* @name google.protobuf.FieldDescriptorProto.Label
* @enum {number}
* @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value
* @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value
* @property {number} LABEL_REPEATED=3 LABEL_REPEATED value
*/
FieldDescriptorProto.Label = (function() {
var valuesById = {}, values = Object.create(valuesById);
values[valuesById[1] = "LABEL_OPTIONAL"] = 1;
values[valuesById[2] = "LABEL_REQUIRED"] = 2;
values[valuesById[3] = "LABEL_REPEATED"] = 3;
return values;
})();
return FieldDescriptorProto;
})();
protobuf.EnumDescriptorProto = (function() {
/**
* Properties of an EnumDescriptorProto.
* @memberof google.protobuf
* @interface IEnumDescriptorProto
* @property {string|null} [name] EnumDescriptorProto name
* @property {Array.<google.protobuf.IEnumValueDescriptorProto>|null} [value] EnumDescriptorProto value
* @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options
*/
/**
* Constructs a new EnumDescriptorProto.
* @memberof google.protobuf
* @classdesc Represents an EnumDescriptorProto.
* @implements IEnumDescriptorProto
* @constructor
* @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set
*/
function EnumDescriptorProto(properties) {
this.value = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* EnumDescriptorProto name.
* @member {string} name
* @memberof google.protobuf.EnumDescriptorProto
* @instance
*/
EnumDescriptorProto.prototype.name = "";
/**
* EnumDescriptorProto value.
* @member {Array.<google.protobuf.IEnumValueDescriptorProto>} value
* @memberof google.protobuf.EnumDescriptorProto
* @instance
*/
EnumDescriptorProto.prototype.value = $util.emptyArray;
/**
* EnumDescriptorProto options.
* @member {google.protobuf.IEnumOptions|null|undefined} options
* @memberof google.protobuf.EnumDescriptorProto
* @instance
*/
EnumDescriptorProto.prototype.options = null;
/**
* Creates a new EnumDescriptorProto instance using the specified properties.
* @function create
* @memberof google.protobuf.EnumDescriptorProto
* @static
* @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set
* @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance
*/
EnumDescriptorProto.create = function create(properties) {
return new EnumDescriptorProto(properties);
};
/**
* Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages.
* @function encode
* @memberof google.protobuf.EnumDescriptorProto
* @static
* @param {google.protobuf.IEnumDescriptorProto} 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) {
if (!writer)
writer = $Writer.create();
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();
return writer;
};
/**
* Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages.
* @function encodeDelimited
* @memberof google.protobuf.EnumDescriptorProto
* @static
* @param {google.protobuf.IEnumDescriptorProto} 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();
};
/**
* Decodes an EnumDescriptorProto message from the specified reader or buffer.
* @function decode
* @memberof google.protobuf.EnumDescriptorProto
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof google.protobuf.EnumDescriptorProto
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {google.protobuf.EnumDescriptorProto} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies an EnumDescriptorProto message.
* @function verify
* @memberof google.protobuf.EnumDescriptorProto
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
EnumDescriptorProto.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.name != null && message.hasOwnProperty("name"))
if (!$util.isString(message.name))
return "name: string expected";
if (message.value != null && message.hasOwnProperty("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]);
if (error)
return "value." + error;
}
}
if (message.options != null && message.hasOwnProperty("options")) {
var error = $root.google.protobuf.EnumOptions.verify(message.options);
if (error)
return "options." + error;
}
return null;
};
/**
* Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof google.protobuf.EnumDescriptorProto
* @static
* @param {Object.<string,*>} object Plain object
* @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto
*/
EnumDescriptorProto.fromObject = function fromObject(object) {
if (object instanceof $root.google.protobuf.EnumDescriptorProto)
return object;
var message = new $root.google.protobuf.EnumDescriptorProto();
if (object.name != null)
message.name = String(object.name);
if (object.value) {
if (!Array.isArray(object.value))
throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected");
message.value = [];
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 (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);
}
return message;
};
/**
* Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified.
* @function toObject
* @memberof google.protobuf.EnumDescriptorProto
* @static
* @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
EnumDescriptorProto.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.value = [];
if (options.defaults) {
object.name = "";
object.options = null;
}
if (message.name != null && message.hasOwnProperty("name"))
object.name = message.name;
if (message.value && message.value.length) {
object.value = [];
for (var j = 0; j < message.value.length; ++j)
object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options);
}
if (message.options != null && message.hasOwnProperty("options"))
object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options);
return object;
};
/**
* Converts this EnumDescriptorProto to JSON.
* @function toJSON
* @memberof google.protobuf.EnumDescriptorProto
* @instance
* @returns {Object.<string,*>} JSON object
*/
EnumDescriptorProto.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for EnumDescriptorProto
* @function getTypeUrl
* @memberof google.protobuf.EnumDescriptorProto
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto";
};
return EnumDescriptorProto;
})();
protobuf.EnumValueDescriptorProto = (function() {
/**
* Properties of an EnumValueDescriptorProto.
* @memberof google.protobuf
* @interface IEnumValueDescriptorProto
* @property {string|null} [name] EnumValueDescriptorProto name
* @property {number|null} [number] EnumValueDescriptorProto number
* @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options
*/
/**
* Constructs a new EnumValueDescriptorProto.
* @memberof google.protobuf
* @classdesc Represents an EnumValueDescriptorProto.
* @implements IEnumValueDescriptorProto
* @constructor
* @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set
*/
function EnumValueDescriptorProto(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* EnumValueDescriptorProto name.
* @member {string} name
* @memberof google.protobuf.EnumValueDescriptorProto
* @instance
*/
EnumValueDescriptorProto.prototype.name = "";
/**
* EnumValueDescriptorProto number.
* @member {number} number
* @memberof google.protobuf.EnumValueDescriptorProto
* @instance
*/
EnumValueDescriptorProto.prototype.number = 0;
/**
* EnumValueDescriptorProto options.
* @member {google.protobuf.IEnumValueOptions|null|undefined} options
* @memberof google.protobuf.EnumValueDescriptorProto
* @instance
*/
EnumValueDescriptorProto.prototype.options = null;
/**
* Creates a new EnumValueDescriptorProto instance using the specified properties.
* @function create
* @memberof google.protobuf.EnumValueDescriptorProto
* @static
* @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set
* @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance
*/
EnumValueDescriptorProto.create = function create(properties) {
return new EnumValueDescriptorProto(properties);
};
/**
* Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages.
* @function encode
* @memberof google.protobuf.EnumValueDescriptorProto
* @static
* @param {google.protobuf.IEnumValueDescriptorProto} 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) {
if (!writer)
writer = $Writer.create();
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"))
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();
return writer;
};
/**
* Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages.
* @function encodeDelimited
* @memberof google.protobuf.EnumValueDescriptorProto
* @static
* @param {google.protobuf.IEnumValueDescriptorProto} 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();
};
/**
* Decodes an EnumValueDescriptorProto message from the specified reader or buffer.
* @function decode
* @memberof google.protobuf.EnumValueDescriptorProto
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof google.protobuf.EnumValueDescriptorProto
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {google.protobuf.EnumValueDescriptorProto} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies an EnumValueDescriptorProto message.
* @function verify
* @memberof google.protobuf.EnumValueDescriptorProto
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
EnumValueDescriptorProto.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.name != null && message.hasOwnProperty("name"))
if (!$util.isString(message.name))
return "name: string expected";
if (message.number != null && message.hasOwnProperty("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 (error)
return "options." + error;
}
return null;
};
/**
* Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof google.protobuf.EnumValueDescriptorProto
* @static
* @param {Object.<string,*>} object Plain object
* @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto
*/
EnumValueDescriptorProto.fromObject = function fromObject(object) {
if (object instanceof $root.google.protobuf.EnumValueDescriptorProto)
return object;
var message = new $root.google.protobuf.EnumValueDescriptorProto();
if (object.name != null)
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);
}
return message;
};
/**
* Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified.
* @function toObject
* @memberof google.protobuf.EnumValueDescriptorProto
* @static
* @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
EnumValueDescriptorProto.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.name = "";
object.number = 0;
object.options = null;
}
if (message.name != null && message.hasOwnProperty("name"))
object.name = message.name;
if (message.number != null && message.hasOwnProperty("number"))
object.number = message.number;
if (message.options != null && message.hasOwnProperty("options"))
object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options);
return object;
};
/**
* Converts this EnumValueDescriptorProto to JSON.
* @function toJSON
* @memberof google.protobuf.EnumValueDescriptorProto
* @instance
* @returns {Object.<string,*>} JSON object
*/
EnumValueDescriptorProto.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for EnumValueDescriptorProto
* @function getTypeUrl
* @memberof google.protobuf.EnumValueDescriptorProto
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto";
};
return EnumValueDescriptorProto;
})();
protobuf.ServiceDescriptorProto = (function() {
/**
* Properties of a ServiceDescriptorProto.
* @memberof google.protobuf
* @interface IServiceDescriptorProto
* @property {string|null} [name] ServiceDescriptorProto name
* @property {Array.<google.protobuf.IMethodDescriptorProto>|null} [method] ServiceDescriptorProto method
* @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options
*/
/**
* Constructs a new ServiceDescriptorProto.
* @memberof google.protobuf
* @classdesc Represents a ServiceDescriptorProto.
* @implements IServiceDescriptorProto
* @constructor
* @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set
*/
function ServiceDescriptorProto(properties) {
this.method = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* ServiceDescriptorProto name.
* @member {string} name
* @memberof google.protobuf.ServiceDescriptorProto
* @instance
*/
ServiceDescriptorProto.prototype.name = "";
/**
* ServiceDescriptorProto method.
* @member {Array.<google.protobuf.IMethodDescriptorProto>} method
* @memberof google.protobuf.ServiceDescriptorProto
* @instance
*/
ServiceDescriptorProto.prototype.method = $util.emptyArray;
/**
* ServiceDescriptorProto options.
* @member {google.protobuf.IServiceOptions|null|undefined} options
* @memberof google.protobuf.ServiceDescriptorProto
* @instance
*/
ServiceDescriptorProto.prototype.options = null;
/**
* Creates a new ServiceDescriptorProto instance using the specified properties.
* @function create
* @memberof google.protobuf.ServiceDescriptorProto
* @static
* @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set
* @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance
*/
ServiceDescriptorProto.create = function create(properties) {
return new ServiceDescriptorProto(properties);
};
/**
* Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages.
* @function encode
* @memberof google.protobuf.ServiceDescriptorProto
* @static
* @param {google.protobuf.IServiceDescriptorProto} 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) {
if (!writer)
writer = $Writer.create();
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();
return writer;
};
/**
* Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages.
* @function encodeDelimited
* @memberof google.protobuf.ServiceDescriptorProto
* @static
* @param {google.protobuf.IServiceDescriptorProto} 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();
};
/**
* Decodes a ServiceDescriptorProto message from the specified reader or buffer.
* @function decode
* @memberof google.protobuf.ServiceDescriptorProto
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof google.protobuf.ServiceDescriptorProto
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {google.protobuf.ServiceDescriptorProto} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a ServiceDescriptorProto message.
* @function verify
* @memberof google.protobuf.ServiceDescriptorProto
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
ServiceDescriptorProto.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.name != null && message.hasOwnProperty("name"))
if (!$util.isString(message.name))
return "name: string expected";
if (message.method != null && message.hasOwnProperty("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]);
if (error)
return "method." + error;
}
}
if (message.options != null && message.hasOwnProperty("options")) {
var error = $root.google.protobuf.ServiceOptions.verify(message.options);
if (error)
return "options." + error;
}
return null;
};
/**
* Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof google.protobuf.ServiceDescriptorProto
* @static
* @param {Object.<string,*>} object Plain object
* @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto
*/
ServiceDescriptorProto.fromObject = function fromObject(object) {
if (object instanceof $root.google.protobuf.ServiceDescriptorProto)
return object;
var message = new $root.google.protobuf.ServiceDescriptorProto();
if (object.name != null)
message.name = String(object.name);
if (object.method) {
if (!Array.isArray(object.method))
throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected");
message.method = [];
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 (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);
}
return message;
};
/**
* Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified.
* @function toObject
* @memberof google.protobuf.ServiceDescriptorProto
* @static
* @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
ServiceDescriptorProto.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.method = [];
if (options.defaults) {
object.name = "";
object.options = null;
}
if (message.name != null && message.hasOwnProperty("name"))
object.name = message.name;
if (message.method && message.method.length) {
object.method = [];
for (var j = 0; j < message.method.length; ++j)
object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options);
}
if (message.options != null && message.hasOwnProperty("options"))
object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options);
return object;
};
/**
* Converts this ServiceDescriptorProto to JSON.
* @function toJSON
* @memberof google.protobuf.ServiceDescriptorProto
* @instance
* @returns {Object.<string,*>} JSON object
*/
ServiceDescriptorProto.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for ServiceDescriptorProto
* @function getTypeUrl
* @memberof google.protobuf.ServiceDescriptorProto
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto";
};
return ServiceDescriptorProto;
})();
protobuf.MethodDescriptorProto = (function() {
/**
* Properties of a MethodDescriptorProto.
* @memberof google.protobuf
* @interface IMethodDescriptorProto
* @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
*/
/**
* Constructs a new MethodDescriptorProto.
* @memberof google.protobuf
* @classdesc Represents a MethodDescriptorProto.
* @implements IMethodDescriptorProto
* @constructor
* @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set
*/
function MethodDescriptorProto(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* MethodDescriptorProto name.
* @member {string} name
* @memberof google.protobuf.MethodDescriptorProto
* @instance
*/
MethodDescriptorProto.prototype.name = "";
/**
* MethodDescriptorProto input_type.
* @member {string} input_type
* @memberof google.protobuf.MethodDescriptorProto
* @instance
*/
MethodDescriptorProto.prototype.input_type = "";
/**
* MethodDescriptorProto output_type.
* @member {string} output_type
* @memberof google.protobuf.MethodDescriptorProto
* @instance
*/
MethodDescriptorProto.prototype.output_type = "";
/**
* MethodDescriptorProto options.
* @member {google.protobuf.IMethodOptions|null|undefined} options
* @memberof google.protobuf.MethodDescriptorProto
* @instance
*/
MethodDescriptorProto.prototype.options = null;
/**
* Creates a new MethodDescriptorProto instance using the specified properties.
* @function create
* @memberof google.protobuf.MethodDescriptorProto
* @static
* @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set
* @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance
*/
MethodDescriptorProto.create = function create(properties) {
return new MethodDescriptorProto(properties);
};
/**
* Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages.
* @function encode
* @memberof google.protobuf.MethodDescriptorProto
* @static
* @param {google.protobuf.IMethodDescriptorProto} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 2 =*/18).string(message.input_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();
return writer;
};
/**
* Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages.
* @function encodeDelimited
* @memberof google.protobuf.MethodDescriptorProto
* @static
* @param {google.protobuf.IMethodDescriptorProto} 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();
};
/**
* Decodes a MethodDescriptorProto message from the specified reader or buffer.
* @function decode
* @memberof google.protobuf.MethodDescriptorProto
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof google.protobuf.MethodDescriptorProto
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {google.protobuf.MethodDescriptorProto} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a MethodDescriptorProto message.
* @function verify
* @memberof google.protobuf.MethodDescriptorProto
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
MethodDescriptorProto.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.name != null && message.hasOwnProperty("name"))
if (!$util.isString(message.name))
return "name: string expected";
if (message.input_type != null && message.hasOwnProperty("input_type"))
if (!$util.isString(message.input_type))
return "input_type: string expected";
if (message.output_type != null && message.hasOwnProperty("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 (error)
return "options." + error;
}
return null;
};
/**
* Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof google.protobuf.MethodDescriptorProto
* @static
* @param {Object.<string,*>} object Plain object
* @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto
*/
MethodDescriptorProto.fromObject = function fromObject(object) {
if (object instanceof $root.google.protobuf.MethodDescriptorProto)
return object;
var message = new $root.google.protobuf.MethodDescriptorProto();
if (object.name != null)
message.name = String(object.name);
if (object.input_type != null)
message.input_type = String(object.input_type);
if (object.output_type != null)
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);
}
return message;
};
/**
* Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified.
* @function toObject
* @memberof google.protobuf.MethodDescriptorProto
* @static
* @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
MethodDescriptorProto.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.name = "";
object.input_type = "";
object.output_type = "";
object.options = null;
}
if (message.name != null && message.hasOwnProperty("name"))
object.name = message.name;
if (message.input_type != null && message.hasOwnProperty("input_type"))
object.input_type = message.input_type;
if (message.output_type != null && message.hasOwnProperty("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);
return object;
};
/**
* Converts this MethodDescriptorProto to JSON.
* @function toJSON
* @memberof google.protobuf.MethodDescriptorProto
* @instance
* @returns {Object.<string,*>} JSON object
*/
MethodDescriptorProto.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for MethodDescriptorProto
* @function getTypeUrl
* @memberof google.protobuf.MethodDescriptorProto
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto";
};
return MethodDescriptorProto;
})();
protobuf.FileOptions = (function() {
/**
* Properties of a FileOptions.
* @memberof google.protobuf
* @interface IFileOptions
* @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
* @property {boolean|null} [java_generate_equals_and_hash] FileOptions java_generate_equals_and_hash
* @property {google.protobuf.FileOptions.OptimizeMode|null} [optimize_for] FileOptions optimize_for
* @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.<google.protobuf.IUninterpretedOption>|null} [uninterpreted_option] FileOptions uninterpreted_option
*/
/**
* Constructs a new FileOptions.
* @memberof google.protobuf
* @classdesc Represents a FileOptions.
* @implements IFileOptions
* @constructor
* @param {google.protobuf.IFileOptions=} [properties] Properties to set
*/
function FileOptions(properties) {
this.uninterpreted_option = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* FileOptions java_package.
* @member {string} java_package
* @memberof google.protobuf.FileOptions
* @instance
*/
FileOptions.prototype.java_package = "";
/**
* FileOptions java_outer_classname.
* @member {string} java_outer_classname
* @memberof google.protobuf.FileOptions
* @instance
*/
FileOptions.prototype.java_outer_classname = "";
/**
* FileOptions java_multiple_files.
* @member {boolean} java_multiple_files
* @memberof google.protobuf.FileOptions
* @instance
*/
FileOptions.prototype.java_multiple_files = false;
/**
* FileOptions java_generate_equals_and_hash.
* @member {boolean} java_generate_equals_and_hash
* @memberof google.protobuf.FileOptions
* @instance
*/
FileOptions.prototype.java_generate_equals_and_hash = false;
/**
* FileOptions optimize_for.
* @member {google.protobuf.FileOptions.OptimizeMode} optimize_for
* @memberof google.protobuf.FileOptions
* @instance
*/
FileOptions.prototype.optimize_for = 1;
/**
* FileOptions cc_generic_services.
* @member {boolean} cc_generic_services
* @memberof google.protobuf.FileOptions
* @instance
*/
FileOptions.prototype.cc_generic_services = false;
/**
* FileOptions java_generic_services.
* @member {boolean} java_generic_services
* @memberof google.protobuf.FileOptions
* @instance
*/
FileOptions.prototype.java_generic_services = false;
/**
* FileOptions py_generic_services.
* @member {boolean} py_generic_services
* @memberof google.protobuf.FileOptions
* @instance
*/
FileOptions.prototype.py_generic_services = false;
/**
* FileOptions uninterpreted_option.
* @member {Array.<google.protobuf.IUninterpretedOption>} uninterpreted_option
* @memberof google.protobuf.FileOptions
* @instance
*/
FileOptions.prototype.uninterpreted_option = $util.emptyArray;
/**
* Creates a new FileOptions instance using the specified properties.
* @function create
* @memberof google.protobuf.FileOptions
* @static
* @param {google.protobuf.IFileOptions=} [properties] Properties to set
* @returns {google.protobuf.FileOptions} FileOptions instance
*/
FileOptions.create = function create(properties) {
return new FileOptions(properties);
};
/**
* Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages.
* @function encode
* @memberof google.protobuf.FileOptions
* @static
* @param {google.protobuf.IFileOptions} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 8, wireType 2 =*/66).string(message.java_outer_classname);
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"))
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"))
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"))
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"))
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"))
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();
return writer;
};
/**
* Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages.
* @function encodeDelimited
* @memberof google.protobuf.FileOptions
* @static
* @param {google.protobuf.IFileOptions} 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();
};
/**
* Decodes a FileOptions message from the specified reader or buffer.
* @function decode
* @memberof google.protobuf.FileOptions
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions();
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);
break;
}
}
return message;
};
/**
* Decodes a FileOptions message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof google.protobuf.FileOptions
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {google.protobuf.FileOptions} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a FileOptions message.
* @function verify
* @memberof google.protobuf.FileOptions
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
FileOptions.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.java_package != null && message.hasOwnProperty("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 (!$util.isString(message.java_outer_classname))
return "java_outer_classname: string expected";
if (message.java_multiple_files != null && message.hasOwnProperty("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 (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"))
switch (message.optimize_for) {
default:
return "optimize_for: enum value expected";
case 1:
case 2:
case 3:
break;
}
if (message.cc_generic_services != null && message.hasOwnProperty("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 (typeof message.java_generic_services !== "boolean")
return "java_generic_services: boolean expected";
if (message.py_generic_services != null && message.hasOwnProperty("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))
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]);
if (error)
return "uninterpreted_option." + error;
}
}
return null;
};
/**
* Creates a FileOptions message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof google.protobuf.FileOptions
* @static
* @param {Object.<string,*>} object Plain object
* @returns {google.protobuf.FileOptions} FileOptions
*/
FileOptions.fromObject = function fromObject(object) {
if (object instanceof $root.google.protobuf.FileOptions)
return object;
var message = new $root.google.protobuf.FileOptions();
if (object.java_package != null)
message.java_package = String(object.java_package);
if (object.java_outer_classname != null)
message.java_outer_classname = String(object.java_outer_classname);
if (object.java_multiple_files != null)
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);
switch (object.optimize_for) {
default:
if (typeof object.optimize_for === "number") {
message.optimize_for = object.optimize_for;
break;
}
break;
case "SPEED":
case 1:
message.optimize_for = 1;
break;
case "CODE_SIZE":
case 2:
message.optimize_for = 2;
break;
case "LITE_RUNTIME":
case 3:
message.optimize_for = 3;
break;
}
if (object.cc_generic_services != null)
message.cc_generic_services = Boolean(object.cc_generic_services);
if (object.java_generic_services != null)
message.java_generic_services = Boolean(object.java_generic_services);
if (object.py_generic_services != null)
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 = [];
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]);
}
}
return message;
};
/**
* Creates a plain object from a FileOptions message. Also converts values to other types if specified.
* @function toObject
* @memberof google.protobuf.FileOptions
* @static
* @param {google.protobuf.FileOptions} message FileOptions
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
FileOptions.toObject = function toObject(message, options) {
if (!options)
options = {};
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.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"))
object.java_package = message.java_package;
if (message.java_outer_classname != null && message.hasOwnProperty("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] === undefined ? message.optimize_for : $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] : message.optimize_for;
if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files"))
object.java_multiple_files = message.java_multiple_files;
if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services"))
object.cc_generic_services = message.cc_generic_services;
if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services"))
object.java_generic_services = message.java_generic_services;
if (message.py_generic_services != null && message.hasOwnProperty("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"))
object.java_generate_equals_and_hash = message.java_generate_equals_and_hash;
if (message.uninterpreted_option && message.uninterpreted_option.length) {
object.uninterpreted_option = [];
for (var j = 0; j < message.uninterpreted_option.length; ++j)
object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options);
}
return object;
};
/**
* Converts this FileOptions to JSON.
* @function toJSON
* @memberof google.protobuf.FileOptions
* @instance
* @returns {Object.<string,*>} JSON object
*/
FileOptions.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for FileOptions
* @function getTypeUrl
* @memberof google.protobuf.FileOptions
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/google.protobuf.FileOptions";
};
/**
* OptimizeMode enum.
* @name google.protobuf.FileOptions.OptimizeMode
* @enum {number}
* @property {number} SPEED=1 SPEED value
* @property {number} CODE_SIZE=2 CODE_SIZE value
* @property {number} LITE_RUNTIME=3 LITE_RUNTIME value
*/
FileOptions.OptimizeMode = (function() {
var valuesById = {}, values = Object.create(valuesById);
values[valuesById[1] = "SPEED"] = 1;
values[valuesById[2] = "CODE_SIZE"] = 2;
values[valuesById[3] = "LITE_RUNTIME"] = 3;
return values;
})();
return FileOptions;
})();
protobuf.MessageOptions = (function() {
/**
* Properties of a MessageOptions.
* @memberof google.protobuf
* @interface IMessageOptions
* @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.<google.protobuf.IUninterpretedOption>|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
*/
/**
* Constructs a new MessageOptions.
* @memberof google.protobuf
* @classdesc Represents a MessageOptions.
* @implements IMessageOptions
* @constructor
* @param {google.protobuf.IMessageOptions=} [properties] Properties to set
*/
function MessageOptions(properties) {
this.uninterpreted_option = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* MessageOptions message_set_wire_format.
* @member {boolean} message_set_wire_format
* @memberof google.protobuf.MessageOptions
* @instance
*/
MessageOptions.prototype.message_set_wire_format = false;
/**
* MessageOptions no_standard_descriptor_accessor.
* @member {boolean} no_standard_descriptor_accessor
* @memberof google.protobuf.MessageOptions
* @instance
*/
MessageOptions.prototype.no_standard_descriptor_accessor = false;
/**
* MessageOptions uninterpreted_option.
* @member {Array.<google.protobuf.IUninterpretedOption>} 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;
/**
* Creates a new MessageOptions instance using the specified properties.
* @function create
* @memberof google.protobuf.MessageOptions
* @static
* @param {google.protobuf.IMessageOptions=} [properties] Properties to set
* @returns {google.protobuf.MessageOptions} MessageOptions instance
*/
MessageOptions.create = function create(properties) {
return new MessageOptions(properties);
};
/**
* Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages.
* @function encode
* @memberof google.protobuf.MessageOptions
* @static
* @param {google.protobuf.IMessageOptions} 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) {
if (!writer)
writer = $Writer.create();
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"))
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"))
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"))
writer.uint32(/* id 60001, wireType 0 =*/480008).int32(message[".msgpool_hard_limit"]);
return writer;
};
/**
* Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages.
* @function encodeDelimited
* @memberof google.protobuf.MessageOptions
* @static
* @param {google.protobuf.IMessageOptions} 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();
};
/**
* Decodes a MessageOptions message from the specified reader or buffer.
* @function decode
* @memberof google.protobuf.MessageOptions
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a MessageOptions message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof google.protobuf.MessageOptions
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {google.protobuf.MessageOptions} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a MessageOptions message.
* @function verify
* @memberof google.protobuf.MessageOptions
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
MessageOptions.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.message_set_wire_format != null && message.hasOwnProperty("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 (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))
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]);
if (error)
return "uninterpreted_option." + error;
}
}
if (message[".msgpool_soft_limit"] != null && message.hasOwnProperty(".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 (!$util.isInteger(message[".msgpool_hard_limit"]))
return ".msgpool_hard_limit: integer expected";
return null;
};
/**
* Creates a MessageOptions message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof google.protobuf.MessageOptions
* @static
* @param {Object.<string,*>} object Plain object
* @returns {google.protobuf.MessageOptions} MessageOptions
*/
MessageOptions.fromObject = function fromObject(object) {
if (object instanceof $root.google.protobuf.MessageOptions)
return object;
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);
if (object.no_standard_descriptor_accessor != null)
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 = [];
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 (object[".msgpool_soft_limit"] != null)
message[".msgpool_soft_limit"] = object[".msgpool_soft_limit"] | 0;
if (object[".msgpool_hard_limit"] != null)
message[".msgpool_hard_limit"] = object[".msgpool_hard_limit"] | 0;
return message;
};
/**
* Creates a plain object from a MessageOptions message. Also converts values to other types if specified.
* @function toObject
* @memberof google.protobuf.MessageOptions
* @static
* @param {google.protobuf.MessageOptions} message MessageOptions
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
MessageOptions.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.uninterpreted_option = [];
if (options.defaults) {
object.message_set_wire_format = false;
object.no_standard_descriptor_accessor = false;
object[".msgpool_soft_limit"] = 32;
object[".msgpool_hard_limit"] = 384;
}
if (message.message_set_wire_format != null && message.hasOwnProperty("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"))
object.no_standard_descriptor_accessor = message.no_standard_descriptor_accessor;
if (message.uninterpreted_option && message.uninterpreted_option.length) {
object.uninterpreted_option = [];
for (var j = 0; j < message.uninterpreted_option.length; ++j)
object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options);
}
if (message[".msgpool_soft_limit"] != null && message.hasOwnProperty(".msgpool_soft_limit"))
object[".msgpool_soft_limit"] = message[".msgpool_soft_limit"];
if (message[".msgpool_hard_limit"] != null && message.hasOwnProperty(".msgpool_hard_limit"))
object[".msgpool_hard_limit"] = message[".msgpool_hard_limit"];
return object;
};
/**
* Converts this MessageOptions to JSON.
* @function toJSON
* @memberof google.protobuf.MessageOptions
* @instance
* @returns {Object.<string,*>} JSON object
*/
MessageOptions.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for MessageOptions
* @function getTypeUrl
* @memberof google.protobuf.MessageOptions
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/google.protobuf.MessageOptions";
};
return MessageOptions;
})();
protobuf.FieldOptions = (function() {
/**
* Properties of a FieldOptions.
* @memberof google.protobuf
* @interface IFieldOptions
* @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.<google.protobuf.IUninterpretedOption>|null} [uninterpreted_option] FieldOptions uninterpreted_option
* @property {boolean|null} [".key_field"] FieldOptions .key_field
*/
/**
* 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) {
this.uninterpreted_option = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* FieldOptions ctype.
* @member {google.protobuf.FieldOptions.CType} ctype
* @memberof google.protobuf.FieldOptions
* @instance
*/
FieldOptions.prototype.ctype = 0;
/**
* FieldOptions packed.
* @member {boolean} packed
* @memberof google.protobuf.FieldOptions
* @instance
*/
FieldOptions.prototype.packed = false;
/**
* FieldOptions deprecated.
* @member {boolean} deprecated
* @memberof google.protobuf.FieldOptions
* @instance
*/
FieldOptions.prototype.deprecated = false;
/**
* FieldOptions experimental_map_key.
* @member {string} experimental_map_key
* @memberof google.protobuf.FieldOptions
* @instance
*/
FieldOptions.prototype.experimental_map_key = "";
/**
* FieldOptions uninterpreted_option.
* @member {Array.<google.protobuf.IUninterpretedOption>} 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;
/**
* Creates a new FieldOptions instance using the specified properties.
* @function create
* @memberof google.protobuf.FieldOptions
* @static
* @param {google.protobuf.IFieldOptions=} [properties] Properties to set
* @returns {google.protobuf.FieldOptions} FieldOptions instance
*/
FieldOptions.create = function create(properties) {
return new FieldOptions(properties);
};
/**
* Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages.
* @function encode
* @memberof google.protobuf.FieldOptions
* @static
* @param {google.protobuf.IFieldOptions} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed);
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"))
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"))
writer.uint32(/* id 60000, wireType 0 =*/480000).bool(message[".key_field"]);
return writer;
};
/**
* Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages.
* @function encodeDelimited
* @memberof google.protobuf.FieldOptions
* @static
* @param {google.protobuf.IFieldOptions} 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();
};
/**
* Decodes a FieldOptions message from the specified reader or buffer.
* @function decode
* @memberof google.protobuf.FieldOptions
* @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
* @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 60000: {
message[".key_field"] = reader.bool();
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a FieldOptions message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof google.protobuf.FieldOptions
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {google.protobuf.FieldOptions} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a FieldOptions message.
* @function verify
* @memberof google.protobuf.FieldOptions
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
FieldOptions.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.ctype != null && message.hasOwnProperty("ctype"))
switch (message.ctype) {
default:
return "ctype: enum value expected";
case 0:
case 1:
case 2:
break;
}
if (message.packed != null && message.hasOwnProperty("packed"))
if (typeof message.packed !== "boolean")
return "packed: boolean expected";
if (message.deprecated != null && message.hasOwnProperty("deprecated"))
if (typeof message.deprecated !== "boolean")
return "deprecated: boolean expected";
if (message.experimental_map_key != null && message.hasOwnProperty("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))
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]);
if (error)
return "uninterpreted_option." + error;
}
}
if (message[".key_field"] != null && message.hasOwnProperty(".key_field"))
if (typeof message[".key_field"] !== "boolean")
return ".key_field: boolean expected";
return null;
};
/**
* Creates a FieldOptions message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof google.protobuf.FieldOptions
* @static
* @param {Object.<string,*>} object Plain object
* @returns {google.protobuf.FieldOptions} FieldOptions
*/
FieldOptions.fromObject = function fromObject(object) {
if (object instanceof $root.google.protobuf.FieldOptions)
return object;
var message = new $root.google.protobuf.FieldOptions();
switch (object.ctype) {
default:
if (typeof object.ctype === "number") {
message.ctype = object.ctype;
break;
}
break;
case "STRING":
case 0:
message.ctype = 0;
break;
case "CORD":
case 1:
message.ctype = 1;
break;
case "STRING_PIECE":
case 2:
message.ctype = 2;
break;
}
if (object.packed != null)
message.packed = Boolean(object.packed);
if (object.deprecated != null)
message.deprecated = Boolean(object.deprecated);
if (object.experimental_map_key != null)
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 = [];
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 (object[".key_field"] != null)
message[".key_field"] = Boolean(object[".key_field"]);
return message;
};
/**
* Creates a plain object from a FieldOptions message. Also converts values to other types if specified.
* @function toObject
* @memberof google.protobuf.FieldOptions
* @static
* @param {google.protobuf.FieldOptions} message FieldOptions
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
FieldOptions.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.uninterpreted_option = [];
if (options.defaults) {
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] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype;
if (message.packed != null && message.hasOwnProperty("packed"))
object.packed = message.packed;
if (message.deprecated != null && message.hasOwnProperty("deprecated"))
object.deprecated = message.deprecated;
if (message.experimental_map_key != null && message.hasOwnProperty("experimental_map_key"))
object.experimental_map_key = message.experimental_map_key;
if (message.uninterpreted_option && message.uninterpreted_option.length) {
object.uninterpreted_option = [];
for (var j = 0; j < message.uninterpreted_option.length; ++j)
object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options);
}
if (message[".key_field"] != null && message.hasOwnProperty(".key_field"))
object[".key_field"] = message[".key_field"];
return object;
};
/**
* Converts this FieldOptions to JSON.
* @function toJSON
* @memberof google.protobuf.FieldOptions
* @instance
* @returns {Object.<string,*>} JSON object
*/
FieldOptions.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for FieldOptions
* @function getTypeUrl
* @memberof google.protobuf.FieldOptions
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/google.protobuf.FieldOptions";
};
/**
* CType enum.
* @name google.protobuf.FieldOptions.CType
* @enum {number}
* @property {number} STRING=0 STRING value
* @property {number} CORD=1 CORD value
* @property {number} STRING_PIECE=2 STRING_PIECE value
*/
FieldOptions.CType = (function() {
var valuesById = {}, values = Object.create(valuesById);
values[valuesById[0] = "STRING"] = 0;
values[valuesById[1] = "CORD"] = 1;
values[valuesById[2] = "STRING_PIECE"] = 2;
return values;
})();
return FieldOptions;
})();
protobuf.EnumOptions = (function() {
/**
* Properties of an EnumOptions.
* @memberof google.protobuf
* @interface IEnumOptions
* @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpreted_option] EnumOptions uninterpreted_option
*/
/**
* Constructs a new EnumOptions.
* @memberof google.protobuf
* @classdesc Represents an EnumOptions.
* @implements IEnumOptions
* @constructor
* @param {google.protobuf.IEnumOptions=} [properties] Properties to set
*/
function EnumOptions(properties) {
this.uninterpreted_option = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* EnumOptions uninterpreted_option.
* @member {Array.<google.protobuf.IUninterpretedOption>} uninterpreted_option
* @memberof google.protobuf.EnumOptions
* @instance
*/
EnumOptions.prototype.uninterpreted_option = $util.emptyArray;
/**
* Creates a new EnumOptions instance using the specified properties.
* @function create
* @memberof google.protobuf.EnumOptions
* @static
* @param {google.protobuf.IEnumOptions=} [properties] Properties to set
* @returns {google.protobuf.EnumOptions} EnumOptions instance
*/
EnumOptions.create = function create(properties) {
return new EnumOptions(properties);
};
/**
* Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages.
* @function encode
* @memberof google.protobuf.EnumOptions
* @static
* @param {google.protobuf.IEnumOptions} 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) {
if (!writer)
writer = $Writer.create();
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();
return writer;
};
/**
* Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages.
* @function encodeDelimited
* @memberof google.protobuf.EnumOptions
* @static
* @param {google.protobuf.IEnumOptions} 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();
};
/**
* Decodes an EnumOptions message from the specified reader or buffer.
* @function decode
* @memberof google.protobuf.EnumOptions
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes an EnumOptions message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof google.protobuf.EnumOptions
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {google.protobuf.EnumOptions} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies an EnumOptions message.
* @function verify
* @memberof google.protobuf.EnumOptions
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
EnumOptions.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.uninterpreted_option != null && message.hasOwnProperty("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]);
if (error)
return "uninterpreted_option." + error;
}
}
return null;
};
/**
* Creates an EnumOptions message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof google.protobuf.EnumOptions
* @static
* @param {Object.<string,*>} object Plain object
* @returns {google.protobuf.EnumOptions} EnumOptions
*/
EnumOptions.fromObject = function fromObject(object) {
if (object instanceof $root.google.protobuf.EnumOptions)
return object;
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 = [];
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]);
}
}
return message;
};
/**
* Creates a plain object from an EnumOptions message. Also converts values to other types if specified.
* @function toObject
* @memberof google.protobuf.EnumOptions
* @static
* @param {google.protobuf.EnumOptions} message EnumOptions
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
EnumOptions.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.uninterpreted_option = [];
if (message.uninterpreted_option && message.uninterpreted_option.length) {
object.uninterpreted_option = [];
for (var j = 0; j < message.uninterpreted_option.length; ++j)
object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options);
}
return object;
};
/**
* Converts this EnumOptions to JSON.
* @function toJSON
* @memberof google.protobuf.EnumOptions
* @instance
* @returns {Object.<string,*>} JSON object
*/
EnumOptions.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for EnumOptions
* @function getTypeUrl
* @memberof google.protobuf.EnumOptions
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/google.protobuf.EnumOptions";
};
return EnumOptions;
})();
protobuf.EnumValueOptions = (function() {
/**
* Properties of an EnumValueOptions.
* @memberof google.protobuf
* @interface IEnumValueOptions
* @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpreted_option] EnumValueOptions uninterpreted_option
*/
/**
* Constructs a new EnumValueOptions.
* @memberof google.protobuf
* @classdesc Represents an EnumValueOptions.
* @implements IEnumValueOptions
* @constructor
* @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set
*/
function EnumValueOptions(properties) {
this.uninterpreted_option = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* EnumValueOptions uninterpreted_option.
* @member {Array.<google.protobuf.IUninterpretedOption>} uninterpreted_option
* @memberof google.protobuf.EnumValueOptions
* @instance
*/
EnumValueOptions.prototype.uninterpreted_option = $util.emptyArray;
/**
* Creates a new EnumValueOptions instance using the specified properties.
* @function create
* @memberof google.protobuf.EnumValueOptions
* @static
* @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set
* @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance
*/
EnumValueOptions.create = function create(properties) {
return new EnumValueOptions(properties);
};
/**
* Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages.
* @function encode
* @memberof google.protobuf.EnumValueOptions
* @static
* @param {google.protobuf.IEnumValueOptions} 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) {
if (!writer)
writer = $Writer.create();
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();
return writer;
};
/**
* Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages.
* @function encodeDelimited
* @memberof google.protobuf.EnumValueOptions
* @static
* @param {google.protobuf.IEnumValueOptions} 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();
};
/**
* Decodes an EnumValueOptions message from the specified reader or buffer.
* @function decode
* @memberof google.protobuf.EnumValueOptions
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes an EnumValueOptions message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof google.protobuf.EnumValueOptions
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {google.protobuf.EnumValueOptions} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies an EnumValueOptions message.
* @function verify
* @memberof google.protobuf.EnumValueOptions
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
EnumValueOptions.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.uninterpreted_option != null && message.hasOwnProperty("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]);
if (error)
return "uninterpreted_option." + error;
}
}
return null;
};
/**
* Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof google.protobuf.EnumValueOptions
* @static
* @param {Object.<string,*>} object Plain object
* @returns {google.protobuf.EnumValueOptions} EnumValueOptions
*/
EnumValueOptions.fromObject = function fromObject(object) {
if (object instanceof $root.google.protobuf.EnumValueOptions)
return object;
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 = [];
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]);
}
}
return message;
};
/**
* Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified.
* @function toObject
* @memberof google.protobuf.EnumValueOptions
* @static
* @param {google.protobuf.EnumValueOptions} message EnumValueOptions
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
EnumValueOptions.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.uninterpreted_option = [];
if (message.uninterpreted_option && message.uninterpreted_option.length) {
object.uninterpreted_option = [];
for (var j = 0; j < message.uninterpreted_option.length; ++j)
object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options);
}
return object;
};
/**
* Converts this EnumValueOptions to JSON.
* @function toJSON
* @memberof google.protobuf.EnumValueOptions
* @instance
* @returns {Object.<string,*>} JSON object
*/
EnumValueOptions.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for EnumValueOptions
* @function getTypeUrl
* @memberof google.protobuf.EnumValueOptions
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/google.protobuf.EnumValueOptions";
};
return EnumValueOptions;
})();
protobuf.ServiceOptions = (function() {
/**
* Properties of a ServiceOptions.
* @memberof google.protobuf
* @interface IServiceOptions
* @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpreted_option] ServiceOptions uninterpreted_option
*/
/**
* Constructs a new ServiceOptions.
* @memberof google.protobuf
* @classdesc Represents a ServiceOptions.
* @implements IServiceOptions
* @constructor
* @param {google.protobuf.IServiceOptions=} [properties] Properties to set
*/
function ServiceOptions(properties) {
this.uninterpreted_option = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* ServiceOptions uninterpreted_option.
* @member {Array.<google.protobuf.IUninterpretedOption>} uninterpreted_option
* @memberof google.protobuf.ServiceOptions
* @instance
*/
ServiceOptions.prototype.uninterpreted_option = $util.emptyArray;
/**
* Creates a new ServiceOptions instance using the specified properties.
* @function create
* @memberof google.protobuf.ServiceOptions
* @static
* @param {google.protobuf.IServiceOptions=} [properties] Properties to set
* @returns {google.protobuf.ServiceOptions} ServiceOptions instance
*/
ServiceOptions.create = function create(properties) {
return new ServiceOptions(properties);
};
/**
* Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages.
* @function encode
* @memberof google.protobuf.ServiceOptions
* @static
* @param {google.protobuf.IServiceOptions} 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) {
if (!writer)
writer = $Writer.create();
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();
return writer;
};
/**
* Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages.
* @function encodeDelimited
* @memberof google.protobuf.ServiceOptions
* @static
* @param {google.protobuf.IServiceOptions} 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();
};
/**
* Decodes a ServiceOptions message from the specified reader or buffer.
* @function decode
* @memberof google.protobuf.ServiceOptions
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a ServiceOptions message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof google.protobuf.ServiceOptions
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {google.protobuf.ServiceOptions} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a ServiceOptions message.
* @function verify
* @memberof google.protobuf.ServiceOptions
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
ServiceOptions.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.uninterpreted_option != null && message.hasOwnProperty("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]);
if (error)
return "uninterpreted_option." + error;
}
}
return null;
};
/**
* Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof google.protobuf.ServiceOptions
* @static
* @param {Object.<string,*>} object Plain object
* @returns {google.protobuf.ServiceOptions} ServiceOptions
*/
ServiceOptions.fromObject = function fromObject(object) {
if (object instanceof $root.google.protobuf.ServiceOptions)
return object;
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 = [];
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]);
}
}
return message;
};
/**
* Creates a plain object from a ServiceOptions message. Also converts values to other types if specified.
* @function toObject
* @memberof google.protobuf.ServiceOptions
* @static
* @param {google.protobuf.ServiceOptions} message ServiceOptions
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
ServiceOptions.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.uninterpreted_option = [];
if (message.uninterpreted_option && message.uninterpreted_option.length) {
object.uninterpreted_option = [];
for (var j = 0; j < message.uninterpreted_option.length; ++j)
object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options);
}
return object;
};
/**
* Converts this ServiceOptions to JSON.
* @function toJSON
* @memberof google.protobuf.ServiceOptions
* @instance
* @returns {Object.<string,*>} JSON object
*/
ServiceOptions.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for ServiceOptions
* @function getTypeUrl
* @memberof google.protobuf.ServiceOptions
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/google.protobuf.ServiceOptions";
};
return ServiceOptions;
})();
protobuf.MethodOptions = (function() {
/**
* Properties of a MethodOptions.
* @memberof google.protobuf
* @interface IMethodOptions
* @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpreted_option] MethodOptions uninterpreted_option
*/
/**
* Constructs a new MethodOptions.
* @memberof google.protobuf
* @classdesc Represents a MethodOptions.
* @implements IMethodOptions
* @constructor
* @param {google.protobuf.IMethodOptions=} [properties] Properties to set
*/
function MethodOptions(properties) {
this.uninterpreted_option = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* MethodOptions uninterpreted_option.
* @member {Array.<google.protobuf.IUninterpretedOption>} uninterpreted_option
* @memberof google.protobuf.MethodOptions
* @instance
*/
MethodOptions.prototype.uninterpreted_option = $util.emptyArray;
/**
* Creates a new MethodOptions instance using the specified properties.
* @function create
* @memberof google.protobuf.MethodOptions
* @static
* @param {google.protobuf.IMethodOptions=} [properties] Properties to set
* @returns {google.protobuf.MethodOptions} MethodOptions instance
*/
MethodOptions.create = function create(properties) {
return new MethodOptions(properties);
};
/**
* Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages.
* @function encode
* @memberof google.protobuf.MethodOptions
* @static
* @param {google.protobuf.IMethodOptions} 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) {
if (!writer)
writer = $Writer.create();
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();
return writer;
};
/**
* Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages.
* @function encodeDelimited
* @memberof google.protobuf.MethodOptions
* @static
* @param {google.protobuf.IMethodOptions} 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();
};
/**
* Decodes a MethodOptions message from the specified reader or buffer.
* @function decode
* @memberof google.protobuf.MethodOptions
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a MethodOptions message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof google.protobuf.MethodOptions
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {google.protobuf.MethodOptions} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a MethodOptions message.
* @function verify
* @memberof google.protobuf.MethodOptions
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
MethodOptions.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.uninterpreted_option != null && message.hasOwnProperty("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]);
if (error)
return "uninterpreted_option." + error;
}
}
return null;
};
/**
* Creates a MethodOptions message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof google.protobuf.MethodOptions
* @static
* @param {Object.<string,*>} object Plain object
* @returns {google.protobuf.MethodOptions} MethodOptions
*/
MethodOptions.fromObject = function fromObject(object) {
if (object instanceof $root.google.protobuf.MethodOptions)
return object;
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 = [];
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]);
}
}
return message;
};
/**
* Creates a plain object from a MethodOptions message. Also converts values to other types if specified.
* @function toObject
* @memberof google.protobuf.MethodOptions
* @static
* @param {google.protobuf.MethodOptions} message MethodOptions
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
MethodOptions.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.uninterpreted_option = [];
if (message.uninterpreted_option && message.uninterpreted_option.length) {
object.uninterpreted_option = [];
for (var j = 0; j < message.uninterpreted_option.length; ++j)
object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options);
}
return object;
};
/**
* Converts this MethodOptions to JSON.
* @function toJSON
* @memberof google.protobuf.MethodOptions
* @instance
* @returns {Object.<string,*>} JSON object
*/
MethodOptions.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for MethodOptions
* @function getTypeUrl
* @memberof google.protobuf.MethodOptions
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/google.protobuf.MethodOptions";
};
return MethodOptions;
})();
protobuf.UninterpretedOption = (function() {
/**
* Properties of an UninterpretedOption.
* @memberof google.protobuf
* @interface IUninterpretedOption
* @property {Array.<google.protobuf.UninterpretedOption.INamePart>|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
*/
/**
* Constructs a new UninterpretedOption.
* @memberof google.protobuf
* @classdesc Represents an UninterpretedOption.
* @implements IUninterpretedOption
* @constructor
* @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set
*/
function UninterpretedOption(properties) {
this.name = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* UninterpretedOption name.
* @member {Array.<google.protobuf.UninterpretedOption.INamePart>} name
* @memberof google.protobuf.UninterpretedOption
* @instance
*/
UninterpretedOption.prototype.name = $util.emptyArray;
/**
* UninterpretedOption identifier_value.
* @member {string} identifier_value
* @memberof google.protobuf.UninterpretedOption
* @instance
*/
UninterpretedOption.prototype.identifier_value = "";
/**
* UninterpretedOption positive_int_value.
* @member {number|Long} positive_int_value
* @memberof google.protobuf.UninterpretedOption
* @instance
*/
UninterpretedOption.prototype.positive_int_value = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
/**
* UninterpretedOption negative_int_value.
* @member {number|Long} negative_int_value
* @memberof google.protobuf.UninterpretedOption
* @instance
*/
UninterpretedOption.prototype.negative_int_value = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* UninterpretedOption double_value.
* @member {number} double_value
* @memberof google.protobuf.UninterpretedOption
* @instance
*/
UninterpretedOption.prototype.double_value = 0;
/**
* UninterpretedOption string_value.
* @member {Uint8Array} string_value
* @memberof google.protobuf.UninterpretedOption
* @instance
*/
UninterpretedOption.prototype.string_value = $util.newBuffer([]);
/**
* UninterpretedOption aggregate_value.
* @member {string} aggregate_value
* @memberof google.protobuf.UninterpretedOption
* @instance
*/
UninterpretedOption.prototype.aggregate_value = "";
/**
* Creates a new UninterpretedOption instance using the specified properties.
* @function create
* @memberof google.protobuf.UninterpretedOption
* @static
* @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set
* @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance
*/
UninterpretedOption.create = function create(properties) {
return new UninterpretedOption(properties);
};
/**
* Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages.
* @function encode
* @memberof google.protobuf.UninterpretedOption
* @static
* @param {google.protobuf.IUninterpretedOption} 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) {
if (!writer)
writer = $Writer.create();
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"))
writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifier_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"))
writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negative_int_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"))
writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.string_value);
if (message.aggregate_value != null && Object.hasOwnProperty.call(message, "aggregate_value"))
writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregate_value);
return writer;
};
/**
* Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages.
* @function encodeDelimited
* @memberof google.protobuf.UninterpretedOption
* @static
* @param {google.protobuf.IUninterpretedOption} 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();
};
/**
* Decodes an UninterpretedOption message from the specified reader or buffer.
* @function decode
* @memberof google.protobuf.UninterpretedOption
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes an UninterpretedOption message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof google.protobuf.UninterpretedOption
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {google.protobuf.UninterpretedOption} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies an UninterpretedOption message.
* @function verify
* @memberof google.protobuf.UninterpretedOption
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
UninterpretedOption.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.name != null && message.hasOwnProperty("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]);
if (error)
return "name." + error;
}
}
if (message.identifier_value != null && message.hasOwnProperty("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 (!$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 (!$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 (typeof message.double_value !== "number")
return "double_value: number expected";
if (message.string_value != null && message.hasOwnProperty("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 (!$util.isString(message.aggregate_value))
return "aggregate_value: string expected";
return null;
};
/**
* Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof google.protobuf.UninterpretedOption
* @static
* @param {Object.<string,*>} object Plain object
* @returns {google.protobuf.UninterpretedOption} UninterpretedOption
*/
UninterpretedOption.fromObject = function fromObject(object) {
if (object instanceof $root.google.protobuf.UninterpretedOption)
return object;
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 = [];
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 (object.identifier_value != null)
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;
else if (typeof object.positive_int_value === "string")
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;
else if (typeof object.negative_int_value === "string")
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);
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 >= 0)
message.string_value = object.string_value;
if (object.aggregate_value != null)
message.aggregate_value = String(object.aggregate_value);
return message;
};
/**
* Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified.
* @function toObject
* @memberof google.protobuf.UninterpretedOption
* @static
* @param {google.protobuf.UninterpretedOption} message UninterpretedOption
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
UninterpretedOption.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.name = [];
if (options.defaults) {
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;
} else
object.positive_int_value = options.longs === String ? "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;
} else
object.negative_int_value = options.longs === String ? "0" : 0;
object.double_value = 0;
if (options.bytes === String)
object.string_value = "";
else {
object.string_value = [];
if (options.bytes !== Array)
object.string_value = $util.newBuffer(object.string_value);
}
object.aggregate_value = "";
}
if (message.name && message.name.length) {
object.name = [];
for (var j = 0; j < message.name.length; ++j)
object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options);
}
if (message.identifier_value != null && message.hasOwnProperty("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;
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;
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.aggregate_value = message.aggregate_value;
return object;
};
/**
* Converts this UninterpretedOption to JSON.
* @function toJSON
* @memberof google.protobuf.UninterpretedOption
* @instance
* @returns {Object.<string,*>} JSON object
*/
UninterpretedOption.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for UninterpretedOption
* @function getTypeUrl
* @memberof google.protobuf.UninterpretedOption
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/google.protobuf.UninterpretedOption";
};
UninterpretedOption.NamePart = (function() {
/**
* Properties of a NamePart.
* @memberof google.protobuf.UninterpretedOption
* @interface INamePart
* @property {string} name_part NamePart name_part
* @property {boolean} is_extension NamePart is_extension
*/
/**
* Constructs a new NamePart.
* @memberof google.protobuf.UninterpretedOption
* @classdesc Represents a NamePart.
* @implements INamePart
* @constructor
* @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set
*/
function NamePart(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* NamePart name_part.
* @member {string} name_part
* @memberof google.protobuf.UninterpretedOption.NamePart
* @instance
*/
NamePart.prototype.name_part = "";
/**
* NamePart is_extension.
* @member {boolean} is_extension
* @memberof google.protobuf.UninterpretedOption.NamePart
* @instance
*/
NamePart.prototype.is_extension = false;
/**
* Creates a new NamePart instance using the specified properties.
* @function create
* @memberof google.protobuf.UninterpretedOption.NamePart
* @static
* @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set
* @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance
*/
NamePart.create = function create(properties) {
return new NamePart(properties);
};
/**
* Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages.
* @function encode
* @memberof google.protobuf.UninterpretedOption.NamePart
* @static
* @param {google.protobuf.UninterpretedOption.INamePart} 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) {
if (!writer)
writer = $Writer.create();
writer.uint32(/* id 1, wireType 2 =*/10).string(message.name_part);
writer.uint32(/* id 2, wireType 0 =*/16).bool(message.is_extension);
return writer;
};
/**
* Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages.
* @function encodeDelimited
* @memberof google.protobuf.UninterpretedOption.NamePart
* @static
* @param {google.protobuf.UninterpretedOption.INamePart} 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();
};
/**
* Decodes a NamePart message from the specified reader or buffer.
* @function decode
* @memberof google.protobuf.UninterpretedOption.NamePart
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
if (!message.hasOwnProperty("name_part"))
throw $util.ProtocolError("missing required 'name_part'", { instance: message });
if (!message.hasOwnProperty("is_extension"))
throw $util.ProtocolError("missing required 'is_extension'", { instance: message });
return message;
};
/**
* Decodes a NamePart message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof google.protobuf.UninterpretedOption.NamePart
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {google.protobuf.UninterpretedOption.NamePart} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a NamePart message.
* @function verify
* @memberof google.protobuf.UninterpretedOption.NamePart
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
NamePart.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (!$util.isString(message.name_part))
return "name_part: string expected";
if (typeof message.is_extension !== "boolean")
return "is_extension: boolean expected";
return null;
};
/**
* Creates a NamePart message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof google.protobuf.UninterpretedOption.NamePart
* @static
* @param {Object.<string,*>} object Plain object
* @returns {google.protobuf.UninterpretedOption.NamePart} NamePart
*/
NamePart.fromObject = function fromObject(object) {
if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart)
return object;
var message = new $root.google.protobuf.UninterpretedOption.NamePart();
if (object.name_part != null)
message.name_part = String(object.name_part);
if (object.is_extension != null)
message.is_extension = Boolean(object.is_extension);
return message;
};
/**
* Creates a plain object from a NamePart message. Also converts values to other types if specified.
* @function toObject
* @memberof google.protobuf.UninterpretedOption.NamePart
* @static
* @param {google.protobuf.UninterpretedOption.NamePart} message NamePart
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
NamePart.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.name_part = "";
object.is_extension = false;
}
if (message.name_part != null && message.hasOwnProperty("name_part"))
object.name_part = message.name_part;
if (message.is_extension != null && message.hasOwnProperty("is_extension"))
object.is_extension = message.is_extension;
return object;
};
/**
* Converts this NamePart to JSON.
* @function toJSON
* @memberof google.protobuf.UninterpretedOption.NamePart
* @instance
* @returns {Object.<string,*>} JSON object
*/
NamePart.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for NamePart
* @function getTypeUrl
* @memberof google.protobuf.UninterpretedOption.NamePart
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart";
};
return NamePart;
})();
return UninterpretedOption;
})();
protobuf.SourceCodeInfo = (function() {
/**
* Properties of a SourceCodeInfo.
* @memberof google.protobuf
* @interface ISourceCodeInfo
* @property {Array.<google.protobuf.SourceCodeInfo.ILocation>|null} [location] SourceCodeInfo location
*/
/**
* Constructs a new SourceCodeInfo.
* @memberof google.protobuf
* @classdesc Represents a SourceCodeInfo.
* @implements ISourceCodeInfo
* @constructor
* @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set
*/
function SourceCodeInfo(properties) {
this.location = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* SourceCodeInfo location.
* @member {Array.<google.protobuf.SourceCodeInfo.ILocation>} location
* @memberof google.protobuf.SourceCodeInfo
* @instance
*/
SourceCodeInfo.prototype.location = $util.emptyArray;
/**
* Creates a new SourceCodeInfo instance using the specified properties.
* @function create
* @memberof google.protobuf.SourceCodeInfo
* @static
* @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set
* @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance
*/
SourceCodeInfo.create = function create(properties) {
return new SourceCodeInfo(properties);
};
/**
* Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages.
* @function encode
* @memberof google.protobuf.SourceCodeInfo
* @static
* @param {google.protobuf.ISourceCodeInfo} 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) {
if (!writer)
writer = $Writer.create();
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();
return writer;
};
/**
* Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages.
* @function encodeDelimited
* @memberof google.protobuf.SourceCodeInfo
* @static
* @param {google.protobuf.ISourceCodeInfo} 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();
};
/**
* Decodes a SourceCodeInfo message from the specified reader or buffer.
* @function decode
* @memberof google.protobuf.SourceCodeInfo
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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);
break;
}
}
return message;
};
/**
* Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof google.protobuf.SourceCodeInfo
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {google.protobuf.SourceCodeInfo} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a SourceCodeInfo message.
* @function verify
* @memberof google.protobuf.SourceCodeInfo
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
SourceCodeInfo.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.location != null && message.hasOwnProperty("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]);
if (error)
return "location." + error;
}
}
return null;
};
/**
* Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof google.protobuf.SourceCodeInfo
* @static
* @param {Object.<string,*>} object Plain object
* @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo
*/
SourceCodeInfo.fromObject = function fromObject(object) {
if (object instanceof $root.google.protobuf.SourceCodeInfo)
return object;
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 = [];
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]);
}
}
return message;
};
/**
* Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified.
* @function toObject
* @memberof google.protobuf.SourceCodeInfo
* @static
* @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
SourceCodeInfo.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.location = [];
if (message.location && message.location.length) {
object.location = [];
for (var j = 0; j < message.location.length; ++j)
object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options);
}
return object;
};
/**
* Converts this SourceCodeInfo to JSON.
* @function toJSON
* @memberof google.protobuf.SourceCodeInfo
* @instance
* @returns {Object.<string,*>} JSON object
*/
SourceCodeInfo.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for SourceCodeInfo
* @function getTypeUrl
* @memberof google.protobuf.SourceCodeInfo
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/google.protobuf.SourceCodeInfo";
};
SourceCodeInfo.Location = (function() {
/**
* Properties of a Location.
* @memberof google.protobuf.SourceCodeInfo
* @interface ILocation
* @property {Array.<number>|null} [path] Location path
* @property {Array.<number>|null} [span] Location span
*/
/**
* Constructs a new Location.
* @memberof google.protobuf.SourceCodeInfo
* @classdesc Represents a Location.
* @implements ILocation
* @constructor
* @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set
*/
function Location(properties) {
this.path = [];
this.span = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* Location path.
* @member {Array.<number>} path
* @memberof google.protobuf.SourceCodeInfo.Location
* @instance
*/
Location.prototype.path = $util.emptyArray;
/**
* Location span.
* @member {Array.<number>} span
* @memberof google.protobuf.SourceCodeInfo.Location
* @instance
*/
Location.prototype.span = $util.emptyArray;
/**
* Creates a new Location instance using the specified properties.
* @function create
* @memberof google.protobuf.SourceCodeInfo.Location
* @static
* @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set
* @returns {google.protobuf.SourceCodeInfo.Location} Location instance
*/
Location.create = function create(properties) {
return new Location(properties);
};
/**
* Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages.
* @function encode
* @memberof google.protobuf.SourceCodeInfo.Location
* @static
* @param {google.protobuf.SourceCodeInfo.ILocation} 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) {
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();
}
return writer;
};
/**
* Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages.
* @function encodeDelimited
* @memberof google.protobuf.SourceCodeInfo.Location
* @static
* @param {google.protobuf.SourceCodeInfo.ILocation} 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();
};
/**
* Decodes a Location message from the specified reader or buffer.
* @function decode
* @memberof google.protobuf.SourceCodeInfo.Location
* @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
* @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) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = 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());
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
message.span.push(reader.int32());
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a Location message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof google.protobuf.SourceCodeInfo.Location
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {google.protobuf.SourceCodeInfo.Location} 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) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a Location message.
* @function verify
* @memberof google.protobuf.SourceCodeInfo.Location
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
Location.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.path != null && message.hasOwnProperty("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))
return "span: array expected";
for (var i = 0; i < message.span.length; ++i)
if (!$util.isInteger(message.span[i]))
return "span: integer[] expected";
}
return null;
};
/**
* Creates a Location message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof google.protobuf.SourceCodeInfo.Location
* @static
* @param {Object.<string,*>} object Plain object
* @returns {google.protobuf.SourceCodeInfo.Location} Location
*/
Location.fromObject = function fromObject(object) {
if (object instanceof $root.google.protobuf.SourceCodeInfo.Location)
return object;
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 = [];
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 = [];
for (var i = 0; i < object.span.length; ++i)
message.span[i] = object.span[i] | 0;
}
return message;
};
/**
* Creates a plain object from a Location message. Also converts values to other types if specified.
* @function toObject
* @memberof google.protobuf.SourceCodeInfo.Location
* @static
* @param {google.protobuf.SourceCodeInfo.Location} message Location
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
Location.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults) {
object.path = [];
object.span = [];
}
if (message.path && message.path.length) {
object.path = [];
for (var j = 0; j < message.path.length; ++j)
object.path[j] = message.path[j];
}
if (message.span && message.span.length) {
object.span = [];
for (var j = 0; j < message.span.length; ++j)
object.span[j] = message.span[j];
}
return object;
};
/**
* Converts this Location to JSON.
* @function toJSON
* @memberof google.protobuf.SourceCodeInfo.Location
* @instance
* @returns {Object.<string,*>} JSON object
*/
Location.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for Location
* @function getTypeUrl
* @memberof google.protobuf.SourceCodeInfo.Location
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location";
};
return Location;
})();
return SourceCodeInfo;
})();
return protobuf;
})();
return google;
})();
return $root;
});