Skip to main content

Class: Value

google.protobuf.Value

Represents a Value.

Properties

boolValue

Optional boolValue: null | boolean

Value boolValue.


kind

Optional kind: "nullValue" | "numberValue" | "stringValue" | "boolValue" | "structValue" | "listValue"

Value kind.


listValue

Optional listValue: null | $Properties

Value listValue.


nullValue

Optional nullValue: null | NULL_VALUE

Value nullValue.


numberValue

Optional numberValue: null | number

Value numberValue.


stringValue

Optional stringValue: null | string

Value stringValue.


structValue

Optional structValue: null | $Properties

Value structValue.

Methods

toJSON

toJSON(): Object

Converts this Value to JSON.

Returns

Object

JSON object


create

create(properties?): Value & $Shape

Creates a new Value instance using the specified properties.

Parameters

NameTypeDescription
properties?$ShapeProperties to set

Returns

Value & $Shape

Value instance

create(properties?): Value

Parameters

NameType
properties?$Properties

Returns

Value


decode

decode(reader, length?): Value & $Shape

Decodes a Value message from the specified reader or buffer.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?numberMessage length if known beforehand

Returns

Value & $Shape

Value

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): Value & $Shape

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

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

Value & $Shape

Value

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


encode

encode(message, writer?): Writer

Encodes the specified Value message. Does not implicitly google.protobuf.Value.verify|verify messages.

Parameters

NameTypeDescription
message$PropertiesValue message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

Encodes the specified Value message, length delimited. Does not implicitly google.protobuf.Value.verify|verify messages.

Parameters

NameTypeDescription
message$PropertiesValue message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

fromObject(object): Value

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

Parameters

NameTypeDescription
objectObjectPlain object

Returns

Value

Value


toObject

toObject(message, options?): Object

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

Parameters

NameTypeDescription
messageValueValue
options?IConversionOptionsConversion options

Returns

Object

Plain object