Skip to main content

Class: StringValue

google.protobuf.StringValue

Represents a StringValue.

Implements#

Constructors#

constructor#

new StringValue(properties?)

Constructs a new StringValue.

Parameters#

NameType
properties?IStringValue

Properties#

value#

value: string

StringValue value.

Implementation of#

IStringValue.value

Methods#

toJSON#

toJSON(): Object

Converts this StringValue to JSON.

Returns#

Object

JSON object


decode#

Static decode(reader, length?): StringValue

Decodes a StringValue 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#

StringValue

StringValue


decodeDelimited#

Static decodeDelimited(reader): StringValue

Decodes a StringValue 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#

StringValue

StringValue


encode#

Static encode(message, writer?): Writer

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

Parameters#

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

Returns#

Writer

Writer


encodeDelimited#

Static encodeDelimited(message, writer?): Writer

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

Parameters#

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

Returns#

Writer

Writer


fromObject#

Static fromObject(object): StringValue

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

Parameters#

NameTypeDescription
objectObjectPlain object

Returns#

StringValue

StringValue


toObject#

Static toObject(message, options?): Object

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

Parameters#

NameTypeDescription
messageStringValueStringValue
options?IConversionOptions-

Returns#

Object

Plain object