Skip to main content

Class: BytesValue

google.protobuf.BytesValue

Represents a BytesValue.

Implements#

Constructors#

constructor#

new BytesValue(properties?)

Constructs a new BytesValue.

Parameters#

NameType
properties?IBytesValue

Properties#

value#

value: Uint8Array

BytesValue value.

Implementation of#

IBytesValue.value

Methods#

toJSON#

toJSON(): Object

Converts this BytesValue to JSON.

Returns#

Object

JSON object


decode#

Static decode(reader, length?): BytesValue

Decodes a BytesValue message from the specified reader or buffer.

throws {Error} If the payload is not a reader or valid buffer

throws {$protobuf.util.ProtocolError} If required fields are missing

Parameters#

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?number-

Returns#

BytesValue

BytesValue


decodeDelimited#

Static decodeDelimited(reader): BytesValue

Decodes a BytesValue message from the specified reader or buffer, length delimited.

throws {Error} If the payload is not a reader or valid buffer

throws {$protobuf.util.ProtocolError} If required fields are missing

Parameters#

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns#

BytesValue

BytesValue


encode#

Static encode(message, writer?): Writer

Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages.

Parameters#

NameTypeDescription
messageIBytesValueBytesValue message or plain object to encode
writer?Writer-

Returns#

Writer

Writer


encodeDelimited#

Static encodeDelimited(message, writer?): Writer

Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages.

Parameters#

NameTypeDescription
messageIBytesValueBytesValue message or plain object to encode
writer?Writer-

Returns#

Writer

Writer


fromObject#

Static fromObject(object): BytesValue

Creates a BytesValue message from a plain object. Also converts values to their respective internal types.

Parameters#

NameTypeDescription
objectObjectPlain object

Returns#

BytesValue

BytesValue


toObject#

Static toObject(message, options?): Object

Creates a plain object from a BytesValue message. Also converts values to other types if specified.

Parameters#

NameTypeDescription
messageBytesValueBytesValue
options?IConversionOptions-

Returns#

Object

Plain object