Class: OneofDescriptorProto
google.protobuf.OneofDescriptorProto
Describes a oneof.
Properties
name
• name: string
OneofDescriptorProto name.
options
• Optional options: null | $Properties
OneofDescriptorProto options.
Methods
toJSON
▸ toJSON(): Object
Converts this OneofDescriptorProto to JSON.
Returns
Object
JSON object
create
▸ create(properties?): OneofDescriptorProto & $Properties
Creates a new OneofDescriptorProto instance using the specified properties.
Parameters
| Name | Type | Description |
|---|---|---|
properties? | $Properties | Properties to set |
Returns
OneofDescriptorProto & $Properties
OneofDescriptorProto instance
▸ create(properties?): OneofDescriptorProto
Parameters
| Name | Type |
|---|---|
properties? | $Properties |
Returns
decode
▸ decode(reader, length?): OneofDescriptorProto & $Properties
Decodes a OneofDescriptorProto message from the specified reader or buffer.
Parameters
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
length? | number | Message length if known beforehand |
Returns
OneofDescriptorProto & $Properties
OneofDescriptorProto
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited
▸ decodeDelimited(reader): OneofDescriptorProto & $Properties
Decodes a OneofDescriptorProto message from the specified reader or buffer, length delimited.
Parameters
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
OneofDescriptorProto & $Properties
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
| Name | Type | Description |
|---|---|---|
message | $Properties | OneofDescriptorProto message or plain object to encode |
writer? | Writer | Writer 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
| Name | Type | Description |
|---|---|---|
message | $Properties | OneofDescriptorProto message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
fromObject
▸ fromObject(object): OneofDescriptorProto
Creates a OneofDescriptorProto message from a plain object. Also converts values to their respective internal types.
Parameters
| Name | Type | Description |
|---|---|---|
object | Object | Plain object |
Returns
OneofDescriptorProto