Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AIP-203: is IDENTIFIER + OUTPUT_ONLY a valid combination #1319

Open
CuriousStork opened this issue Mar 5, 2024 · 0 comments
Open

AIP-203: is IDENTIFIER + OUTPUT_ONLY a valid combination #1319

CuriousStork opened this issue Mar 5, 2024 · 0 comments

Comments

@CuriousStork
Copy link

Hello,

I wonder if a name field with IDENTIFIER + OUTPUT_ONLY behavior is valid.

On the one hand OUTPUT_ONLY states the following in AIP-203:

the server must clear out any value in this field and must not throw an error as a result of the presence of a value in this field on input

So methods like standard Update/Delete won't work, because the server must clear out the name value which identifies the resource to be updated.

On the other hand, I see at least one IDENTIFIER + OUTPUT_ONLY precedent of in googleapis: https://github.com/googleapis/googleapis/blob/7659dd2244563fd902b681bdcadbe5385b8d3462/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto#L605

  // Output only. Identifier. The resource name for the Assessment in the format
  // `projects/{project}/assessments/{assessment}`.
  string name = 1 [
    (google.api.field_behavior) = OUTPUT_ONLY,
    (google.api.field_behavior) = IDENTIFIER
  ];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant