Field behavior

Rules for AIP-203, covering field behavior.

Rule name Description
field-behavior-required Field behavior is required, and must have one of OUTPUT_ONLY, REQUIRED, or OPTIONAL.
immutable Immutable fields should be annotated.
input-only Input only fields should be annotated.
optional Optional fields may be annotated.
optional-conflict Optional fields must not have any other field behavior.
output-only Output only fields should be annotated.
required Required fields should be annotated.
required-and-optional Required fields must not use the optional keyword.
unordered-list-repeated Only repeated fields may be annotated with `UNORDERED_LIST`.

Note: Because AIPs sometimes cover topics that have some overlap, some rules related to field behavior may be included in the rules for other AIPs.