Skip to content

Commit

Permalink
fix: annotating some fields as REQUIRED (#1695)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Feb 25, 2022
1 parent b8c67ae commit 8b90b6c
Show file tree
Hide file tree
Showing 12 changed files with 485 additions and 436 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ private State(int value) {
* segment of the name must be between 2 and 64 characters in length.
* </pre>
*
* <code>string name = 1;</code>
* <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @return The name.
*/
Expand All @@ -385,7 +385,7 @@ public java.lang.String getName() {
* segment of the name must be between 2 and 64 characters in length.
* </pre>
*
* <code>string name = 1;</code>
* <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @return The bytes for name.
*/
Expand Down Expand Up @@ -414,7 +414,9 @@ public com.google.protobuf.ByteString getNameBytes() {
* [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
* </pre>
*
* <code>string config = 2 [(.google.api.resource_reference) = { ... }</code>
* <code>
* string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
* </code>
*
* @return The config.
*/
Expand All @@ -440,7 +442,9 @@ public java.lang.String getConfig() {
* [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
* </pre>
*
* <code>string config = 2 [(.google.api.resource_reference) = { ... }</code>
* <code>
* string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
* </code>
*
* @return The bytes for config.
*/
Expand All @@ -467,7 +471,7 @@ public com.google.protobuf.ByteString getConfigBytes() {
* Must be unique per project and between 4 and 30 characters in length.
* </pre>
*
* <code>string display_name = 3;</code>
* <code>string display_name = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @return The displayName.
*/
Expand All @@ -491,7 +495,7 @@ public java.lang.String getDisplayName() {
* Must be unique per project and between 4 and 30 characters in length.
* </pre>
*
* <code>string display_name = 3;</code>
* <code>string display_name = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @return The bytes for displayName.
*/
Expand Down Expand Up @@ -1310,7 +1314,7 @@ public Builder mergeFrom(
* segment of the name must be between 2 and 64 characters in length.
* </pre>
*
* <code>string name = 1;</code>
* <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @return The name.
*/
Expand All @@ -1335,7 +1339,7 @@ public java.lang.String getName() {
* segment of the name must be between 2 and 64 characters in length.
* </pre>
*
* <code>string name = 1;</code>
* <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @return The bytes for name.
*/
Expand All @@ -1360,7 +1364,7 @@ public com.google.protobuf.ByteString getNameBytes() {
* segment of the name must be between 2 and 64 characters in length.
* </pre>
*
* <code>string name = 1;</code>
* <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @param value The name to set.
* @return This builder for chaining.
Expand All @@ -1384,7 +1388,7 @@ public Builder setName(java.lang.String value) {
* segment of the name must be between 2 and 64 characters in length.
* </pre>
*
* <code>string name = 1;</code>
* <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @return This builder for chaining.
*/
Expand All @@ -1404,7 +1408,7 @@ public Builder clearName() {
* segment of the name must be between 2 and 64 characters in length.
* </pre>
*
* <code>string name = 1;</code>
* <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @param value The bytes for name to set.
* @return This builder for chaining.
Expand All @@ -1431,7 +1435,9 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) {
* [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
* </pre>
*
* <code>string config = 2 [(.google.api.resource_reference) = { ... }</code>
* <code>
* string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
* </code>
*
* @return The config.
*/
Expand All @@ -1456,7 +1462,9 @@ public java.lang.String getConfig() {
* [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
* </pre>
*
* <code>string config = 2 [(.google.api.resource_reference) = { ... }</code>
* <code>
* string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
* </code>
*
* @return The bytes for config.
*/
Expand All @@ -1481,7 +1489,9 @@ public com.google.protobuf.ByteString getConfigBytes() {
* [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
* </pre>
*
* <code>string config = 2 [(.google.api.resource_reference) = { ... }</code>
* <code>
* string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
* </code>
*
* @param value The config to set.
* @return This builder for chaining.
Expand All @@ -1505,7 +1515,9 @@ public Builder setConfig(java.lang.String value) {
* [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
* </pre>
*
* <code>string config = 2 [(.google.api.resource_reference) = { ... }</code>
* <code>
* string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
* </code>
*
* @return This builder for chaining.
*/
Expand All @@ -1525,7 +1537,9 @@ public Builder clearConfig() {
* [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
* </pre>
*
* <code>string config = 2 [(.google.api.resource_reference) = { ... }</code>
* <code>
* string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
* </code>
*
* @param value The bytes for config to set.
* @return This builder for chaining.
Expand All @@ -1550,7 +1564,7 @@ public Builder setConfigBytes(com.google.protobuf.ByteString value) {
* Must be unique per project and between 4 and 30 characters in length.
* </pre>
*
* <code>string display_name = 3;</code>
* <code>string display_name = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @return The displayName.
*/
Expand All @@ -1573,7 +1587,7 @@ public java.lang.String getDisplayName() {
* Must be unique per project and between 4 and 30 characters in length.
* </pre>
*
* <code>string display_name = 3;</code>
* <code>string display_name = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @return The bytes for displayName.
*/
Expand All @@ -1596,7 +1610,7 @@ public com.google.protobuf.ByteString getDisplayNameBytes() {
* Must be unique per project and between 4 and 30 characters in length.
* </pre>
*
* <code>string display_name = 3;</code>
* <code>string display_name = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @param value The displayName to set.
* @return This builder for chaining.
Expand All @@ -1618,7 +1632,7 @@ public Builder setDisplayName(java.lang.String value) {
* Must be unique per project and between 4 and 30 characters in length.
* </pre>
*
* <code>string display_name = 3;</code>
* <code>string display_name = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @return This builder for chaining.
*/
Expand All @@ -1636,7 +1650,7 @@ public Builder clearDisplayName() {
* Must be unique per project and between 4 and 30 characters in length.
* </pre>
*
* <code>string display_name = 3;</code>
* <code>string display_name = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @param value The bytes for displayName to set.
* @return This builder for chaining.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public interface InstanceOrBuilder
* segment of the name must be between 2 and 64 characters in length.
* </pre>
*
* <code>string name = 1;</code>
* <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @return The name.
*/
Expand All @@ -48,7 +48,7 @@ public interface InstanceOrBuilder
* segment of the name must be between 2 and 64 characters in length.
* </pre>
*
* <code>string name = 1;</code>
* <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @return The bytes for name.
*/
Expand All @@ -64,7 +64,9 @@ public interface InstanceOrBuilder
* [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
* </pre>
*
* <code>string config = 2 [(.google.api.resource_reference) = { ... }</code>
* <code>
* string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
* </code>
*
* @return The config.
*/
Expand All @@ -79,7 +81,9 @@ public interface InstanceOrBuilder
* [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
* </pre>
*
* <code>string config = 2 [(.google.api.resource_reference) = { ... }</code>
* <code>
* string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
* </code>
*
* @return The bytes for config.
*/
Expand All @@ -93,7 +97,7 @@ public interface InstanceOrBuilder
* Must be unique per project and between 4 and 30 characters in length.
* </pre>
*
* <code>string display_name = 3;</code>
* <code>string display_name = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @return The displayName.
*/
Expand All @@ -106,7 +110,7 @@ public interface InstanceOrBuilder
* Must be unique per project and between 4 and 30 characters in length.
* </pre>
*
* <code>string display_name = 3;</code>
* <code>string display_name = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*
* @return The bytes for displayName.
*/
Expand Down
Loading

0 comments on commit 8b90b6c

Please sign in to comment.