Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / grpc-cloned / node_modules / protobufjs / externs / protobuf.js
diff --git a/legacy-libs/grpc-cloned/node_modules/protobufjs/externs/protobuf.js b/legacy-libs/grpc-cloned/node_modules/protobufjs/externs/protobuf.js
new file mode 100644 (file)
index 0000000..a2ad4d1
--- /dev/null
@@ -0,0 +1,933 @@
+/*\r
+ * Copyright 2012 The Closure Compiler Authors.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+/**\r
+ * @fileoverview Externs for ProtoBuf.js.\r
+ * @see https://github.com/dcodeIO/ProtoBuf.js\r
+ * @externs\r
+ */\r
+\r
+/**\r
+ BEGIN_NODE_INCLUDE\r
+ var ProtoBuf = require('protobufjs');\r
+ END_NODE_INCLUDE\r
+ */\r
+\r
+/**\r
+ * @typedef {Array}\r
+ */\r
+var Buffer;\r
+\r
+/**\r
+ * @typedef {Object}\r
+ */\r
+var dcodeIO;\r
+\r
+/**\r
+ * {@type Object.<string.*>}\r
+ */\r
+var ProtoBuf = {};\r
+\r
+/**\r
+ * @type {string}\r
+ * @const\r
+ */\r
+ProtoBuf.VERSION;\r
+\r
+/**\r
+ * @type {!Object.<string,number>}\r
+ * @const\r
+ */\r
+ProtoBuf.WIRE_TYPES = {};\r
+\r
+/**\r
+ * @type {number}\r
+ * @const\r
+ */\r
+ProtoBuf.WIRE_TYPES.VARINT;\r
+\r
+/**\r
+ * @type {number}\r
+ * @const\r
+ */\r
+ProtoBuf.WIRE_TYPES.BITS64;\r
+\r
+/**\r
+ * @type {number}\r
+ * @const\r
+ */\r
+ProtoBuf.WIRE_TYPES.LDELIM;\r
+\r
+/**\r
+ * @type {number}\r
+ * @const\r
+ */\r
+ProtoBuf.WIRE_TYPES.STARTGROUP;\r
+\r
+/**\r
+ * @type {number}\r
+ * @const\r
+ */\r
+ProtoBuf.WIRE_TYPES.ENDGROUP;\r
+\r
+/**\r
+ * @type {number}\r
+ * @const\r
+ */\r
+ProtoBuf.WIRE_TYPES.BITS32;\r
+\r
+/**\r
+ * @type {!Array.<number>}\r
+ * @const\r
+ */\r
+ProtoBuf.PACKABLE_WIRE_TYPES;\r
+\r
+/**\r
+ * @type {boolean}\r
+ */\r
+ProtoBuf.convertFieldsToCamelCase;\r
+\r
+/**\r
+ * @type {boolean}\r
+ */\r
+ProtoBuf.populateAccessors;\r
+\r
+/**\r
+ * @dict\r
+ * @type {!Object<string,{name: string, wireType: number}>}\r
+ * @const\r
+ */\r
+ProtoBuf.TYPES;\r
+\r
+/**\r
+ * @type {number}\r
+ */\r
+ProtoBuf.ID_MIN;\r
+\r
+/**\r
+ * @type {number}\r
+ */\r
+ProtoBuf.ID_MAX;\r
+\r
+/**\r
+ * @type {!function(new: ByteBuffer, ...*)}\r
+ */\r
+ProtoBuf.ByteBuffer;\r
+\r
+/**\r
+ * @type {?function(new: Long, ...*)}\r
+ */\r
+ProtoBuf.Long;\r
+\r
+/**\r
+ * @type {!Object<string,string|RegExp>}\r
+ */\r
+ProtoBuf.Lang;\r
+\r
+/**\r
+ * @type {Object<string, function(*)>}\r
+ */\r
+ProtoBuf.DotProto;\r
+\r
+/**\r
+ * @param {string} proto\r
+ * @constructor\r
+ */\r
+ProtoBuf.DotProto.Tokenizer = function(proto) {};\r
+\r
+/**\r
+ * @type {string}\r
+ */\r
+ProtoBuf.DotProto.Tokenizer.prototype.source;\r
+\r
+/**\r
+ * @type {number}\r
+ */\r
+ProtoBuf.DotProto.Tokenizer.prototype.index;\r
+\r
+/**\r
+ * @type {number}\r
+ */\r
+ProtoBuf.DotProto.Tokenizer.prototype.line;\r
+\r
+/**\r
+ * @type {Array.<string>}\r
+ */\r
+ProtoBuf.DotProto.Tokenizer.prototype.stack;\r
+\r
+/**\r
+ * @type {boolean}\r
+ */\r
+ProtoBuf.DotProto.Tokenizer.prototype.readingString;\r
+\r
+/**\r
+ * @return {?string}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.DotProto.Tokenizer.prototype.next = function() {};\r
+\r
+/**\r
+ * @return {?string}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.DotProto.Tokenizer.prototype.peek = function() {};\r
+\r
+/**\r
+ * @return {string}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.DotProto.Tokenizer.prototype.toString = function() {};\r
+\r
+/**\r
+ * @param {string} proto\r
+ * @constructor\r
+ */\r
+ProtoBuf.DotProto.Parser = function(proto) {};\r
+\r
+/**\r
+ * @type {!ProtoBuf.DotProto.Tokenizer}\r
+ */\r
+ProtoBuf.DotProto.Parser.prototype.tn;\r
+\r
+/**\r
+ * @return {{package: (string|null), messages: Array.<Object>, enums: Array.<Object>, imports: Array.<string>, options: Object<string,*>}}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.DotProto.Parser.prototype.parse = function() {};\r
+\r
+/**\r
+ * @return {string}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.DotProto.Parser.prototype.toString = function() {};\r
+\r
+/**\r
+ * @type {Object<string, function(*)>}\r
+ */\r
+ProtoBuf.Reflect.Reflect = {};\r
+\r
+/**\r
+ * @constructor\r
+ * @param {ProtoBuf.Reflect.T} parent\r
+ * @param {string} name Object name\r
+ */\r
+ProtoBuf.Reflect.T = function(parent, name) {};\r
+\r
+/**\r
+ * @type {?ProtoBuf.Reflect.T}\r
+ */\r
+ProtoBuf.Reflect.T.prototype.parent;\r
+\r
+/**\r
+ * @type {string}\r
+ */\r
+ProtoBuf.Reflect.T.prototype.name;\r
+\r
+/**\r
+ * @returns {string}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.Reflect.T.prototype.fqn = function() {};\r
+\r
+/**\r
+ * @param {boolean=} includeClass\r
+ * @returns {string}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.Reflect.T.prototype.toString = function(includeClass) {};\r
+\r
+/**\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.Reflect.T.prototype.build = function() {};\r
+\r
+/**\r
+ * @param {?ProtoBuf.Reflect.Namespace} parent\r
+ * @param {string} name\r
+ * @constructor\r
+ * @extends ProtoBuf.Reflect.T\r
+ */\r
+ProtoBuf.Reflect.Namespace = function(parent, name) {};\r
+\r
+/**\r
+ * @type {Array.<ProtoBuf.Reflect.T>}\r
+ */\r
+ProtoBuf.Reflect.Namespace.prototype.children;\r
+\r
+/**\r
+ * @param {ProtoBuf.Reflect.T=} type\r
+ * @return {Array.<ProtoBuf.Reflect.T>}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.Reflect.Namespace.prototype.getChildren = function(type) {};\r
+\r
+/**\r
+ * @param {ProtoBuf.Reflect.T} child\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.Reflect.Namespace.prototype.addChild = function(child) {};\r
+\r
+/**\r
+ * @param {string|number} nameOrId\r
+ * @returns {boolean}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.Reflect.Namespace.prototype.hasChild = function(nameOrId) {};\r
+\r
+/**\r
+ * @param {string|number} nameOrId\r
+ * @return {?ProtoBuf.Reflect.T}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.Reflect.Namespace.prototype.getChild = function(nameOrId) {};\r
+\r
+/**\r
+ * @param {string} qn\r
+ * @param {boolean=} excludeFields\r
+ * @return {?ProtoBuf.Reflect.Namespace}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.Reflect.Namespace.prototype.resolve = function(qn, excludeFields) {};\r
+\r
+/**\r
+ * @return {Object.<string,Function|Object>}\r
+ */\r
+ProtoBuf.Reflect.Namespace.prototype.build = function() {};\r
+\r
+/**\r
+ * @param {!ProtoBuf.Reflect.Namespace} parent\r
+ * @param {string} name\r
+ * @constructor\r
+ * @extends ProtoBuf.Reflect.Namespace\r
+ */\r
+ProtoBuf.Reflect.Message = function(parent, name) {};\r
+\r
+/**\r
+ * @type {?Array.<number>}\r
+ */\r
+ProtoBuf.Reflect.Message.prototype.extensions;\r
+\r
+/**\r
+ * @type {?ProtoBuf.Builder.Message}\r
+ */\r
+ProtoBuf.Reflect.Message.prototype.clazz;\r
+\r
+/**\r
+ * @return {!ProtoBuf.Builder.Message}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.Reflect.Message.prototype.build = function() {};\r
+\r
+/**\r
+ * @param {!ProtoBuf.Builder.Message} message\r
+ * @param {!ByteBuffer} buffer\r
+ * @return {!ByteBuffer}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.Reflect.Message.prototype.encode = function(message, buffer) {};\r
+\r
+/**\r
+ * @param {!ProtoBuf.Builder.Message} message\r
+ * @return {number}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.Reflect.Message.prototype.calculate = function(message) {};\r
+\r
+/**\r
+ * @param {!ProtoBuf.Builder.Message} message\r
+ * @param {!ByteBuffer} buffer\r
+ * @param {boolean} noVerify\r
+ * @return {!ByteBuffer}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.Reflect.Message.prototype.encodeDelimited = function(message, buffer, noVerify) {};\r
+\r
+/**\r
+ * @param {!ByteBuffer} buffer\r
+ * @param {number=} length\r
+ * @return {!ProtoBuf.Builder.Message}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.Reflect.Message.prototype.decode = function(buffer, length) {};\r
+\r
+/**\r
+ * @param {!ByteBuffer} buffer\r
+ * @param {number=} length\r
+ * @return {!ProtoBuf.Builder.Message}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.Reflect.Message.prototype.decodeDelimited = function(buffer, length) {};\r
+\r
+/**\r
+ * @param {!ProtoBuf.Reflect.Message} message\r
+ * @param {string} rule\r
+ * @param {string} type\r
+ * @param {string} name\r
+ * @param {number} id\r
+ * @param {Object<string>=} options\r
+ * @constructor\r
+ * @extends ProtoBuf.Reflect.T\r
+ */\r
+ProtoBuf.Reflect.Message.Field = function(message, rule, type, name, id, options) {};\r
+\r
+/**\r
+ * @type {boolean}\r
+ */\r
+ProtoBuf.Reflect.Message.Field.prototype.required;\r
+\r
+/**\r
+ * @type {boolean}\r
+ */\r
+ProtoBuf.Reflect.Message.Field.prototype.repeated;\r
+\r
+/**\r
+ * @type {string|{name: string, wireType: number}}\r
+ */\r
+ProtoBuf.Reflect.Message.Field.prototype.type;\r
+\r
+/**\r
+ * @type {number}\r
+ */\r
+ProtoBuf.Reflect.Message.Field.prototype.id;\r
+\r
+/**\r
+ * @type {!Object.<string,*>}\r
+ */\r
+ProtoBuf.Reflect.Message.Field.prototype.options;\r
+\r
+/**\r
+ * @type {?ProtoBuf.Reflect.T}\r
+ */\r
+ProtoBuf.Reflect.Message.Field.prototype.resolvedType;\r
+\r
+/**\r
+ * @type {string}\r
+ */\r
+ProtoBuf.Reflect.Message.Field.prototype.originalName;\r
+\r
+/**\r
+ * @param {*} value\r
+ * @param {boolean=} skipRepeated\r
+ * @return {*}\r
+ * @throws {Error}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.Reflect.Message.Field.prototype.verifyValue = function(value, skipRepeated) {};\r
+\r
+/**\r
+ * @param {*} value\r
+ * @param {!ByteBuffer} buffer\r
+ * @return {!ByteBuffer}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.Reflect.Message.Field.prototype.encode = function(value, buffer) {};\r
+\r
+/**\r
+ * @param {*} value\r
+ * @return {number}\r
+ * @throws {Error}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.Reflect.Message.Field.prototype.calculate = function(value) {};\r
+\r
+/**\r
+ * @param {number} wireType\r
+ * @param {!ByteBuffer} buffer\r
+ * @return {*}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.Reflect.Message.Field.prototype.decode = function(wireType, buffer) {};\r
+\r
+/**\r
+ * @param {*} value\r
+ * @param {!ByteBuffer} buffer\r
+ * @return {!ByteBuffer}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.Reflect.Message.Field.prototype.encodeValue = function(value, buffer) {};\r
+\r
+/**\r
+ * @param {!ProtoBuf.Reflect.T} parent\r
+ * @param {string} name\r
+ * @constructor\r
+ * @extends ProtoBuf.Reflect.Namespace\r
+ */\r
+ProtoBuf.Reflect.Enum = function(parent, name) {};\r
+\r
+/**\r
+ * @return {Object<string,*>}\r
+ */\r
+ProtoBuf.Reflect.Enum.prototype.build = function() {};\r
+\r
+/**\r
+ * @type {?Object.<string,number>}\r
+ */\r
+ProtoBuf.Reflect.Enum.prototype.object;\r
+\r
+/**\r
+ * @param {!ProtoBuf.Reflect.Enum} enm\r
+ * @param {string} name\r
+ * @param {number} id \r
+ * @constructor\r
+ * @extends ProtoBuf.Reflect.T\r
+ */\r
+ProtoBuf.Reflect.Enum.Value = function(enm, name, id) {};\r
+\r
+/**\r
+ * @type {number}\r
+ */\r
+ProtoBuf.Reflect.Enum.Value.prototype.id;\r
+\r
+/**\r
+ * @param {!ProtoBuf.Reflect.Namespace} root\r
+ * @param {string} name Service name\r
+ * @param {Object.<string,*>=} options\r
+ * @constructor\r
+ * @extends ProtoBuf.Reflect.Namespace\r
+ */\r
+ProtoBuf.Reflect.Service = function(root, name, options) {};\r
+\r
+/**\r
+ * @type {ProtoBuf.Builder.Service}\r
+ */\r
+ProtoBuf.Reflect.Service.prototype.clazz;\r
+\r
+/**\r
+ * @return {!ProtoBuf.Builder.Service}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.Reflect.Service.prototype.build = function() {};\r
+\r
+/**\r
+ * @param {!ProtoBuf.Reflect.Service} svc\r
+ * @param {string} name\r
+ * @param {Object.<string,*>=} options\r
+ * @constructor\r
+ * @extends ProtoBuf.Reflect.T\r
+ */\r
+ProtoBuf.Reflect.Service.Method = function(svc, name, options) {};\r
+\r
+/**\r
+ * @return {Object.<string,*>}\r
+ */\r
+ProtoBuf.Reflect.Service.Method.prototype.buildOpt = function() {};\r
+\r
+/**\r
+ * @param {!ProtoBuf.Reflect.Service} svc\r
+ * @param {string} name\r
+ * @param {string} request\r
+ * @param {string} response\r
+ * @param {Object.<string,*>=} options\r
+ * @constructor\r
+ * @extends ProtoBuf.Reflect.Service.Method\r
+ */\r
+ProtoBuf.Reflect.Service.RPCMethod = function(svc, name, request, response, options) {};\r
+\r
+/**\r
+ * @type {string}\r
+ */\r
+ProtoBuf.Reflect.Service.RPCMethod.prototype.requestName;\r
+\r
+/**\r
+ * @type {string}\r
+ */\r
+ProtoBuf.Reflect.Service.RPCMethod.prototype.responseName;\r
+\r
+/**\r
+ * @type {ProtoBuf.Reflect.Message}\r
+ */\r
+ProtoBuf.Reflect.Service.RPCMethod.prototype.resolvedRequestType;\r
+\r
+/**\r
+ * @type {ProtoBuf.Reflect.Message}\r
+ */\r
+ProtoBuf.Reflect.Service.RPCMethod.prototype.resolvedResponseType;\r
+\r
+/**\r
+ * @constructor\r
+ */\r
+ProtoBuf.Builder = function() {};\r
+\r
+/**\r
+ * @type {!ProtoBuf.Reflect.Namespace}\r
+ */\r
+ProtoBuf.Builder.prototype.ns;\r
+\r
+/**\r
+ * @type {?ProtoBuf.Reflect.T}\r
+ */\r
+ProtoBuf.Builder.prototype.ptr;\r
+\r
+/**\r
+ * @type {boolean}\r
+ */\r
+ProtoBuf.Builder.prototype.resolved;\r
+\r
+/**\r
+ * @type {Object.<string,ProtoBuf.Builder.Message|Object>|null}\r
+ */\r
+ProtoBuf.Builder.prototype.result;\r
+\r
+/**\r
+ * @type {Array.<string>}\r
+ */\r
+ProtoBuf.Builder.prototype.files;\r
+\r
+/**\r
+ * @type {?string}\r
+ */\r
+ProtoBuf.Builder.prototype.importRoot;\r
+\r
+/**\r
+ */\r
+ProtoBuf.Builder.prototype.reset = function() {};\r
+\r
+/**\r
+ * @param {string} pkg\r
+ * @return {!ProtoBuf.Builder}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.Builder.prototype.define = function(pkg) {};\r
+\r
+/**\r
+ * @param {Object.<string,*>} def\r
+ * @return {boolean}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.Builder.isValidMessage = function(def) {};\r
+\r
+/**\r
+ * @param {Object.<string,*>} def\r
+ * @return {boolean}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.Builder.isValidMessageField = function(def) {};\r
+\r
+/**\r
+ * @param {Object.<string,*>} def\r
+ * @return {boolean}\r
+ */\r
+ProtoBuf.Builder.isValidEnum = function(def) {};\r
+\r
+/**\r
+ * @param {Object.<string,*>} def\r
+ * @return {boolean}\r
+ */\r
+ProtoBuf.Builder.isValidService = function(def) {};\r
+\r
+/**\r
+ * @param {Object.<string,*>} def\r
+ * @return {boolean}\r
+ */\r
+ProtoBuf.Builder.isValidExtend = function(def) {};\r
+\r
+/**\r
+ * @param {Array.<Object.<string,*>>} messages\r
+ * @return {ProtoBuf.Builder}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.Builder.prototype.create = function(messages) {};\r
+\r
+/**\r
+ * @name ProtoBuf.Builder.prototype.import\r
+ * @function\r
+ * @param {ProtoBuf.Builder} builder\r
+ * @param {(string|{root: string, file: string})=} filename\r
+ * @return {!ProtoBuf.Builder}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.Builder.prototype["import"] = function(builder, filename) {};\r
+\r
+/**\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.Builder.prototype.resolveAll = function() {};\r
+\r
+/**\r
+ * @param {string=} path\r
+ * @return {ProtoBuf.Builder.Message|Object.<string,*>}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.Builder.prototype.build = function(path) {};\r
+\r
+/**\r
+ * @param {string=} path\r
+ * @return {?ProtoBuf.Reflect.T}\r
+ */\r
+ProtoBuf.Builder.prototype.lookup = function(path) {};\r
+\r
+/**\r
+ * @return {string}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.Builder.prototype.toString = function() {};\r
+\r
+/**\r
+ * @param {Object.<string,*>} values\r
+ * @constructor\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.Builder.Message = function(values) {};\r
+\r
+/**\r
+ * @param {string} key\r
+ * @param {*} value\r
+ * @param {boolean=} noAssert\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.Builder.Message.prototype.add = function(key, value, noAssert) {};\r
+\r
+/**\r
+ * @param {string} key\r
+ * @param {*} value\r
+ * @param {boolean=} noAssert\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.Builder.Message.prototype.$add = function(key, value, noAssert) {};\r
+\r
+/**\r
+ * @param {string} key\r
+ * @param {*} value\r
+ * @param {boolean=} noAssert\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.Builder.Message.prototype.set = function(key, value, noAssert) {};\r
+\r
+/**\r
+ * @param {string} key\r
+ * @param {*} value\r
+ * @param {boolean=} noAssert\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.Builder.Message.prototype.$set = function(key, value, noAssert) {};\r
+\r
+/**\r
+ * @param {string} key\r
+ * @return {*}\r
+ * @throws {Error}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.Builder.Message.prototype.get = function(key) {};\r
+\r
+/**\r
+ * @param {string} key\r
+ * @return {*}\r
+ * @throws {Error}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.Builder.Message.prototype.$get = function(key) {};\r
+\r
+/**\r
+ * @param {ByteBuffer=} buffer\r
+ * @return {!ByteBuffer}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.Builder.Message.prototype.encode = function(buffer) {};\r
+\r
+/**\r
+ * @return {number}\r
+ * @throws {Error}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.Builder.Message.prototype.calculate = function() {};\r
+\r
+/**\r
+ * @return {!ArrayBuffer}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.Builder.Message.prototype.encodeAB = function() {};\r
+\r
+/**\r
+ * @return {!ArrayBuffer}\r
+ * @throws {Error}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.Builder.Message.prototype.toArrayBuffer = function() {};\r
+\r
+/**\r
+ * @return {!Buffer}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.Builder.Message.prototype.encodeNB = function() {};\r
+\r
+/**\r
+ * @return {!Buffer}\r
+ * @throws {Error}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.Builder.Message.prototype.toBuffer = function() {};\r
+\r
+/**\r
+ * @return {string}\r
+ * @throws {Error}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.Builder.Message.prototype.encode64 = function() {};\r
+\r
+/**\r
+ * @return {string}\r
+ * @throws {Error}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.Builder.Message.prototype.toBase64 = function() {};\r
+\r
+/**\r
+ * @return {string}\r
+ * @throws {Error}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.Builder.Message.prototype.encodeHex = function() {};\r
+\r
+/**\r
+ * @return {string}\r
+ * @throws {Error}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.Builder.Message.prototype.toHex = function() {};\r
+\r
+/**\r
+ * @param {boolean=} includeBuffers\r
+ * @return {Object.<string,*>}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.Builder.Message.prototype.toRaw = function(includeBuffers) {};\r
+\r
+/**\r
+ * @param {!ByteBuffer|!ArrayBuffer|!Buffer|string} buffer\r
+ * @param {string=} enc\r
+ * @return {!ProtoBuf.Builder.Message}\r
+ * @throws {Error}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.Builder.Message.decode = function(buffer, enc) {};\r
+\r
+/**\r
+ * @param {string} str\r
+ * @return {!ProtoBuf.Builder.Message}\r
+ * @throws {Error}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.Builder.Message.decode64 = function(str) {};\r
+\r
+/**\r
+ * @param {string} str\r
+ * @return {!ProtoBuf.Builder.Message}\r
+ * @throws {Error}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.Builder.Message.decodeHex = function(str) {};\r
+\r
+/**\r
+ * @return {string}\r
+ * @nosideeffects\r
+ */\r
+ProtoBuf.Builder.Message.prototype.toString = function() {};\r
+\r
+/**\r
+ * @param {function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))} rpcImpl\r
+ * @constructor\r
+ */\r
+ProtoBuf.Builder.Service = function(rpcImpl) {};\r
+\r
+/**\r
+ * @type {function(string, ProtoBuf.Builder.Message, function(Error, ProtoBuf.Builder.Message=))}\r
+ */\r
+ProtoBuf.Builder.prototype.rpcImpl;\r
+\r
+/**\r
+ * @param {string} proto\r
+ * @param {(ProtoBuf.Builder|string)=} builder\r
+ * @param {(string|{root: string, file: string})=} filename\r
+ * @return {!ProtoBuf.Builder}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.loadProto = function(proto, builder, filename) {};\r
+\r
+/**\r
+ * @param {string} proto\r
+ * @param {(ProtoBuf.Builder|string|{root: string, file: string})=} builder\r
+ * @param {(string|{root: string, file: string})=} filename\r
+ * @return {!ProtoBuf.Builder}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.protoFromString = function(proto, builder, filename) {};\r
+\r
+/**\r
+ * @param {string|{root: string, file: string}} filename\r
+ * @param {(function(ProtoBuf.Builder)|ProtoBuf.Builder)=} callback\r
+ * @param {ProtoBuf.Builder=} builder\r
+ * @return {ProtoBuf.Builder|undefined}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.loadProtoFile = function(filename, callback, builder) {};\r
+\r
+/**\r
+ * @param {string|{root: string, file: string}} filename\r
+ * @param {(function(ProtoBuf.Builder)|ProtoBuf.Builder)=} callback\r
+ * @param {ProtoBuf.Builder=} builder\r
+ * @return {ProtoBuf.Builder|undefined}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.protoFromFile = function(filename, callback, builder) {};\r
+\r
+/**\r
+ * @param {!*|string} json\r
+ * @param {(ProtoBuf.Builder|string|{root: string, file: string})=} builder\r
+ * @param {(string|{root: string, file: string})=} filename\r
+ * @return {!ProtoBuf.Builder}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.loadJson = function(json, builder, filename) {};\r
+\r
+/**\r
+ * @param {string|{root: string, file: string}} filename\r
+ * @param {(function(ProtoBuf.Builder)|ProtoBuf.Builder)=} callback\r
+ * @param {ProtoBuf.Builder=} builder\r
+ * @return {ProtoBuf.Builder|undefined}\r
+ * @throws {Error}\r
+ */\r
+ProtoBuf.loadJsonFile = function(filename, callback, builder) {};\r
+\r
+/**\r
+ * @param {string=} pkg\r
+ * @return {!ProtoBuf.Builder}\r
+ */\r
+ProtoBuf.newBuilder = function(pkg) {};\r
+\r
+ProtoBuf.Util = {};\r
+\r
+/**\r
+ * @type {boolean}\r
+ */\r
+ProtoBuf.Util.IS_NODE;\r
+\r
+/**\r
+ * @return {XMLHttpRequest}\r
+ */\r
+ProtoBuf.Util.XHR = function() {};\r
+\r
+/**\r
+ * @param {string} path\r
+ * @param {function(?string)=} callback\r
+ * @return {?string|undefined}\r
+ */\r
+ProtoBuf.Util.fetch = function(path, callback) {};\r
+\r
+/**\r
+ * @param {*} obj\r
+ * @return {boolean}\r
+ */\r
+ProtoBuf.Util.isArray = function(obj) {};\r