Skip to main content

Class: FloatValue

google.protobuf.FloatValue

Represents a FloatValue.

Implements

Constructors

constructor

new FloatValue(properties?)

Constructs a new FloatValue.

Parameters

NameTypeDescription
properties?IFloatValueProperties to set

Properties

value

value: number

FloatValue value.

Implementation of

IFloatValue.value

Methods

toJSON

toJSON(): Object

Converts this FloatValue to JSON.

Returns

Object

JSON object


create

Static create(properties?): FloatValue

Creates a new FloatValue instance using the specified properties.

Parameters

NameTypeDescription
properties?IFloatValueProperties to set

Returns

FloatValue

FloatValue instance


decode

Static decode(reader, length?): FloatValue

Decodes a FloatValue message from the specified reader or buffer.

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing

Parameters

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

Returns

FloatValue

FloatValue


decodeDelimited

Static decodeDelimited(reader): FloatValue

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

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

FloatValue

FloatValue


encode

Static encode(message, writer?): Writer

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

Parameters

NameTypeDescription
messageIFloatValueFloatValue message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


encodeDelimited

Static encodeDelimited(message, writer?): Writer

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

Parameters

NameTypeDescription
messageIFloatValueFloatValue message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

Static fromObject(object): FloatValue

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

Parameters

NameTypeDescription
objectObjectPlain object

Returns

FloatValue

FloatValue


getTypeUrl

Static getTypeUrl(typeUrlPrefix?): string

Gets the default type url for FloatValue

Parameters

NameTypeDescription
typeUrlPrefix?stringyour custom typeUrlPrefix(default "type.googleapis.com")

Returns

string

The default type url


toObject

Static toObject(message, options?): Object

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

Parameters

NameTypeDescription
messageFloatValueFloatValue
options?IConversionOptionsConversion options

Returns

Object

Plain object