Optional[customOptional[unknownSubfield path in the message, for example metadata.parent_id or metadata.name.
Must be a valid SelectMask.
May match several fields, if necessary. For example, some.*.subfield or
some.(subfield,another_field).
OptionalisMark a field as required, even if it is not required in the message it contains. Unlike cel expressions, this setting can be reflected in tools documentation and help messages.
OptionalnidFor fields annotated with this option, values are treated as NIDs and warnings are emitted when they are not valid. These warnings are separate from server-side validation.
SubfieldSettings describes overrides for some settings for subfields of a field. Overrides are applied to fields in order of appearance, so the first matching override is applied, and the rest are ignored.
Example:
In this example,
field1inMyMessage2is required, even if it is not required inMyMessage. The following example will override the setting again:In this example,
field1inMyMessage2is not required for theMyMethod, even if it is required inMyMessage2.