Skip to main content

Class: OneofDescriptorProto

google.protobuf.OneofDescriptorProto

Represents an OneofDescriptorProto.

Implements

Constructors

constructor

new OneofDescriptorProto(properties?): OneofDescriptorProto

Constructs a new OneofDescriptorProto.

Parameters

NameTypeDescription
properties?IOneofDescriptorProtoProperties to set

Returns

OneofDescriptorProto

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


create

create(properties?): OneofDescriptorProto

Creates a new OneofDescriptorProto instance using the specified properties.

Parameters

NameTypeDescription
properties?IOneofDescriptorProtoProperties to set

Returns

OneofDescriptorProto

OneofDescriptorProto instance


decode

decode(reader, length?): OneofDescriptorProto

Decodes an OneofDescriptorProto message from the specified reader or buffer.

Parameters

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

Returns

OneofDescriptorProto

OneofDescriptorProto

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): OneofDescriptorProto

Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

OneofDescriptorProto

OneofDescriptorProto

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 OneofDescriptorProto message. Does not implicitly google.protobuf.OneofDescriptorProto.verify|verify messages.

Parameters

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

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

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

Parameters

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

Returns

Writer

Writer


fromObject

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


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for OneofDescriptorProto

Parameters

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

Returns

string

The default type url


toObject

toObject(message, options?): Object

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

Parameters

NameTypeDescription
messageOneofDescriptorProtoOneofDescriptorProto
options?IConversionOptionsConversion options

Returns

Object

Plain object