goog.proto2.Descriptor
Classgoog.proto2.Descriptor(messageType, metadata, fields)
A class which describes a Protocol Buffer 2 Message.
messageType
{function
(new
:goog.proto2.Message
)}
metadata
{!goog.proto2.Metadata
}
fields
{Array
.<!goog.proto2.FieldDescriptor
>}
.createMessageInstance()
Creates an instance of the message type that this descriptor describes.
goog.proto2.Message
}
.findFieldByName(name)
Returns the field matching the given name, if any. Note that this method searches over the *original* name of the field, not the camelCase version.
name
{string
}
goog.proto2.FieldDescriptor
}
.findFieldByTag(tag)
Returns the field matching the given tag number, if any.
tag
{number
|string
}
goog.proto2.FieldDescriptor
}
.getContainingType()
Returns the descriptor of the containing message type or null if none.
goog.proto2.Descriptor
}
.getFields()
Returns the fields in the message described by this descriptor ordered by tag.
Array
.<!goog.proto2.FieldDescriptor
>}
.getFieldsMap()
Returns the fields in the message as a key/value map, where the key is the tag number of the field. DO NOT MODIFY THE RETURNED OBJECT. We return the actual, internal, fields map for performance reasons, and changing the map can result in undefined behavior of this library.
Object
.<number
, !goog.proto2.FieldDescriptor
>}
.getFullName()
Returns the full name of the message, if any.
string
}
.getName()
Returns the name of the message, if any.
string
}