FieldDescriptorProto

google.protobuf. FieldDescriptorProto

Represents a FieldDescriptorProto.

Constructor

new FieldDescriptorProto(propertiesopt)

Constructs a new FieldDescriptorProto.

Parameters:
Name Type Attributes Description
properties google.protobuf.IFieldDescriptorProto <optional>

Properties to set

Implements:
  • IFieldDescriptorProto

Members

(static) Label :number

Label enum.

Properties:
Name Type Description
LABEL_OPTIONAL number

LABEL_OPTIONAL value

LABEL_REQUIRED number

LABEL_REQUIRED value

LABEL_REPEATED number

LABEL_REPEATED value

(static) Type :number

Type enum.

Properties:
Name Type Description
TYPE_DOUBLE number

TYPE_DOUBLE value

TYPE_FLOAT number

TYPE_FLOAT value

TYPE_INT64 number

TYPE_INT64 value

TYPE_UINT64 number

TYPE_UINT64 value

TYPE_INT32 number

TYPE_INT32 value

TYPE_FIXED64 number

TYPE_FIXED64 value

TYPE_FIXED32 number

TYPE_FIXED32 value

TYPE_BOOL number

TYPE_BOOL value

TYPE_STRING number

TYPE_STRING value

TYPE_GROUP number

TYPE_GROUP value

TYPE_MESSAGE number

TYPE_MESSAGE value

TYPE_BYTES number

TYPE_BYTES value

TYPE_UINT32 number

TYPE_UINT32 value

TYPE_ENUM number

TYPE_ENUM value

TYPE_SFIXED32 number

TYPE_SFIXED32 value

TYPE_SFIXED64 number

TYPE_SFIXED64 value

TYPE_SINT32 number

TYPE_SINT32 value

TYPE_SINT64 number

TYPE_SINT64 value

defaultValue :string

FieldDescriptorProto defaultValue.

extendee :string

FieldDescriptorProto extendee.

jsonName :string

FieldDescriptorProto jsonName.

label :google.protobuf.FieldDescriptorProto.Label

FieldDescriptorProto label.

name :string

FieldDescriptorProto name.

number :number

FieldDescriptorProto number.

oneofIndex :number

FieldDescriptorProto oneofIndex.

options :google.protobuf.IFieldOptions|null|undefined

FieldDescriptorProto options.

type :google.protobuf.FieldDescriptorProto.Type

FieldDescriptorProto type.

typeName :string

FieldDescriptorProto typeName.

Methods

(static) create(propertiesopt) → {google.protobuf.FieldDescriptorProto}

Creates a new FieldDescriptorProto instance using the specified properties.

Parameters:
Name Type Attributes Description
properties google.protobuf.IFieldDescriptorProto <optional>

Properties to set

(static) decode(reader, lengthopt) → {google.protobuf.FieldDescriptorProto}

Decodes a FieldDescriptorProto message from the specified reader or buffer.

Parameters:
Name Type Attributes Description
reader $protobuf.Reader | Uint8Array

Reader or buffer to decode from

length number <optional>

Message length if known beforehand

Throws:
  • If the payload is not a reader or valid buffer

    Type
    Error
  • If required fields are missing

    Type
    $protobuf.util.ProtocolError

(static) decodeDelimited(reader) → {google.protobuf.FieldDescriptorProto}

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

Parameters:
Name Type Description
reader $protobuf.Reader | Uint8Array

Reader or buffer to decode from

Throws:
  • If the payload is not a reader or valid buffer

    Type
    Error
  • If required fields are missing

    Type
    $protobuf.util.ProtocolError

(static) encode(message, writeropt) → {$protobuf.Writer}

Encodes the specified FieldDescriptorProto message. Does not implicitly verify messages.

Parameters:
Name Type Attributes Description
message google.protobuf.IFieldDescriptorProto

FieldDescriptorProto message or plain object to encode

writer $protobuf.Writer <optional>

Writer to encode to

(static) encodeDelimited(message, writeropt) → {$protobuf.Writer}

Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly verify messages.

Parameters:
Name Type Attributes Description
message google.protobuf.IFieldDescriptorProto

FieldDescriptorProto message or plain object to encode

writer $protobuf.Writer <optional>

Writer to encode to

(static) fromObject(object) → {google.protobuf.FieldDescriptorProto}

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

Parameters:
Name Type Description
object Object.<string, *>

Plain object

(static) toObject(message, optionsopt) → {Object.<string, *>}

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

Parameters:
Name Type Attributes Description
message google.protobuf.FieldDescriptorProto

FieldDescriptorProto

options $protobuf.IConversionOptions <optional>

Conversion options

(static) verify(message) → {string|null}

Verifies a FieldDescriptorProto message.

Parameters:
Name Type Description
message Object.<string, *>

Plain object to verify

toJSON() → {Object.<string, *>}

Converts this FieldDescriptorProto to JSON.