--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>JSDoc: Class: Message</title>
+
+ <script src="scripts/prettify/prettify.js"> </script>
+ <script src="scripts/prettify/lang-css.js"> </script>
+ <!--[if lt IE 9]>
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div id="main">
+
+ <h1 class="page-title">Class: Message</h1>
+
+
+
+
+
+
+<section>
+
+<header>
+
+ <h2>
+ <span class="ancestors"><a href="ProtoBuf.html">ProtoBuf</a><a href="ProtoBuf.Builder.html">.Builder</a>.</span>
+
+ Message
+ </h2>
+
+ <div class="class-description"><p>Barebone of all runtime messages.</p></div>
+
+
+</header>
+
+<article>
+ <div class="container-overview">
+
+
+
+
+ <h2>Constructor</h2>
+
+
+ <h4 class="name" id="Message"><span class="type-signature"></span>new Message<span class="signature">(values, …var_args)</span><span class="type-signature"></span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Constructs a new runtime Message.</p>
+</div>
+
+
+
+
+
+
+
+
+
+ <h5>Parameters:</h5>
+
+
+<table class="params">
+ <thead>
+ <tr>
+
+ <th>Name</th>
+
+
+ <th>Type</th>
+
+
+ <th>Attributes</th>
+
+
+
+
+ <th class="last">Description</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+ <tr>
+
+ <td class="name"><code>values</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">!Object.<string, *></span>
+|
+
+<span class="param-type">string</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Preset values</p></td>
+ </tr>
+
+
+
+ <tr>
+
+ <td class="name"><code>var_args</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">string</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+
+
+
+
+ <repeatable><br>
+
+ </td>
+
+
+
+
+ <td class="description last"></td>
+ </tr>
+
+
+ </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2375">line 2375</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+<h5>Throws:</h5>
+
+
+
+<dl>
+ <dt>
+ <div class="param-desc">
+ <p>If the message cannot be created</p>
+ </div>
+ </dt>
+ <dd></dd>
+ <dt>
+ <dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Error</span>
+
+
+ </dd>
+ </dl>
+ </dt>
+ <dd></dd>
+</dl>
+
+
+
+
+
+
+
+
+
+ </div>
+
+
+
+
+
+
+
+
+
+
+
+
+ <h3 class="subsection-title">Members</h3>
+
+
+
+<h4 class="name" id=".$options"><span class="type-signature">(static) </span>$options<span class="type-signature"> :Object.<string, *></span></h4>
+
+
+
+
+<div class="description">
+ <p>Message options.</p>
+</div>
+
+
+
+ <h5>Type:</h5>
+ <ul>
+ <li>
+
+<span class="param-type">Object.<string, *></span>
+
+
+ </li>
+ </ul>
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line3052">line 3052</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+<h4 class="name" id=".$type"><span class="type-signature">(static, non-null) </span>$type<span class="type-signature"> :<a href="ProtoBuf.Reflect.Message.html">ProtoBuf.Reflect.Message</a></span></h4>
+
+
+
+
+<div class="description">
+ <p>Reflection type.</p>
+</div>
+
+
+
+ <h5>Type:</h5>
+ <ul>
+ <li>
+
+<span class="param-type"><a href="ProtoBuf.Reflect.Message.html">ProtoBuf.Reflect.Message</a></span>
+
+
+ </li>
+ </ul>
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line3068">line 3068</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+<h4 class="name" id="$options"><span class="type-signature"></span>$options<span class="type-signature"> :Object.<string, *></span></h4>
+
+
+
+
+<div class="description">
+ <p>Message options.</p>
+</div>
+
+
+
+ <h5>Type:</h5>
+ <ul>
+ <li>
+
+<span class="param-type">Object.<string, *></span>
+
+
+ </li>
+ </ul>
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line3060">line 3060</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+<h4 class="name" id="$type"><span class="type-signature">(non-null) </span>$type<span class="type-signature"> :<a href="ProtoBuf.Reflect.Message.html">ProtoBuf.Reflect.Message</a></span></h4>
+
+
+
+
+<div class="description">
+ <p>Reflection type.</p>
+</div>
+
+
+
+ <h5>Type:</h5>
+ <ul>
+ <li>
+
+<span class="param-type"><a href="ProtoBuf.Reflect.Message.html">ProtoBuf.Reflect.Message</a></span>
+
+
+ </li>
+ </ul>
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line3076">line 3076</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h3 class="subsection-title">Methods</h3>
+
+
+
+
+
+
+ <h4 class="name" id=".decode"><span class="type-signature">(static) </span>decode<span class="signature">(buffer, length<span class="signature-attributes">opt</span>, enc<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → (non-null) {<a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a>}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Decodes a message from the specified buffer or string.</p>
+</div>
+
+
+
+
+
+
+
+
+
+ <h5>Parameters:</h5>
+
+
+<table class="params">
+ <thead>
+ <tr>
+
+ <th>Name</th>
+
+
+ <th>Type</th>
+
+
+ <th>Attributes</th>
+
+
+
+
+ <th class="last">Description</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+ <tr>
+
+ <td class="name"><code>buffer</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">ByteBuffer</span>
+|
+
+<span class="param-type">ArrayBuffer</span>
+|
+
+<span class="param-type">Buffer</span>
+|
+
+<span class="param-type">string</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Buffer to decode from</p></td>
+ </tr>
+
+
+
+ <tr>
+
+ <td class="name"><code>length</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">number</span>
+|
+
+<span class="param-type">string</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+ <optional><br>
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Message length. Defaults to decode all the remainig data.</p></td>
+ </tr>
+
+
+
+ <tr>
+
+ <td class="name"><code>enc</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">string</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+ <optional><br>
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Encoding if buffer is a string: hex, utf8 (not recommended), defaults to base64</p></td>
+ </tr>
+
+
+ </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2928">line 2928</a>
+ </li></ul></dd>
+
+
+
+
+
+ <dt class="tag-see">See:</dt>
+ <dd class="tag-see">
+ <ul>
+ <li><a href="ProtoBuf.Builder.Message.html#.decode64">ProtoBuf.Builder.Message.decode64</a></li>
+
+ <li><a href="ProtoBuf.Builder.Message.html#.decodeHex">ProtoBuf.Builder.Message.decodeHex</a></li>
+ </ul>
+ </dd>
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+<h5>Throws:</h5>
+
+
+
+<dl>
+ <dt>
+ <div class="param-desc">
+ <p>If the message cannot be decoded or if required fields are missing. The later still
+ returns the decoded message with missing fields in the <code>decoded</code> property on the error.</p>
+ </div>
+ </dt>
+ <dd></dd>
+ <dt>
+ <dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Error</span>
+
+
+ </dd>
+ </dl>
+ </dt>
+ <dd></dd>
+</dl>
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>Decoded message</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type"><a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a></span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id=".decode64"><span class="type-signature">(static) </span>decode64<span class="signature">(str)</span><span class="type-signature"> → (non-null) {<a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a>}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Decodes the message from the specified base64 encoded string.</p>
+</div>
+
+
+
+
+
+
+
+
+
+ <h5>Parameters:</h5>
+
+
+<table class="params">
+ <thead>
+ <tr>
+
+ <th>Name</th>
+
+
+ <th>Type</th>
+
+
+
+
+
+ <th class="last">Description</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+ <tr>
+
+ <td class="name"><code>str</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">string</span>
+
+
+
+ </td>
+
+
+
+
+
+ <td class="description last"><p>String to decode from</p></td>
+ </tr>
+
+
+ </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2995">line 2995</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+<h5>Throws:</h5>
+
+
+
+<dl>
+ <dt>
+ <div class="param-desc">
+ <p>If the message cannot be decoded or if required fields are missing. The later still
+ returns the decoded message with missing fields in the <code>decoded</code> property on the error.</p>
+ </div>
+ </dt>
+ <dd></dd>
+ <dt>
+ <dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Error</span>
+
+
+ </dd>
+ </dl>
+ </dt>
+ <dd></dd>
+</dl>
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>Decoded message</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type"><a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a></span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id=".decodeDelimited"><span class="type-signature">(static) </span>decodeDelimited<span class="signature">(buffer, enc<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {<a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a>}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Decodes a varint32 length-delimited message from the specified buffer or string.</p>
+</div>
+
+
+
+
+
+
+
+
+
+ <h5>Parameters:</h5>
+
+
+<table class="params">
+ <thead>
+ <tr>
+
+ <th>Name</th>
+
+
+ <th>Type</th>
+
+
+ <th>Attributes</th>
+
+
+
+
+ <th class="last">Description</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+ <tr>
+
+ <td class="name"><code>buffer</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">ByteBuffer</span>
+|
+
+<span class="param-type">ArrayBuffer</span>
+|
+
+<span class="param-type">Buffer</span>
+|
+
+<span class="param-type">string</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Buffer to decode from</p></td>
+ </tr>
+
+
+
+ <tr>
+
+ <td class="name"><code>enc</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">string</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+ <optional><br>
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Encoding if buffer is a string: hex, utf8 (not recommended), defaults to base64</p></td>
+ </tr>
+
+
+ </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2961">line 2961</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+<h5>Throws:</h5>
+
+
+
+<dl>
+ <dt>
+ <div class="param-desc">
+ <p>If the message cannot be decoded or if required fields are missing. The later still
+ returns the decoded message with missing fields in the <code>decoded</code> property on the error.</p>
+ </div>
+ </dt>
+ <dd></dd>
+ <dt>
+ <dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Error</span>
+
+
+ </dd>
+ </dl>
+ </dt>
+ <dd></dd>
+</dl>
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>Decoded message or <code>null</code> if not enough bytes are available yet</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type"><a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a></span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id=".decodeHex"><span class="type-signature">(static) </span>decodeHex<span class="signature">(str)</span><span class="type-signature"> → (non-null) {<a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a>}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Decodes the message from the specified hex encoded string.</p>
+</div>
+
+
+
+
+
+
+
+
+
+ <h5>Parameters:</h5>
+
+
+<table class="params">
+ <thead>
+ <tr>
+
+ <th>Name</th>
+
+
+ <th>Type</th>
+
+
+
+
+
+ <th class="last">Description</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+ <tr>
+
+ <td class="name"><code>str</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">string</span>
+
+
+
+ </td>
+
+
+
+
+
+ <td class="description last"><p>String to decode from</p></td>
+ </tr>
+
+
+ </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line3009">line 3009</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+<h5>Throws:</h5>
+
+
+
+<dl>
+ <dt>
+ <div class="param-desc">
+ <p>If the message cannot be decoded or if required fields are missing. The later still
+ returns the decoded message with missing fields in the <code>decoded</code> property on the error.</p>
+ </div>
+ </dt>
+ <dd></dd>
+ <dt>
+ <dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Error</span>
+
+
+ </dd>
+ </dl>
+ </dt>
+ <dd></dd>
+</dl>
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>Decoded message</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type"><a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a></span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id=".decodeJSON"><span class="type-signature">(static) </span>decodeJSON<span class="signature">(str)</span><span class="type-signature"> → (non-null) {<a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a>}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Decodes the message from a JSON string.</p>
+</div>
+
+
+
+
+
+
+
+
+
+ <h5>Parameters:</h5>
+
+
+<table class="params">
+ <thead>
+ <tr>
+
+ <th>Name</th>
+
+
+ <th>Type</th>
+
+
+
+
+
+ <th class="last">Description</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+ <tr>
+
+ <td class="name"><code>str</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">string</span>
+
+
+
+ </td>
+
+
+
+
+
+ <td class="description last"><p>String to decode from</p></td>
+ </tr>
+
+
+ </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line3023">line 3023</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+<h5>Throws:</h5>
+
+
+
+<dl>
+ <dt>
+ <div class="param-desc">
+ <p>If the message cannot be decoded or if required fields are
+missing.</p>
+ </div>
+ </dt>
+ <dd></dd>
+ <dt>
+ <dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Error</span>
+
+
+ </dd>
+ </dl>
+ </dt>
+ <dd></dd>
+</dl>
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>Decoded message</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type"><a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a></span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="$add"><span class="type-signature"></span>$add<span class="signature">(key, value, noAssert<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → (non-null) {<a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a>}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Adds a value to a repeated field. This is an alias for <a href="ProtoBuf.Builder.Message.html#add">ProtoBuf.Builder.Message#add</a>.</p>
+</div>
+
+
+
+
+
+
+
+
+
+ <h5>Parameters:</h5>
+
+
+<table class="params">
+ <thead>
+ <tr>
+
+ <th>Name</th>
+
+
+ <th>Type</th>
+
+
+ <th>Attributes</th>
+
+
+
+
+ <th class="last">Description</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+ <tr>
+
+ <td class="name"><code>key</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">string</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Field name</p></td>
+ </tr>
+
+
+
+ <tr>
+
+ <td class="name"><code>value</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">*</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Value to add</p></td>
+ </tr>
+
+
+
+ <tr>
+
+ <td class="name"><code>noAssert</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">boolean</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+ <optional><br>
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Whether to assert the value or not (asserts by default)</p></td>
+ </tr>
+
+
+ </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2453">line 2453</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+<h5>Throws:</h5>
+
+
+
+<dl>
+ <dt>
+ <div class="param-desc">
+ <p>If the value cannot be added</p>
+ </div>
+ </dt>
+ <dd></dd>
+ <dt>
+ <dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Error</span>
+
+
+ </dd>
+ </dl>
+ </dt>
+ <dd></dd>
+</dl>
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>this</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type"><a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a></span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="$encode"><span class="type-signature"></span>$encode<span class="signature">(buffer<span class="signature-attributes">opt</span>, noVerify<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → (non-null) {ByteBuffer}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Encodes the message.</p>
+</div>
+
+
+
+
+
+
+
+
+
+ <h5>Parameters:</h5>
+
+
+<table class="params">
+ <thead>
+ <tr>
+
+ <th>Name</th>
+
+
+ <th>Type</th>
+
+
+ <th>Attributes</th>
+
+
+
+
+ <th class="last">Description</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+ <tr>
+
+ <td class="name"><code>buffer</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">ByteBuffer</span>
+|
+
+<span class="param-type">boolean</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+ <optional><br>
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>ByteBuffer to encode to. Will create a new one and flip it if omitted.</p></td>
+ </tr>
+
+
+
+ <tr>
+
+ <td class="name"><code>noVerify</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">boolean</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+ <optional><br>
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Whether to not verify field values, defaults to <code>false</code></p></td>
+ </tr>
+
+
+ </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2651">line 2651</a>
+ </li></ul></dd>
+
+
+
+
+
+ <dt class="tag-see">See:</dt>
+ <dd class="tag-see">
+ <ul>
+ <li><a href="ProtoBuf.Builder.Message.html#encode64">ProtoBuf.Builder.Message#encode64</a></li>
+
+ <li><a href="ProtoBuf.Builder.Message.html#encodeHex">ProtoBuf.Builder.Message#encodeHex</a></li>
+
+ <li><a href="ProtoBuf.Builder.Message.html#encodeAB">ProtoBuf.Builder.Message#encodeAB</a></li>
+ </ul>
+ </dd>
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+<h5>Throws:</h5>
+
+
+
+<dl>
+ <dt>
+ <div class="param-desc">
+ <p>If the message cannot be encoded or if required fields are missing. The later still
+ returns the encoded ByteBuffer in the <code>encoded</code> property on the error.</p>
+ </div>
+ </dt>
+ <dd></dd>
+ <dt>
+ <dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Error</span>
+
+
+ </dd>
+ </dl>
+ </dt>
+ <dd></dd>
+</dl>
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>Encoded message as a ByteBuffer</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">ByteBuffer</span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="$get"><span class="type-signature"></span>$get<span class="signature">(key)</span><span class="type-signature"> → {*}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Gets a field's value. This is an alias for <a href="ProtoBuf.Builder.Message.html#$get">ProtoBuf.Builder.Message#$get</a>.</p>
+</div>
+
+
+
+
+
+
+
+
+
+ <h5>Parameters:</h5>
+
+
+<table class="params">
+ <thead>
+ <tr>
+
+ <th>Name</th>
+
+
+ <th>Type</th>
+
+
+
+
+
+ <th class="last">Description</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+ <tr>
+
+ <td class="name"><code>key</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">string</span>
+
+
+
+ </td>
+
+
+
+
+
+ <td class="description last"><p>Key</p></td>
+ </tr>
+
+
+ </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2541">line 2541</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+<h5>Throws:</h5>
+
+
+
+<dl>
+ <dt>
+ <div class="param-desc">
+ <p>If there is no such field</p>
+ </div>
+ </dt>
+ <dd></dd>
+ <dt>
+ <dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Error</span>
+
+
+ </dd>
+ </dl>
+ </dt>
+ <dd></dd>
+</dl>
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>Value</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">*</span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="$set"><span class="type-signature"></span>$set<span class="signature">(keyOrObj, value<span class="signature-attributes">opt</span>, noAssert<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Sets a field's value. This is an alias for [@link ProtoBuf.Builder.Message#set}.</p>
+</div>
+
+
+
+
+
+
+
+
+
+ <h5>Parameters:</h5>
+
+
+<table class="params">
+ <thead>
+ <tr>
+
+ <th>Name</th>
+
+
+ <th>Type</th>
+
+
+ <th>Attributes</th>
+
+
+
+
+ <th class="last">Description</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+ <tr>
+
+ <td class="name"><code>keyOrObj</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">string</span>
+|
+
+<span class="param-type">!Object.<string, *></span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>String key or plain object holding multiple values</p></td>
+ </tr>
+
+
+
+ <tr>
+
+ <td class="name"><code>value</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">*</span>
+|
+
+<span class="param-type">boolean</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+ <optional><br>
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Value to set if key is a string, otherwise omitted</p></td>
+ </tr>
+
+
+
+ <tr>
+
+ <td class="name"><code>noAssert</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">boolean</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+ <optional><br>
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Whether to not assert the value, defaults to <code>false</code></p></td>
+ </tr>
+
+
+ </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2508">line 2508</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+<h5>Throws:</h5>
+
+
+
+<dl>
+ <dt>
+ <div class="param-desc">
+ <p>If the value cannot be set</p>
+ </div>
+ </dt>
+ <dd></dd>
+ <dt>
+ <dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Error</span>
+
+
+ </dd>
+ </dl>
+ </dt>
+ <dd></dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="add"><span class="type-signature"></span>add<span class="signature">(key, value, noAssert<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → (non-null) {<a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a>}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Adds a value to a repeated field.</p>
+</div>
+
+
+
+
+
+
+
+
+
+ <h5>Parameters:</h5>
+
+
+<table class="params">
+ <thead>
+ <tr>
+
+ <th>Name</th>
+
+
+ <th>Type</th>
+
+
+ <th>Attributes</th>
+
+
+
+
+ <th class="last">Description</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+ <tr>
+
+ <td class="name"><code>key</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">string</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Field name</p></td>
+ </tr>
+
+
+
+ <tr>
+
+ <td class="name"><code>value</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">*</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Value to add</p></td>
+ </tr>
+
+
+
+ <tr>
+
+ <td class="name"><code>noAssert</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">boolean</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+ <optional><br>
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Whether to assert the value or not (asserts by default)</p></td>
+ </tr>
+
+
+ </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2425">line 2425</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+<h5>Throws:</h5>
+
+
+
+<dl>
+ <dt>
+ <div class="param-desc">
+ <p>If the value cannot be added</p>
+ </div>
+ </dt>
+ <dd></dd>
+ <dt>
+ <dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Error</span>
+
+
+ </dd>
+ </dl>
+ </dt>
+ <dd></dd>
+</dl>
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>this</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type"><a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a></span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="calculate"><span class="type-signature"></span>calculate<span class="signature">()</span><span class="type-signature"> → {number}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Calculates the byte length of the message.</p>
+</div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2695">line 2695</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+<h5>Throws:</h5>
+
+
+
+<dl>
+ <dt>
+ <div class="param-desc">
+ <p>If the message cannot be calculated or if required fields are missing.</p>
+ </div>
+ </dt>
+ <dd></dd>
+ <dt>
+ <dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Error</span>
+
+
+ </dd>
+ </dl>
+ </dt>
+ <dd></dd>
+</dl>
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>Byte length</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">number</span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="encode64"><span class="type-signature"></span>encode64<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Directly encodes the message to a base64 encoded string.</p>
+</div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2788">line 2788</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+<h5>Throws:</h5>
+
+
+
+<dl>
+ <dt>
+ <div class="param-desc">
+ <p>If the underlying buffer cannot be encoded or if required fields are missing. The later
+ still returns the encoded base64 string in the <code>encoded</code> property on the error.</p>
+ </div>
+ </dt>
+ <dd></dd>
+ <dt>
+ <dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Error</span>
+
+
+ </dd>
+ </dl>
+ </dt>
+ <dd></dd>
+</dl>
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>Base64 encoded string</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">string</span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="encodeAB"><span class="type-signature"></span>encodeAB<span class="signature">()</span><span class="type-signature"> → {ArrayBuffer}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Directly encodes the message to an ArrayBuffer.</p>
+</div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2730">line 2730</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+<h5>Throws:</h5>
+
+
+
+<dl>
+ <dt>
+ <div class="param-desc">
+ <p>If the message cannot be encoded or if required fields are missing. The later still
+ returns the encoded ArrayBuffer in the <code>encoded</code> property on the error.</p>
+ </div>
+ </dt>
+ <dd></dd>
+ <dt>
+ <dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Error</span>
+
+
+ </dd>
+ </dl>
+ </dt>
+ <dd></dd>
+</dl>
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>Encoded message as ArrayBuffer</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">ArrayBuffer</span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="encodeDelimited"><span class="type-signature"></span>encodeDelimited<span class="signature">(buffer<span class="signature-attributes">opt</span>, noVerify<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → (non-null) {ByteBuffer}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Encodes the varint32 length-delimited message.</p>
+</div>
+
+
+
+
+
+
+
+
+
+ <h5>Parameters:</h5>
+
+
+<table class="params">
+ <thead>
+ <tr>
+
+ <th>Name</th>
+
+
+ <th>Type</th>
+
+
+ <th>Attributes</th>
+
+
+
+
+ <th class="last">Description</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+ <tr>
+
+ <td class="name"><code>buffer</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">ByteBuffer</span>
+|
+
+<span class="param-type">boolean</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+ <optional><br>
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>ByteBuffer to encode to. Will create a new one and flip it if omitted.</p></td>
+ </tr>
+
+
+
+ <tr>
+
+ <td class="name"><code>noVerify</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">boolean</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+ <optional><br>
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Whether to not verify field values, defaults to <code>false</code></p></td>
+ </tr>
+
+
+ </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2707">line 2707</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+<h5>Throws:</h5>
+
+
+
+<dl>
+ <dt>
+ <div class="param-desc">
+ <p>If the message cannot be encoded or if required fields are missing. The later still
+ returns the encoded ByteBuffer in the <code>encoded</code> property on the error.</p>
+ </div>
+ </dt>
+ <dd></dd>
+ <dt>
+ <dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Error</span>
+
+
+ </dd>
+ </dl>
+ </dt>
+ <dd></dd>
+</dl>
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>Encoded message as a ByteBuffer</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">ByteBuffer</span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="encodeHex"><span class="type-signature"></span>encodeHex<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Directly encodes the message to a hex encoded string.</p>
+</div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2817">line 2817</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+<h5>Throws:</h5>
+
+
+
+<dl>
+ <dt>
+ <div class="param-desc">
+ <p>If the underlying buffer cannot be encoded or if required fields are missing. The later
+ still returns the encoded hex string in the <code>encoded</code> property on the error.</p>
+ </div>
+ </dt>
+ <dd></dd>
+ <dt>
+ <dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Error</span>
+
+
+ </dd>
+ </dl>
+ </dt>
+ <dd></dd>
+</dl>
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>Hex encoded string</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">string</span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="encodeJSON"><span class="type-signature"></span>encodeJSON<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Encodes a message to JSON.</p>
+</div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2918">line 2918</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>JSON string</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">string</span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="encodeNB"><span class="type-signature"></span>encodeNB<span class="signature">()</span><span class="type-signature"> → (non-null) {Buffer}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Directly encodes the message to a node Buffer.</p>
+</div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2759">line 2759</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+<h5>Throws:</h5>
+
+
+
+<dl>
+ <dt>
+ <div class="param-desc">
+ <p>If the message cannot be encoded, not running under node.js or if required fields are
+ missing. The later still returns the encoded node Buffer in the <code>encoded</code> property on the error.</p>
+ </div>
+ </dt>
+ <dd></dd>
+ <dt>
+ <dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Error</span>
+
+
+ </dd>
+ </dl>
+ </dt>
+ <dd></dd>
+</dl>
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Buffer</span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="get"><span class="type-signature"></span>get<span class="signature">(key, noAssert<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {*}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Gets a field's value.</p>
+</div>
+
+
+
+
+
+
+
+
+
+ <h5>Parameters:</h5>
+
+
+<table class="params">
+ <thead>
+ <tr>
+
+ <th>Name</th>
+
+
+ <th>Type</th>
+
+
+ <th>Attributes</th>
+
+
+
+
+ <th class="last">Description</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+ <tr>
+
+ <td class="name"><code>key</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">string</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Key</p></td>
+ </tr>
+
+
+
+ <tr>
+
+ <td class="name"><code>noAssert</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">boolean</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+ <optional><br>
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Whether to not assert for an actual field, defaults to <code>false</code></p></td>
+ </tr>
+
+
+ </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2520">line 2520</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+<h5>Throws:</h5>
+
+
+
+<dl>
+ <dt>
+ <div class="param-desc">
+ <p>If there is no such field</p>
+ </div>
+ </dt>
+ <dd></dd>
+ <dt>
+ <dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Error</span>
+
+
+ </dd>
+ </dl>
+ </dt>
+ <dd></dd>
+</dl>
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>Value</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">*</span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="get%5BSomeField%5D"><span class="type-signature">(abstract) </span>get[SomeField]<span class="signature">()</span><span class="type-signature"> → {*}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Gets a value. This method is present for each field, but only if there is no name conflict with
+ another field.</p>
+</div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2625">line 2625</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>The value</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">*</span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="get_%5Bsome_field%5D"><span class="type-signature">(abstract) </span>get_[some_field]<span class="signature">()</span><span class="type-signature"> → {*}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Gets a value. This method is present for each field, but only if there is no name conflict with
+ another field.</p>
+</div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2636">line 2636</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>The value</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">*</span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="set"><span class="type-signature"></span>set<span class="signature">(keyOrObj, value<span class="signature-attributes">opt</span>, noAssert<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → (non-null) {<a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a>}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Sets a field's value.</p>
+</div>
+
+
+
+
+
+
+
+
+
+ <h5>Parameters:</h5>
+
+
+<table class="params">
+ <thead>
+ <tr>
+
+ <th>Name</th>
+
+
+ <th>Type</th>
+
+
+ <th>Attributes</th>
+
+
+
+
+ <th class="last">Description</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+ <tr>
+
+ <td class="name"><code>keyOrObj</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">string</span>
+|
+
+<span class="param-type">!Object.<string, *></span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>String key or plain object holding multiple values</p></td>
+ </tr>
+
+
+
+ <tr>
+
+ <td class="name"><code>value</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">*</span>
+|
+
+<span class="param-type">boolean</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+ <optional><br>
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Value to set if key is a string, otherwise omitted</p></td>
+ </tr>
+
+
+
+ <tr>
+
+ <td class="name"><code>noAssert</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">boolean</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+ <optional><br>
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Whether to not assert for an actual field / proper value type, defaults to <code>false</code></p></td>
+ </tr>
+
+
+ </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2466">line 2466</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+<h5>Throws:</h5>
+
+
+
+<dl>
+ <dt>
+ <div class="param-desc">
+ <p>If the value cannot be set</p>
+ </div>
+ </dt>
+ <dd></dd>
+ <dt>
+ <dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Error</span>
+
+
+ </dd>
+ </dl>
+ </dt>
+ <dd></dd>
+</dl>
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>this</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type"><a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a></span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="set%5BSomeField%5D"><span class="type-signature">(abstract) </span>set[SomeField]<span class="signature">(value, noAssert<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → (non-null) {<a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a>}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Sets a value. This method is present for each field, but only if there is no name conflict with
+ another field.</p>
+</div>
+
+
+
+
+
+
+
+
+
+ <h5>Parameters:</h5>
+
+
+<table class="params">
+ <thead>
+ <tr>
+
+ <th>Name</th>
+
+
+ <th>Type</th>
+
+
+ <th>Attributes</th>
+
+
+
+
+ <th class="last">Description</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+ <tr>
+
+ <td class="name"><code>value</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">*</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Value to set</p></td>
+ </tr>
+
+
+
+ <tr>
+
+ <td class="name"><code>noAssert</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">boolean</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+ <optional><br>
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Whether to not assert the value, defaults to <code>false</code></p></td>
+ </tr>
+
+
+ </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2597">line 2597</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+<h5>Throws:</h5>
+
+
+
+<dl>
+ <dt>
+ <div class="param-desc">
+ <p>If the value cannot be set</p>
+ </div>
+ </dt>
+ <dd></dd>
+ <dt>
+ <dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Error</span>
+
+
+ </dd>
+ </dl>
+ </dt>
+ <dd></dd>
+</dl>
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>this</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type"><a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a></span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="set_%5Bsome_field%5D"><span class="type-signature">(abstract) </span>set_[some_field]<span class="signature">(value, noAssert<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → (non-null) {<a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a>}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Sets a value. This method is present for each field, but only if there is no name conflict with
+ another field.</p>
+</div>
+
+
+
+
+
+
+
+
+
+ <h5>Parameters:</h5>
+
+
+<table class="params">
+ <thead>
+ <tr>
+
+ <th>Name</th>
+
+
+ <th>Type</th>
+
+
+ <th>Attributes</th>
+
+
+
+
+ <th class="last">Description</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+ <tr>
+
+ <td class="name"><code>value</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">*</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Value to set</p></td>
+ </tr>
+
+
+
+ <tr>
+
+ <td class="name"><code>noAssert</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">boolean</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+ <optional><br>
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Whether to not assert the value, defaults to <code>false</code></p></td>
+ </tr>
+
+
+ </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2611">line 2611</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+<h5>Throws:</h5>
+
+
+
+<dl>
+ <dt>
+ <div class="param-desc">
+ <p>If the value cannot be set</p>
+ </div>
+ </dt>
+ <dd></dd>
+ <dt>
+ <dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Error</span>
+
+
+ </dd>
+ </dl>
+ </dt>
+ <dd></dd>
+</dl>
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>this</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type"><a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a></span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="toArrayBuffer"><span class="type-signature"></span>toArrayBuffer<span class="signature">()</span><span class="type-signature"> → {ArrayBuffer}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Returns the message as an ArrayBuffer. This is an alias for <a href="ProtoBuf.Builder.Message.html#encodeAB">ProtoBuf.Builder.Message#encodeAB</a>.</p>
+</div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2748">line 2748</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+<h5>Throws:</h5>
+
+
+
+<dl>
+ <dt>
+ <div class="param-desc">
+ <p>If the message cannot be encoded or if required fields are missing. The later still
+ returns the encoded ArrayBuffer in the <code>encoded</code> property on the error.</p>
+ </div>
+ </dt>
+ <dd></dd>
+ <dt>
+ <dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Error</span>
+
+
+ </dd>
+ </dl>
+ </dt>
+ <dd></dd>
+</dl>
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>Encoded message as ArrayBuffer</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">ArrayBuffer</span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="toBase64"><span class="type-signature"></span>toBase64<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Returns the message as a base64 encoded string. This is an alias for <a href="ProtoBuf.Builder.Message.html#encode64">ProtoBuf.Builder.Message#encode64</a>.</p>
+</div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2806">line 2806</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+<h5>Throws:</h5>
+
+
+
+<dl>
+ <dt>
+ <div class="param-desc">
+ <p>If the message cannot be encoded or if required fields are missing. The later still
+ returns the encoded base64 string in the <code>encoded</code> property on the error.</p>
+ </div>
+ </dt>
+ <dd></dd>
+ <dt>
+ <dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Error</span>
+
+
+ </dd>
+ </dl>
+ </dt>
+ <dd></dd>
+</dl>
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>Base64 encoded string</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">string</span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="toBuffer"><span class="type-signature"></span>toBuffer<span class="signature">()</span><span class="type-signature"> → (non-null) {Buffer}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Returns the message as a node Buffer. This is an alias for <a href="ProtoBuf.Builder.Message.html#encodeNB">ProtoBuf.Builder.Message#encodeNB</a>.</p>
+</div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2777">line 2777</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+<h5>Throws:</h5>
+
+
+
+<dl>
+ <dt>
+ <div class="param-desc">
+ <p>If the message cannot be encoded or if required fields are missing. The later still
+ returns the encoded node Buffer in the <code>encoded</code> property on the error.</p>
+ </div>
+ </dt>
+ <dd></dd>
+ <dt>
+ <dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Error</span>
+
+
+ </dd>
+ </dl>
+ </dt>
+ <dd></dd>
+</dl>
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Buffer</span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="toHex"><span class="type-signature"></span>toHex<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Returns the message as a hex encoded string. This is an alias for <a href="ProtoBuf.Builder.Message.html#encodeHex">ProtoBuf.Builder.Message#encodeHex</a>.</p>
+</div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2835">line 2835</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+<h5>Throws:</h5>
+
+
+
+<dl>
+ <dt>
+ <div class="param-desc">
+ <p>If the message cannot be encoded or if required fields are missing. The later still
+ returns the encoded hex string in the <code>encoded</code> property on the error.</p>
+ </div>
+ </dt>
+ <dd></dd>
+ <dt>
+ <dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Error</span>
+
+
+ </dd>
+ </dl>
+ </dt>
+ <dd></dd>
+</dl>
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>Hex encoded string</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">string</span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="toRaw"><span class="type-signature"></span>toRaw<span class="signature">(binaryAsBase64<span class="signature-attributes">opt</span>, longsAsStrings)</span><span class="type-signature"> → {Object.<string, *>}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Returns the message's raw payload.</p>
+</div>
+
+
+
+
+
+
+
+
+
+ <h5>Parameters:</h5>
+
+
+<table class="params">
+ <thead>
+ <tr>
+
+ <th>Name</th>
+
+
+ <th>Type</th>
+
+
+ <th>Attributes</th>
+
+
+
+
+ <th class="last">Description</th>
+ </tr>
+ </thead>
+
+ <tbody>
+
+
+ <tr>
+
+ <td class="name"><code>binaryAsBase64</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">boolean</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+ <optional><br>
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Whether to include binary data as base64 strings instead of Buffers, defaults to <code>false</code></p></td>
+ </tr>
+
+
+
+ <tr>
+
+ <td class="name"><code>longsAsStrings</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">boolean</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last"><p>Whether to encode longs as strings</p></td>
+ </tr>
+
+
+ </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2909">line 2909</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>Raw payload</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Object.<string, *></span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="toString"><span class="type-signature"></span>toString<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>
+
+
+
+
+
+<div class="description">
+ <p>Returns a string representation of this Message.</p>
+</div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dt class="tag-source">Source:</dt>
+ <dd class="tag-source"><ul class="dummy"><li>
+ <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line3039">line 3039</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ <p>String representation as of ".Fully.Qualified.MessageName"</p>
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">string</span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+</article>
+
+</section>
+
+
+
+
+</div>
+
+<nav>
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ProtoBuf.Builder.html">Builder</a></li><li><a href="ProtoBuf.Builder.Message.html">Message</a></li><li><a href="ProtoBuf.Builder.Service.html">Service</a></li><li><a href="ProtoBuf.DotProto.Parser.html">Parser</a></li><li><a href="ProtoBuf.DotProto.Tokenizer.html">Tokenizer</a></li><li><a href="ProtoBuf.Map.html">Map</a></li><li><a href="ProtoBuf.Reflect.Element.html">Element</a></li><li><a href="ProtoBuf.Reflect.Enum.html">Enum</a></li><li><a href="ProtoBuf.Reflect.Enum.Value.html">Value</a></li><li><a href="ProtoBuf.Reflect.Extension.html">Extension</a></li><li><a href="ProtoBuf.Reflect.Message.html">Message</a></li><li><a href="ProtoBuf.Reflect.Message.ExtensionField.html">ExtensionField</a></li><li><a href="ProtoBuf.Reflect.Message.Field.html">Field</a></li><li><a href="ProtoBuf.Reflect.Message.OneOf.html">OneOf</a></li><li><a href="ProtoBuf.Reflect.Namespace.html">Namespace</a></li><li><a href="ProtoBuf.Reflect.Service.html">Service</a></li><li><a href="ProtoBuf.Reflect.Service.Method.html">Method</a></li><li><a href="ProtoBuf.Reflect.Service.RPCMethod.html">RPCMethod</a></li><li><a href="ProtoBuf.Reflect.T.html">T</a></li></ul><h3>Namespaces</h3><ul><li><a href="ProtoBuf.html">ProtoBuf</a></li><li><a href="ProtoBuf.DotProto.html">DotProto</a></li><li><a href="ProtoBuf.Reflect.html">Reflect</a></li><li><a href="ProtoBuf.Util.html">Util</a></li></ul>
+</nav>
+
+<br class="clear">
+
+<footer>
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.3</a> on Fri Jan 27 2017 17:03:55 GMT+0100 (Mitteleuropäische Zeit)
+</footer>
+
+<script> prettyPrint(); </script>
+<script src="scripts/linenumber.js"> </script>
+</body>
+</html>
\ No newline at end of file