@@ -42,6 +42,7 @@ private Database() {
4242 state_ = 0 ;
4343 encryptionInfo_ = java .util .Collections .emptyList ();
4444 versionRetentionPeriod_ = "" ;
45+ defaultLeader_ = "" ;
4546 }
4647
4748 @ java .lang .Override
@@ -171,6 +172,13 @@ private Database(
171172 extensionRegistry ));
172173 break ;
173174 }
175+ case 74 :
176+ {
177+ java .lang .String s = input .readStringRequireUtf8 ();
178+
179+ defaultLeader_ = s ;
180+ break ;
181+ }
174182 default :
175183 {
176184 if (!parseUnknownField (input , unknownFields , extensionRegistry , tag )) {
@@ -904,6 +912,63 @@ public com.google.protobuf.TimestampOrBuilder getEarliestVersionTimeOrBuilder()
904912 return getEarliestVersionTime ();
905913 }
906914
915+ public static final int DEFAULT_LEADER_FIELD_NUMBER = 9 ;
916+ private volatile java .lang .Object defaultLeader_ ;
917+ /**
918+ *
919+ *
920+ * <pre>
921+ * Output only. The read-write region which contains the database's leader
922+ * replicas.
923+ * This is the same as the value of default_leader
924+ * database option set using DatabaseAdmin.CreateDatabase or
925+ * DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty.
926+ * </pre>
927+ *
928+ * <code>string default_leader = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
929+ *
930+ * @return The defaultLeader.
931+ */
932+ @ java .lang .Override
933+ public java .lang .String getDefaultLeader () {
934+ java .lang .Object ref = defaultLeader_ ;
935+ if (ref instanceof java .lang .String ) {
936+ return (java .lang .String ) ref ;
937+ } else {
938+ com .google .protobuf .ByteString bs = (com .google .protobuf .ByteString ) ref ;
939+ java .lang .String s = bs .toStringUtf8 ();
940+ defaultLeader_ = s ;
941+ return s ;
942+ }
943+ }
944+ /**
945+ *
946+ *
947+ * <pre>
948+ * Output only. The read-write region which contains the database's leader
949+ * replicas.
950+ * This is the same as the value of default_leader
951+ * database option set using DatabaseAdmin.CreateDatabase or
952+ * DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty.
953+ * </pre>
954+ *
955+ * <code>string default_leader = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
956+ *
957+ * @return The bytes for defaultLeader.
958+ */
959+ @ java .lang .Override
960+ public com .google .protobuf .ByteString getDefaultLeaderBytes () {
961+ java .lang .Object ref = defaultLeader_ ;
962+ if (ref instanceof java .lang .String ) {
963+ com .google .protobuf .ByteString b =
964+ com .google .protobuf .ByteString .copyFromUtf8 ((java .lang .String ) ref );
965+ defaultLeader_ = b ;
966+ return b ;
967+ } else {
968+ return (com .google .protobuf .ByteString ) ref ;
969+ }
970+ }
971+
907972 private byte memoizedIsInitialized = -1 ;
908973
909974 @ java .lang .Override
@@ -943,6 +1008,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
9431008 for (int i = 0 ; i < encryptionInfo_ .size (); i ++) {
9441009 output .writeMessage (8 , encryptionInfo_ .get (i ));
9451010 }
1011+ if (!getDefaultLeaderBytes ().isEmpty ()) {
1012+ com .google .protobuf .GeneratedMessageV3 .writeString (output , 9 , defaultLeader_ );
1013+ }
9461014 unknownFields .writeTo (output );
9471015 }
9481016
@@ -977,6 +1045,9 @@ public int getSerializedSize() {
9771045 for (int i = 0 ; i < encryptionInfo_ .size (); i ++) {
9781046 size += com .google .protobuf .CodedOutputStream .computeMessageSize (8 , encryptionInfo_ .get (i ));
9791047 }
1048+ if (!getDefaultLeaderBytes ().isEmpty ()) {
1049+ size += com .google .protobuf .GeneratedMessageV3 .computeStringSize (9 , defaultLeader_ );
1050+ }
9801051 size += unknownFields .getSerializedSize ();
9811052 memoizedSize = size ;
9821053 return size ;
@@ -1013,6 +1084,7 @@ public boolean equals(final java.lang.Object obj) {
10131084 if (hasEarliestVersionTime ()) {
10141085 if (!getEarliestVersionTime ().equals (other .getEarliestVersionTime ())) return false ;
10151086 }
1087+ if (!getDefaultLeader ().equals (other .getDefaultLeader ())) return false ;
10161088 if (!unknownFields .equals (other .unknownFields )) return false ;
10171089 return true ;
10181090 }
@@ -1050,6 +1122,8 @@ public int hashCode() {
10501122 hash = (37 * hash ) + EARLIEST_VERSION_TIME_FIELD_NUMBER ;
10511123 hash = (53 * hash ) + getEarliestVersionTime ().hashCode ();
10521124 }
1125+ hash = (37 * hash ) + DEFAULT_LEADER_FIELD_NUMBER ;
1126+ hash = (53 * hash ) + getDefaultLeader ().hashCode ();
10531127 hash = (29 * hash ) + unknownFields .hashCode ();
10541128 memoizedHashCode = hash ;
10551129 return hash ;
@@ -1233,6 +1307,8 @@ public Builder clear() {
12331307 earliestVersionTime_ = null ;
12341308 earliestVersionTimeBuilder_ = null ;
12351309 }
1310+ defaultLeader_ = "" ;
1311+
12361312 return this ;
12371313 }
12381314
@@ -1293,6 +1369,7 @@ public com.google.spanner.admin.database.v1.Database buildPartial() {
12931369 } else {
12941370 result .earliestVersionTime_ = earliestVersionTimeBuilder_ .build ();
12951371 }
1372+ result .defaultLeader_ = defaultLeader_ ;
12961373 onBuilt ();
12971374 return result ;
12981375 }
@@ -1392,6 +1469,10 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.Database other) {
13921469 if (other .hasEarliestVersionTime ()) {
13931470 mergeEarliestVersionTime (other .getEarliestVersionTime ());
13941471 }
1472+ if (!other .getDefaultLeader ().isEmpty ()) {
1473+ defaultLeader_ = other .defaultLeader_ ;
1474+ onChanged ();
1475+ }
13951476 this .mergeUnknownFields (other .unknownFields );
13961477 onChanged ();
13971478 return this ;
@@ -3177,6 +3258,132 @@ public com.google.protobuf.TimestampOrBuilder getEarliestVersionTimeOrBuilder()
31773258 return earliestVersionTimeBuilder_ ;
31783259 }
31793260
3261+ private java .lang .Object defaultLeader_ = "" ;
3262+ /**
3263+ *
3264+ *
3265+ * <pre>
3266+ * Output only. The read-write region which contains the database's leader
3267+ * replicas.
3268+ * This is the same as the value of default_leader
3269+ * database option set using DatabaseAdmin.CreateDatabase or
3270+ * DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty.
3271+ * </pre>
3272+ *
3273+ * <code>string default_leader = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
3274+ *
3275+ * @return The defaultLeader.
3276+ */
3277+ public java .lang .String getDefaultLeader () {
3278+ java .lang .Object ref = defaultLeader_ ;
3279+ if (!(ref instanceof java .lang .String )) {
3280+ com .google .protobuf .ByteString bs = (com .google .protobuf .ByteString ) ref ;
3281+ java .lang .String s = bs .toStringUtf8 ();
3282+ defaultLeader_ = s ;
3283+ return s ;
3284+ } else {
3285+ return (java .lang .String ) ref ;
3286+ }
3287+ }
3288+ /**
3289+ *
3290+ *
3291+ * <pre>
3292+ * Output only. The read-write region which contains the database's leader
3293+ * replicas.
3294+ * This is the same as the value of default_leader
3295+ * database option set using DatabaseAdmin.CreateDatabase or
3296+ * DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty.
3297+ * </pre>
3298+ *
3299+ * <code>string default_leader = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
3300+ *
3301+ * @return The bytes for defaultLeader.
3302+ */
3303+ public com .google .protobuf .ByteString getDefaultLeaderBytes () {
3304+ java .lang .Object ref = defaultLeader_ ;
3305+ if (ref instanceof String ) {
3306+ com .google .protobuf .ByteString b =
3307+ com .google .protobuf .ByteString .copyFromUtf8 ((java .lang .String ) ref );
3308+ defaultLeader_ = b ;
3309+ return b ;
3310+ } else {
3311+ return (com .google .protobuf .ByteString ) ref ;
3312+ }
3313+ }
3314+ /**
3315+ *
3316+ *
3317+ * <pre>
3318+ * Output only. The read-write region which contains the database's leader
3319+ * replicas.
3320+ * This is the same as the value of default_leader
3321+ * database option set using DatabaseAdmin.CreateDatabase or
3322+ * DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty.
3323+ * </pre>
3324+ *
3325+ * <code>string default_leader = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
3326+ *
3327+ * @param value The defaultLeader to set.
3328+ * @return This builder for chaining.
3329+ */
3330+ public Builder setDefaultLeader (java .lang .String value ) {
3331+ if (value == null ) {
3332+ throw new NullPointerException ();
3333+ }
3334+
3335+ defaultLeader_ = value ;
3336+ onChanged ();
3337+ return this ;
3338+ }
3339+ /**
3340+ *
3341+ *
3342+ * <pre>
3343+ * Output only. The read-write region which contains the database's leader
3344+ * replicas.
3345+ * This is the same as the value of default_leader
3346+ * database option set using DatabaseAdmin.CreateDatabase or
3347+ * DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty.
3348+ * </pre>
3349+ *
3350+ * <code>string default_leader = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
3351+ *
3352+ * @return This builder for chaining.
3353+ */
3354+ public Builder clearDefaultLeader () {
3355+
3356+ defaultLeader_ = getDefaultInstance ().getDefaultLeader ();
3357+ onChanged ();
3358+ return this ;
3359+ }
3360+ /**
3361+ *
3362+ *
3363+ * <pre>
3364+ * Output only. The read-write region which contains the database's leader
3365+ * replicas.
3366+ * This is the same as the value of default_leader
3367+ * database option set using DatabaseAdmin.CreateDatabase or
3368+ * DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty.
3369+ * </pre>
3370+ *
3371+ * <code>string default_leader = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
3372+ *
3373+ * @param value The bytes for defaultLeader to set.
3374+ * @return This builder for chaining.
3375+ */
3376+ public Builder setDefaultLeaderBytes (com .google .protobuf .ByteString value ) {
3377+ if (value == null ) {
3378+ throw new NullPointerException ();
3379+ }
3380+ checkByteStringIsUtf8 (value );
3381+
3382+ defaultLeader_ = value ;
3383+ onChanged ();
3384+ return this ;
3385+ }
3386+
31803387 @ java .lang .Override
31813388 public final Builder setUnknownFields (final com .google .protobuf .UnknownFieldSet unknownFields ) {
31823389 return super .setUnknownFields (unknownFields );
0 commit comments