Skip to content

Commit 0fee667

Browse files
authored
fix(AIP-203): explain IDENTIFIER behavior (#1241)
1 parent 4d376e4 commit 0fee667

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

aip/general/0203.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ The use of `IDENTIFIER` indicates that a field within a resource message is used
7070
to identify the resource. It **must** be attached to the `name` field and **must
7171
not** be attached to any other field (see [fields representing resource names]).
7272

73+
The `IDENTIFIER` value conveys that the field is not accepted as input (i.e.
74+
`OUTPUT_ONLY`) in the context of a create method, while also being considered
75+
`IMMUTABLE` and accepted as input for mutation methods that accept the
76+
resource as the primary input e.g. [Standard Update][aip-134].
77+
7378
This annotation **must not** be applied to references to other resources within
7479
a message.
7580

@@ -220,6 +225,19 @@ There are some changes that *are* backwards compatible, which are as follows:
220225

221226
## Rationale
222227

228+
### Identifier field behavior
229+
230+
Resource names, the primary identifiers for any compliant resource, are never
231+
fully constructed by the user on create. Such fields are typically assigned
232+
`OUTPUT_ONLY` field behavior. They are, however, also often consumed as
233+
the primary identifier in scenarios where the resource itself is the primary
234+
request payload. Such fields could *not* be considered `OUTPUT_ONLY`.
235+
Furthermore, in mutation requests, like Standard Update, the resource name as
236+
the primary identifier cannot be changed in place. Such fields are typically
237+
assigned `IMMUTABLE` field behavior. These conflicting and context-dependent
238+
field behaviors meant that a new value was necessary to single out and convey
239+
the behavior of the resource name field.
240+
223241
### Required set of annotations
224242

225243
A field used in a request message must be either an input or an output.

0 commit comments

Comments
 (0)