@@ -7,17 +7,17 @@ created: 2024-03-07
77# Automatically populate fields in the request message
88
99For APIs that leverage request idempotency as described via [ AIP-155] , APIs may
10- choose to have the client libraries automatically populate the ` request_id `
11- if it is not already set by the customer.
10+ choose to have the client libraries automatically populate fields such as
11+ ` request_id ` if they are not already set by the customer.
1212
1313** Note:** This feature is primarily written for ` request_id ` fields within the
1414request message. Nonetheless, this feature ** must** work for a field of any
15- name, as long as the below conditions hold true.
15+ name, as long as the conditions below hold true.
1616
1717## Guidance
1818
1919APIs ** may** configure fields in the request message for automatic population.
20- For a field to be automatically populated, ** all** the below configurations
20+ For a field to be automatically populated, ** all** the conditions below
2121** must** be true:
2222
2323- The field ** must** be of type ` string `
@@ -37,19 +37,20 @@ For a field to be automatically populated, **all** the below configurations
3737If the aforementioned requirements are met for a given field, client library
3838generators ** must** enable automatic population of said field in the
3939generated client.
40+
4041If a field is specified in the ` auto_populated_fields ` , but does not meet the
4142structural requirements, the client library generators ** must not** enable
4243automatic population for that field. Client library generators ** may** emit an
4344error during generation.
4445
4546Client libraries ** must** reuse automatically populated values for retries of
46- the same request i.e. , the automatically populated fields ** must not** be
47- regenerated for each RPC attempt with a single request message.
47+ the same request. In other words , the automatically populated fields ** must not**
48+ be regenerated for each RPC attempt with the same request message.
4849
4950[ AIP-155 ] : https://google.aip.dev/155
5051
5152[ apf ] : https://github.com/googleapis/googleapis/blob/master/google/api/client.proto
5253
5354[ uuid4 ] : https://google.aip.dev/202#uuid4
5455
55- [ required ] : https://google.aip.dev/203#required
56+ [ required ] : https://google.aip.dev/203#required
0 commit comments