Skip to main content

Class: OneofDescriptorProto

google.protobuf.OneofDescriptorProto

Represents an OneofDescriptorProto.

Implements#

Constructors#

constructor#

new OneofDescriptorProto(properties?)

Constructs a new OneofDescriptorProto.

Parameters#

NameType
properties?IOneofDescriptorProto

Properties#

name#

name: string

OneofDescriptorProto name.

Implementation of#

IOneofDescriptorProto.name


options#

Optional options: null | IOneofOptions

OneofDescriptorProto options.

Implementation of#

IOneofDescriptorProto.options

Methods#

toJSON#

toJSON(): Object

Converts this OneofDescriptorProto to JSON.

Returns#

Object

JSON object


decode#

Static decode(reader, length?): OneofDescriptorProto

Decodes an OneofDescriptorProto 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#

OneofDescriptorProto

OneofDescriptorProto


decodeDelimited#

Static decodeDelimited(reader): OneofDescriptorProto

Decodes an OneofDescriptorProto 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#

OneofDescriptorProto

OneofDescriptorProto


encode#

Static encode(message, writer?): Writer

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

Parameters#

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

Returns#

Writer

Writer


encodeDelimited#

Static encodeDelimited(message, writer?): Writer

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

Parameters#

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

Returns#

Writer

Writer


fromObject#

Static fromObject(object): OneofDescriptorProto

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

Parameters#

NameTypeDescription
objectObjectPlain object

Returns#

OneofDescriptorProto

OneofDescriptorProto


toObject#

Static toObject(message, options?): Object

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

Parameters#

NameTypeDescription
messageOneofDescriptorProtoOneofDescriptorProto
options?IConversionOptions-

Returns#

Object

Plain object