Skip to content

Commit 8b90b6c

Browse files
fix: annotating some fields as REQUIRED (#1695)
* fix!: annotating some fields as REQUIRED These fields were actually always required by the backend, so annotation just documents status quo. I believe this change will not require major version bump for any language. PiperOrigin-RevId: 429093810 Source-Link: googleapis/googleapis@dc04c1c Source-Link: https://github.com/googleapis/googleapis-gen/commit/0e23469bea2f397f2b783c5a25e64452f86be6bc Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGUyMzQ2OWJlYTJmMzk3ZjJiNzgzYzVhMjVlNjQ0NTJmODZiZTZiYyJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent b8c67ae commit 8b90b6c

File tree

12 files changed

+485
-436
lines changed

12 files changed

+485
-436
lines changed

proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/Instance.java

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ private State(int value) {
359359
* segment of the name must be between 2 and 64 characters in length.
360360
* </pre>
361361
*
362-
* <code>string name = 1;</code>
362+
* <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
363363
*
364364
* @return The name.
365365
*/
@@ -385,7 +385,7 @@ public java.lang.String getName() {
385385
* segment of the name must be between 2 and 64 characters in length.
386386
* </pre>
387387
*
388-
* <code>string name = 1;</code>
388+
* <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
389389
*
390390
* @return The bytes for name.
391391
*/
@@ -414,7 +414,9 @@ public com.google.protobuf.ByteString getNameBytes() {
414414
* [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
415415
* </pre>
416416
*
417-
* <code>string config = 2 [(.google.api.resource_reference) = { ... }</code>
417+
* <code>
418+
* string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
419+
* </code>
418420
*
419421
* @return The config.
420422
*/
@@ -440,7 +442,9 @@ public java.lang.String getConfig() {
440442
* [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
441443
* </pre>
442444
*
443-
* <code>string config = 2 [(.google.api.resource_reference) = { ... }</code>
445+
* <code>
446+
* string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
447+
* </code>
444448
*
445449
* @return The bytes for config.
446450
*/
@@ -467,7 +471,7 @@ public com.google.protobuf.ByteString getConfigBytes() {
467471
* Must be unique per project and between 4 and 30 characters in length.
468472
* </pre>
469473
*
470-
* <code>string display_name = 3;</code>
474+
* <code>string display_name = 3 [(.google.api.field_behavior) = REQUIRED];</code>
471475
*
472476
* @return The displayName.
473477
*/
@@ -491,7 +495,7 @@ public java.lang.String getDisplayName() {
491495
* Must be unique per project and between 4 and 30 characters in length.
492496
* </pre>
493497
*
494-
* <code>string display_name = 3;</code>
498+
* <code>string display_name = 3 [(.google.api.field_behavior) = REQUIRED];</code>
495499
*
496500
* @return The bytes for displayName.
497501
*/
@@ -1310,7 +1314,7 @@ public Builder mergeFrom(
13101314
* segment of the name must be between 2 and 64 characters in length.
13111315
* </pre>
13121316
*
1313-
* <code>string name = 1;</code>
1317+
* <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
13141318
*
13151319
* @return The name.
13161320
*/
@@ -1335,7 +1339,7 @@ public java.lang.String getName() {
13351339
* segment of the name must be between 2 and 64 characters in length.
13361340
* </pre>
13371341
*
1338-
* <code>string name = 1;</code>
1342+
* <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
13391343
*
13401344
* @return The bytes for name.
13411345
*/
@@ -1360,7 +1364,7 @@ public com.google.protobuf.ByteString getNameBytes() {
13601364
* segment of the name must be between 2 and 64 characters in length.
13611365
* </pre>
13621366
*
1363-
* <code>string name = 1;</code>
1367+
* <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
13641368
*
13651369
* @param value The name to set.
13661370
* @return This builder for chaining.
@@ -1384,7 +1388,7 @@ public Builder setName(java.lang.String value) {
13841388
* segment of the name must be between 2 and 64 characters in length.
13851389
* </pre>
13861390
*
1387-
* <code>string name = 1;</code>
1391+
* <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
13881392
*
13891393
* @return This builder for chaining.
13901394
*/
@@ -1404,7 +1408,7 @@ public Builder clearName() {
14041408
* segment of the name must be between 2 and 64 characters in length.
14051409
* </pre>
14061410
*
1407-
* <code>string name = 1;</code>
1411+
* <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
14081412
*
14091413
* @param value The bytes for name to set.
14101414
* @return This builder for chaining.
@@ -1431,7 +1435,9 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) {
14311435
* [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
14321436
* </pre>
14331437
*
1434-
* <code>string config = 2 [(.google.api.resource_reference) = { ... }</code>
1438+
* <code>
1439+
* string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
1440+
* </code>
14351441
*
14361442
* @return The config.
14371443
*/
@@ -1456,7 +1462,9 @@ public java.lang.String getConfig() {
14561462
* [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
14571463
* </pre>
14581464
*
1459-
* <code>string config = 2 [(.google.api.resource_reference) = { ... }</code>
1465+
* <code>
1466+
* string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
1467+
* </code>
14601468
*
14611469
* @return The bytes for config.
14621470
*/
@@ -1481,7 +1489,9 @@ public com.google.protobuf.ByteString getConfigBytes() {
14811489
* [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
14821490
* </pre>
14831491
*
1484-
* <code>string config = 2 [(.google.api.resource_reference) = { ... }</code>
1492+
* <code>
1493+
* string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
1494+
* </code>
14851495
*
14861496
* @param value The config to set.
14871497
* @return This builder for chaining.
@@ -1505,7 +1515,9 @@ public Builder setConfig(java.lang.String value) {
15051515
* [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
15061516
* </pre>
15071517
*
1508-
* <code>string config = 2 [(.google.api.resource_reference) = { ... }</code>
1518+
* <code>
1519+
* string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
1520+
* </code>
15091521
*
15101522
* @return This builder for chaining.
15111523
*/
@@ -1525,7 +1537,9 @@ public Builder clearConfig() {
15251537
* [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
15261538
* </pre>
15271539
*
1528-
* <code>string config = 2 [(.google.api.resource_reference) = { ... }</code>
1540+
* <code>
1541+
* string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
1542+
* </code>
15291543
*
15301544
* @param value The bytes for config to set.
15311545
* @return This builder for chaining.
@@ -1550,7 +1564,7 @@ public Builder setConfigBytes(com.google.protobuf.ByteString value) {
15501564
* Must be unique per project and between 4 and 30 characters in length.
15511565
* </pre>
15521566
*
1553-
* <code>string display_name = 3;</code>
1567+
* <code>string display_name = 3 [(.google.api.field_behavior) = REQUIRED];</code>
15541568
*
15551569
* @return The displayName.
15561570
*/
@@ -1573,7 +1587,7 @@ public java.lang.String getDisplayName() {
15731587
* Must be unique per project and between 4 and 30 characters in length.
15741588
* </pre>
15751589
*
1576-
* <code>string display_name = 3;</code>
1590+
* <code>string display_name = 3 [(.google.api.field_behavior) = REQUIRED];</code>
15771591
*
15781592
* @return The bytes for displayName.
15791593
*/
@@ -1596,7 +1610,7 @@ public com.google.protobuf.ByteString getDisplayNameBytes() {
15961610
* Must be unique per project and between 4 and 30 characters in length.
15971611
* </pre>
15981612
*
1599-
* <code>string display_name = 3;</code>
1613+
* <code>string display_name = 3 [(.google.api.field_behavior) = REQUIRED];</code>
16001614
*
16011615
* @param value The displayName to set.
16021616
* @return This builder for chaining.
@@ -1618,7 +1632,7 @@ public Builder setDisplayName(java.lang.String value) {
16181632
* Must be unique per project and between 4 and 30 characters in length.
16191633
* </pre>
16201634
*
1621-
* <code>string display_name = 3;</code>
1635+
* <code>string display_name = 3 [(.google.api.field_behavior) = REQUIRED];</code>
16221636
*
16231637
* @return This builder for chaining.
16241638
*/
@@ -1636,7 +1650,7 @@ public Builder clearDisplayName() {
16361650
* Must be unique per project and between 4 and 30 characters in length.
16371651
* </pre>
16381652
*
1639-
* <code>string display_name = 3;</code>
1653+
* <code>string display_name = 3 [(.google.api.field_behavior) = REQUIRED];</code>
16401654
*
16411655
* @param value The bytes for displayName to set.
16421656
* @return This builder for chaining.

proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceOrBuilder.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public interface InstanceOrBuilder
3333
* segment of the name must be between 2 and 64 characters in length.
3434
* </pre>
3535
*
36-
* <code>string name = 1;</code>
36+
* <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
3737
*
3838
* @return The name.
3939
*/
@@ -48,7 +48,7 @@ public interface InstanceOrBuilder
4848
* segment of the name must be between 2 and 64 characters in length.
4949
* </pre>
5050
*
51-
* <code>string name = 1;</code>
51+
* <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
5252
*
5353
* @return The bytes for name.
5454
*/
@@ -64,7 +64,9 @@ public interface InstanceOrBuilder
6464
* [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
6565
* </pre>
6666
*
67-
* <code>string config = 2 [(.google.api.resource_reference) = { ... }</code>
67+
* <code>
68+
* string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
69+
* </code>
6870
*
6971
* @return The config.
7072
*/
@@ -79,7 +81,9 @@ public interface InstanceOrBuilder
7981
* [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
8082
* </pre>
8183
*
82-
* <code>string config = 2 [(.google.api.resource_reference) = { ... }</code>
84+
* <code>
85+
* string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
86+
* </code>
8387
*
8488
* @return The bytes for config.
8589
*/
@@ -93,7 +97,7 @@ public interface InstanceOrBuilder
9397
* Must be unique per project and between 4 and 30 characters in length.
9498
* </pre>
9599
*
96-
* <code>string display_name = 3;</code>
100+
* <code>string display_name = 3 [(.google.api.field_behavior) = REQUIRED];</code>
97101
*
98102
* @return The displayName.
99103
*/
@@ -106,7 +110,7 @@ public interface InstanceOrBuilder
106110
* Must be unique per project and between 4 and 30 characters in length.
107111
* </pre>
108112
*
109-
* <code>string display_name = 3;</code>
113+
* <code>string display_name = 3 [(.google.api.field_behavior) = REQUIRED];</code>
110114
*
111115
* @return The bytes for displayName.
112116
*/

0 commit comments

Comments
 (0)