Unified resource types

Rules for AIP-123, covering unified resource types.

Rule name Description
duplicate-resource Resource types should not be defined more than once.
name-never-optional Resource name fields must never be labeled with proto3_optional.
resource-annotation Resource messages should be annotated with `google.api.resource`.
resource-definition-pattern Resource annotations should define a pattern.
resource-definition-type-name Resource type names must be of the form {Service Name}/{Type}.
resource-definition-variables Resource patterns should use consistent variable naming.
resource-name-components-alternate Resource name components should alternate between collection and identifiers.
resource-name-field Resource messages should have a `string name` field.
resource-pattern Resource annotations should define a pattern.
resource-plural Resource plural is required
resource-reference-type Resource reference annotations should only apply to strings.
resource-singular Resource singular is required and must be lowerCamelCase of type
resource-type-name Resource type names must be of the form {Service Name}/{Type}.
resource-variables Resource patterns should use consistent variable naming.

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