Skip to content

Commit f5987af

Browse files
Google APIscopybara-github
authored andcommitted
feat: add new FieldBehavior value IDENTIFIER
PiperOrigin-RevId: 559119958
1 parent 1c4f24e commit f5987af

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

google/api/field_behavior.proto

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,18 @@ enum FieldBehavior {
8787
// a non-empty value will be returned. The user will not be aware of what
8888
// non-empty value to expect.
8989
NON_EMPTY_DEFAULT = 7;
90+
91+
// Denotes that the field in a resource (a message annotated with
92+
// google.api.resource) is used in the resource name to uniquely identify the
93+
// resource. For AIP-compliant APIs, this should only be applied to the
94+
// `name` field on the resource.
95+
//
96+
// This behavior should not be applied to references to other resources within
97+
// the message.
98+
//
99+
// The identifier field of resources often have different field behavior
100+
// depending on the request it is embedded in (e.g. for Create methods name
101+
// is optional and unused, while for Update methods it is required). Instead
102+
// of method-specific annotations, only `IDENTIFIER` is required.
103+
IDENTIFIER = 8;
90104
}

0 commit comments

Comments
 (0)