From 6d57200f048519e00295b8e7c671909ba54af3b6 Mon Sep 17 00:00:00 2001 From: Andrei Scripniciuc <46186670+andrei-scripniciuc@users.noreply.github.com> Date: Fri, 16 Feb 2024 11:40:47 -0800 Subject: [PATCH 1/2] feat(AIP-203): Clarify that IDENTIFIER fields are mutually exclusive with other behaviors --- aip/general/0203.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/aip/general/0203.md b/aip/general/0203.md index 7de5e39f2a..1077f335d9 100644 --- a/aip/general/0203.md +++ b/aip/general/0203.md @@ -29,7 +29,8 @@ RecognitionAudio audio = 2 [(google.api.field_behavior) = REQUIRED]; - The annotation **must** include any [google.api.FieldBehavior][] values that accurately describe the behavior of the field. - `FIELD_BEHAVIOR_UNSPECIFIED` **must not** be used. -- APIs **must** at minimum use one of `REQUIRED`, `OPTIONAL`, or `OUTPUT_ONLY`. +- APIs **must** at minimum use one of `REQUIRED`, `OPTIONAL`, `OUTPUT_ONLY` or + `IDENTIFIER`. **Warning:** Although `field_behavior` does not impact proto-level behavior, many clients (e.g. CLIs and SDKs) rely on them to generate code. Thoroughly @@ -78,6 +79,9 @@ resource as the primary input e.g. [Standard Update][aip-134]. This annotation **must not** be applied to references to other resources within a message. +Fields annonated with `IDENTIFIER` **must not** use any other +`google.api.field_behavior` annotation. + ### Immutable The use of `IMMUTABLE` indicates that a field on a resource cannot be changed From a32a82be6f0582ea18ba083830d5e7c88218d3a5 Mon Sep 17 00:00:00 2001 From: Andrei Scripniciuc <46186670+andrei-scripniciuc@users.noreply.github.com> Date: Fri, 16 Feb 2024 19:48:44 +0000 Subject: [PATCH 2/2] chore: add changelog entry --- aip/general/0203.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aip/general/0203.md b/aip/general/0203.md index 1077f335d9..ec20058e2a 100644 --- a/aip/general/0203.md +++ b/aip/general/0203.md @@ -289,6 +289,8 @@ surpass the costs to clients and API users of not doing so. ## Changelog +- **2024-02-16**: `IDENTIFIER` annotations are mutually exclusive with all + other field behaviors. - **2023-09-14**: Clarify that nested behavior and parent behavior are independent. - **2023-08-25**: Add guidance on `IDENTIFIER`.