Holds a reference to parent message for chaining API
Contains all fields ever added to the message.
Add an item to the end of array at given key with type check
Array key
Newly added value
Newly added item type
this
Add an item to the end of array at given key with type check
Array key
Newly added value
Newly added item type
this
Add an item to the end of array at given key with type check
Array key
Newly added value
Newly added item type
this
Add an item to the end of array at given key with type check
Array key
Newly added value
Newly added item type
this
Add an item to the end of array at given key with type check
Array key
Newly added value
Newly added item type
this
Add an item to the end of array at given key with type check
Array key
Newly added value
Newly added item type
this
Add an item to the end of array at given key with type check
Array key
Newly added value
Newly added item type
this
Add an item to the end of array at given key without type check
Array key
Newly added value
this
Get an array of fields with given key
Key of items to be added into result
Expected type of items in array
Get an array of fields with given key
Key of items to be added into result
Expected type of items in array
Get an array of fields with given key
Key of items to be added into result
Expected type of items in array
Get an array of fields with given key
Key of items to be added into result
Expected type of items in array
Get an array of fields with given key
Key of items to be added into result
Expected type of items in array
Get an array of fields with given key
Key of items to be added into result
Expected type of items in array
Get an array of fields with given key
Key of items to be added into result
Expected type of items in array (if not passed type checking is skipped)
Adds a bool field to resulting message with key key
and optional index
Key of newly added field
Value of newly added field
Index in array of newly added field.
this
Adds a bytes field to resulting message with key key
and optional index
Key of newly added field
Value of newly added field
Index in array of newly added field.
this
Clears whole message removing all fields ever added to it
this
Removes message's fields with given key
Message key to be cleared
this
Removes message's field with given key and index
Message key
Key index to be removed
this
Adds a double field to resulting message with key key
and optional index
Key of newly added field
Value of newly added field
Index in array of newly added field.
this
Edit am existing sub-message field in the resulting message with key key
and optional index.
Returns that message, parent can be referenced using .parent()
.
Use this instead of get when using OutputMessage.toInput
Key of the message field
Index of newly message field
message to be edited
Edit am existing sub-message field in the resulting message with key key
and optional index.
Returns that message, parent can be referenced using .parent()
.
Use this instead of get when using OutputMessage.toInput
Key of the message field
Callback function for the message
Index of newly message field
Similarly to InputMessage.parent, returns parent message Throws error when message is root.
parent message
Adds a fixed32 field to resulting message with key key
and optional index
Key of newly added field
Value of newly added field
Index in array of newly added field.
this
Adds a fixed64 field to resulting message with key key
and optional index
Key of newly added field
Value of newly added field
Index in array of newly added field.
this
Adds a float field to resulting message with key key
and optional index
Key of newly added field
Value of newly added field
Index in array of newly added field.
this
Get a field value by key and optionally index
Field key
Field value
Get a field value by key, type and optionally index
Field key
Field type
Field value
Get a field value by key, type and optionally index
Field key
Field type
Field value
Get a field value by key, type and optionally index
Field key
Field type
Field value
Get a field value by key, type and optionally index
Field key
Field type
Field value
Get a field value by key, type and optionally index
Field key
Field type
Field value
Get a field value by key, type and optionally index
Field key
Field type
Field value
Get a field value by key, type and optionally index
Field key
Field type
Field value
Adds a int32 field to resulting message with key key
and optional index
Key of newly added field
Value of newly added field
Index in array of newly added field.
this
Adds a int64 field to resulting message with key key
and optional index
Key of newly added field
Value of newly added field
Index in array of newly added field.
this
Get an iterator of fields with given key
Key of items to be iterated over
Whether to return items by reference
Expected type of iterables
Get an iterator of fields with given key
Key of items to be iterated over
Whether to return items by reference
Expected type of iterables
Get an iterator of fields with given key
Key of items to be iterated over
Whether to return items by reference
Expected type of iterables
Get an iterator of fields with given key
Key of items to be iterated over
Whether to return items by reference
Expected type of iterables
Get an iterator of fields with given key
Key of items to be iterated over
Whether to return items by reference
Expected type of iterables
Get an iterator of fields with given key
Key of items to be iterated over
Whether to return items by reference
Expected type of iterables
Get an iterator of fields with given key
Key of items to be iterated over
Whether to return items by reference
Expected type of iterables (if not passed type checking is skipped)
Get an iterator of fields with given key
Key of items to be iterated over
Whether to return items by reference
Expected type of iterables
Get an iterator of fields with given key
Key of items to be iterated over
Whether to return items by reference
Expected type of iterables
Get an iterator of fields with given key
Key of items to be iterated over
Whether to return items by reference
Expected type of iterables
Get an iterator of fields with given key
Key of items to be iterated over
Whether to return items by reference
Expected type of iterables
Get an iterator of fields with given key
Key of items to be iterated over
Whether to return items by reference
Expected type of iterables
Get an iterator of fields with given key
Key of items to be iterated over
Whether to return items by reference
Expected type of iterables
Get an iterator of fields with given key
Key of items to be iterated over
Whether to return items by reference
Expected type of iterables (if not passed type checking is skipped)
Whether to keep default values in the wire (0 for ints, empty for messages/bytes/strings).
Defaults to false
, to minimize resulting length.
Adds a sub-message field to resulting message with key key
and optional index.
Returns newly created message, parent can be referenced using .parent()
Key of newly added message
Index of newly added message
newly created message
Adds a sub-message field to resulting message with key key
and optional index.
Calls callback
with the message to allow you to populate it
Key of newly added message
Callback function for the new message
Index of newly added message
Get message's parent.
parent message or null if current message is root.
Serialize InputMessage to array of bytes, alias to InputMessage.toWire
Adds a sfixed32 field to resulting message with key key
and optional index
Key of newly added field
Value of newly added field
Index in array of newly added field.
this
Adds a sfixed64 field to resulting message with key key
and optional index
Key of newly added field
Value of newly added field
Index in array of newly added field.
this
Adds a sint32 field to resulting message with key key
and optional index
Key of newly added field
Value of newly added field
Index in array of newly added field.
this
Adds a sint64 field to resulting message with key key
and optional index
Key of newly added field
Value of newly added field
Index in array of newly added field.
this
Adds a string field to resulting message with key key
and optional index
Key of newly added field
Value of newly added field
Index in array of newly added field.
this
Serialize InputMessage to ArrayBuffer
Serialize InputMessage to Buffer
Serialize InputMessage to hexadecimal string
Converts InputMessage to JSON API compatible representation.
Serialize InputMessage to Uint8Array
Serialize InputMessage to array of bytes
Adds a uint32 field to resulting message with key key
and optional index
Key of newly added field
Value of newly added field
Index in array of newly added field.
this
Adds a uint64 field to resulting message with key key
and optional index
Key of newly added field
Value of newly added field
Index in array of newly added field.
this
By default, all packable fields (varints and fixed32/64) in resulting stream will be packed as seen here. To provide backwards-compatibility with proto2, some fields can be explicitly declared unpacked.
Field keys. Varargs accepting either numbers or a number array.
this
Generated using TypeDoc
Represents a single message that was created by Protoflex and can be serialized to wire.