...
Attribute | Description | Required |
---|---|---|
ref | The name of the referenced field. Name may be with or without the namespace of owner model (i.e. full-qualified name). In both cases, field will be looked up in both current model and its imports. If non-fully-qualified name is declared in current model and in one of imports, the field from current model will take precedence. If multiple imports define the same name, an error will be reported. The best practice when importing a field from another model is to use the fully qualified name of the imported field (e.g. com.example.importedmodel.someField), as this insulates your model from future conflicts in the event that imported models are changed. | ![]() |
name | Optionally, a name for the field that overrides the referenced field's name. Otherwise the field name defaults to that of the referenced field. | |
jsonName | Optionally overrides the referenced field's jsonName. | |
id | Optionally overrides the id specified by the field being referenced. Field ids must be between 0 and 32767 inclusive | |
required | Whether or not the field is a required field for the type. Fields declared as required will cause a check to be added for the value being set in the generated types isValid() method. | |
pinned | Indicates whether or not the field is pinned. A pinned field always occupies the same space on the wire. | |
isKey | True if this field should serve as the key when inserting the entity into a LongMap or StringMap collection. In this case, insertion of the message in the collection with a given key will update this field with the key value. | |
doc | The doc to use for the field which overrides that specified by the referenced field. | |
deprecated | When true all methods generated for the field will marked as deprecated. |
...