mapEntry property

  1. @TagNumber(7)
bool mapEntry

Whether the message is an automatically generated map entry type for the maps field.

For maps fields: map<KeyType, ValueType> map_field = 1; The parsed descriptor looks like: message MapFieldEntry { option map_entry = true; optional KeyType key = 1; optional ValueType value = 2; } repeated MapFieldEntry map_field = 1;

Implementations may choose not to generate the map_entry=true message, but use a native map in the target language to hold the keys and values. The reflection APIs in such implementations still need to work as if the field is a repeated message field.

NOTE: Do not set the option in .proto files. Always use the maps syntax instead. The option should only be implicitly set by the proto compiler parser.

Implementation

@$pb.TagNumber(7)
$core.bool get mapEntry => $_getBF(3);
  1. @TagNumber(7)
void mapEntry=(bool v)

Implementation

@$pb.TagNumber(7)
set mapEntry($core.bool v) { $_setBool(3, v); }