Skip to main content

Class: FieldOptions

google.protobuf.FieldOptions

Represents a FieldOptions.

Implements#

Constructors#

constructor#

new FieldOptions(properties?)

Constructs a new FieldOptions.

Parameters#

NameType
properties?IFieldOptions

Properties#

ctype#

ctype: CType

FieldOptions ctype.

Implementation of#

IFieldOptions.ctype


deprecated#

deprecated: boolean

FieldOptions deprecated.

Implementation of#

IFieldOptions.deprecated


jstype#

jstype: JSType

FieldOptions jstype.

Implementation of#

IFieldOptions.jstype


lazy#

lazy: boolean

FieldOptions lazy.

Implementation of#

IFieldOptions.lazy


packed#

packed: boolean

FieldOptions packed.

Implementation of#

IFieldOptions.packed


uninterpretedOption#

uninterpretedOption: IUninterpretedOption[]

FieldOptions uninterpretedOption.

Implementation of#

IFieldOptions.uninterpretedOption


weak#

weak: boolean

FieldOptions weak.

Implementation of#

IFieldOptions.weak

Methods#

toJSON#

toJSON(): Object

Converts this FieldOptions to JSON.

Returns#

Object

JSON object


decode#

Static decode(reader, length?): FieldOptions

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

FieldOptions

FieldOptions


decodeDelimited#

Static decodeDelimited(reader): FieldOptions

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

FieldOptions

FieldOptions


encode#

Static encode(message, writer?): Writer

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

Parameters#

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

Returns#

Writer

Writer


encodeDelimited#

Static encodeDelimited(message, writer?): Writer

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

Parameters#

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

Returns#

Writer

Writer


fromObject#

Static fromObject(object): FieldOptions

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

Parameters#

NameTypeDescription
objectObjectPlain object

Returns#

FieldOptions

FieldOptions


toObject#

Static toObject(message, options?): Object

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

Parameters#

NameTypeDescription
messageFieldOptionsFieldOptions
options?IConversionOptions-

Returns#

Object

Plain object