@@ -57,182 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
57
57
return this .unknownFields ;
58
58
}
59
59
60
- private Backup (
61
- com .google .protobuf .CodedInputStream input ,
62
- com .google .protobuf .ExtensionRegistryLite extensionRegistry )
63
- throws com .google .protobuf .InvalidProtocolBufferException {
64
- this ();
65
- if (extensionRegistry == null ) {
66
- throw new java .lang .NullPointerException ();
67
- }
68
- int mutable_bitField0_ = 0 ;
69
- com .google .protobuf .UnknownFieldSet .Builder unknownFields =
70
- com .google .protobuf .UnknownFieldSet .newBuilder ();
71
- try {
72
- boolean done = false ;
73
- while (!done ) {
74
- int tag = input .readTag ();
75
- switch (tag ) {
76
- case 0 :
77
- done = true ;
78
- break ;
79
- case 10 :
80
- {
81
- java .lang .String s = input .readStringRequireUtf8 ();
82
-
83
- name_ = s ;
84
- break ;
85
- }
86
- case 18 :
87
- {
88
- java .lang .String s = input .readStringRequireUtf8 ();
89
-
90
- database_ = s ;
91
- break ;
92
- }
93
- case 26 :
94
- {
95
- com .google .protobuf .Timestamp .Builder subBuilder = null ;
96
- if (expireTime_ != null ) {
97
- subBuilder = expireTime_ .toBuilder ();
98
- }
99
- expireTime_ =
100
- input .readMessage (com .google .protobuf .Timestamp .parser (), extensionRegistry );
101
- if (subBuilder != null ) {
102
- subBuilder .mergeFrom (expireTime_ );
103
- expireTime_ = subBuilder .buildPartial ();
104
- }
105
-
106
- break ;
107
- }
108
- case 34 :
109
- {
110
- com .google .protobuf .Timestamp .Builder subBuilder = null ;
111
- if (createTime_ != null ) {
112
- subBuilder = createTime_ .toBuilder ();
113
- }
114
- createTime_ =
115
- input .readMessage (com .google .protobuf .Timestamp .parser (), extensionRegistry );
116
- if (subBuilder != null ) {
117
- subBuilder .mergeFrom (createTime_ );
118
- createTime_ = subBuilder .buildPartial ();
119
- }
120
-
121
- break ;
122
- }
123
- case 40 :
124
- {
125
- sizeBytes_ = input .readInt64 ();
126
- break ;
127
- }
128
- case 48 :
129
- {
130
- int rawValue = input .readEnum ();
131
-
132
- state_ = rawValue ;
133
- break ;
134
- }
135
- case 58 :
136
- {
137
- java .lang .String s = input .readStringRequireUtf8 ();
138
- if (!((mutable_bitField0_ & 0x00000001 ) != 0 )) {
139
- referencingDatabases_ = new com .google .protobuf .LazyStringArrayList ();
140
- mutable_bitField0_ |= 0x00000001 ;
141
- }
142
- referencingDatabases_ .add (s );
143
- break ;
144
- }
145
- case 66 :
146
- {
147
- com .google .spanner .admin .database .v1 .EncryptionInfo .Builder subBuilder = null ;
148
- if (encryptionInfo_ != null ) {
149
- subBuilder = encryptionInfo_ .toBuilder ();
150
- }
151
- encryptionInfo_ =
152
- input .readMessage (
153
- com .google .spanner .admin .database .v1 .EncryptionInfo .parser (),
154
- extensionRegistry );
155
- if (subBuilder != null ) {
156
- subBuilder .mergeFrom (encryptionInfo_ );
157
- encryptionInfo_ = subBuilder .buildPartial ();
158
- }
159
-
160
- break ;
161
- }
162
- case 74 :
163
- {
164
- com .google .protobuf .Timestamp .Builder subBuilder = null ;
165
- if (versionTime_ != null ) {
166
- subBuilder = versionTime_ .toBuilder ();
167
- }
168
- versionTime_ =
169
- input .readMessage (com .google .protobuf .Timestamp .parser (), extensionRegistry );
170
- if (subBuilder != null ) {
171
- subBuilder .mergeFrom (versionTime_ );
172
- versionTime_ = subBuilder .buildPartial ();
173
- }
174
-
175
- break ;
176
- }
177
- case 80 :
178
- {
179
- int rawValue = input .readEnum ();
180
-
181
- databaseDialect_ = rawValue ;
182
- break ;
183
- }
184
- case 90 :
185
- {
186
- java .lang .String s = input .readStringRequireUtf8 ();
187
- if (!((mutable_bitField0_ & 0x00000002 ) != 0 )) {
188
- referencingBackups_ = new com .google .protobuf .LazyStringArrayList ();
189
- mutable_bitField0_ |= 0x00000002 ;
190
- }
191
- referencingBackups_ .add (s );
192
- break ;
193
- }
194
- case 98 :
195
- {
196
- com .google .protobuf .Timestamp .Builder subBuilder = null ;
197
- if (maxExpireTime_ != null ) {
198
- subBuilder = maxExpireTime_ .toBuilder ();
199
- }
200
- maxExpireTime_ =
201
- input .readMessage (com .google .protobuf .Timestamp .parser (), extensionRegistry );
202
- if (subBuilder != null ) {
203
- subBuilder .mergeFrom (maxExpireTime_ );
204
- maxExpireTime_ = subBuilder .buildPartial ();
205
- }
206
-
207
- break ;
208
- }
209
- default :
210
- {
211
- if (!parseUnknownField (input , unknownFields , extensionRegistry , tag )) {
212
- done = true ;
213
- }
214
- break ;
215
- }
216
- }
217
- }
218
- } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
219
- throw e .setUnfinishedMessage (this );
220
- } catch (com .google .protobuf .UninitializedMessageException e ) {
221
- throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (this );
222
- } catch (java .io .IOException e ) {
223
- throw new com .google .protobuf .InvalidProtocolBufferException (e ).setUnfinishedMessage (this );
224
- } finally {
225
- if (((mutable_bitField0_ & 0x00000001 ) != 0 )) {
226
- referencingDatabases_ = referencingDatabases_ .getUnmodifiableView ();
227
- }
228
- if (((mutable_bitField0_ & 0x00000002 ) != 0 )) {
229
- referencingBackups_ = referencingBackups_ .getUnmodifiableView ();
230
- }
231
- this .unknownFields = unknownFields .build ();
232
- makeExtensionsImmutable ();
233
- }
234
- }
235
-
236
60
public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
237
61
return com .google .spanner .admin .database .v1 .BackupProto
238
62
.internal_static_google_spanner_admin_database_v1_Backup_descriptor ;
@@ -1163,7 +987,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
1163
987
if (maxExpireTime_ != null ) {
1164
988
output .writeMessage (12 , getMaxExpireTime ());
1165
989
}
1166
- unknownFields .writeTo (output );
990
+ getUnknownFields () .writeTo (output );
1167
991
}
1168
992
1169
993
@ java .lang .Override
@@ -1220,7 +1044,7 @@ public int getSerializedSize() {
1220
1044
if (maxExpireTime_ != null ) {
1221
1045
size += com .google .protobuf .CodedOutputStream .computeMessageSize (12 , getMaxExpireTime ());
1222
1046
}
1223
- size += unknownFields .getSerializedSize ();
1047
+ size += getUnknownFields () .getSerializedSize ();
1224
1048
memoizedSize = size ;
1225
1049
return size ;
1226
1050
}
@@ -1263,7 +1087,7 @@ public boolean equals(final java.lang.Object obj) {
1263
1087
if (hasMaxExpireTime ()) {
1264
1088
if (!getMaxExpireTime ().equals (other .getMaxExpireTime ())) return false ;
1265
1089
}
1266
- if (!unknownFields .equals (other .unknownFields )) return false ;
1090
+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
1267
1091
return true ;
1268
1092
}
1269
1093
@@ -1312,7 +1136,7 @@ public int hashCode() {
1312
1136
hash = (37 * hash ) + MAX_EXPIRE_TIME_FIELD_NUMBER ;
1313
1137
hash = (53 * hash ) + getMaxExpireTime ().hashCode ();
1314
1138
}
1315
- hash = (29 * hash ) + unknownFields .hashCode ();
1139
+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
1316
1140
memoizedHashCode = hash ;
1317
1141
return hash ;
1318
1142
}
@@ -1441,17 +1265,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1441
1265
}
1442
1266
1443
1267
// Construct using com.google.spanner.admin.database.v1.Backup.newBuilder()
1444
- private Builder () {
1445
- maybeForceBuilderInitialization ();
1446
- }
1268
+ private Builder () {}
1447
1269
1448
1270
private Builder (com .google .protobuf .GeneratedMessageV3 .BuilderParent parent ) {
1449
1271
super (parent );
1450
- maybeForceBuilderInitialization ();
1451
- }
1452
-
1453
- private void maybeForceBuilderInitialization () {
1454
- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {}
1455
1272
}
1456
1273
1457
1274
@ java .lang .Override
@@ -1670,7 +1487,7 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.Backup other) {
1670
1487
if (other .hasMaxExpireTime ()) {
1671
1488
mergeMaxExpireTime (other .getMaxExpireTime ());
1672
1489
}
1673
- this .mergeUnknownFields (other .unknownFields );
1490
+ this .mergeUnknownFields (other .getUnknownFields () );
1674
1491
onChanged ();
1675
1492
return this ;
1676
1493
}
@@ -1685,17 +1502,105 @@ public Builder mergeFrom(
1685
1502
com .google .protobuf .CodedInputStream input ,
1686
1503
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
1687
1504
throws java .io .IOException {
1688
- com .google .spanner .admin .database .v1 .Backup parsedMessage = null ;
1505
+ if (extensionRegistry == null ) {
1506
+ throw new java .lang .NullPointerException ();
1507
+ }
1689
1508
try {
1690
- parsedMessage = PARSER .parsePartialFrom (input , extensionRegistry );
1509
+ boolean done = false ;
1510
+ while (!done ) {
1511
+ int tag = input .readTag ();
1512
+ switch (tag ) {
1513
+ case 0 :
1514
+ done = true ;
1515
+ break ;
1516
+ case 10 :
1517
+ {
1518
+ name_ = input .readStringRequireUtf8 ();
1519
+
1520
+ break ;
1521
+ } // case 10
1522
+ case 18 :
1523
+ {
1524
+ database_ = input .readStringRequireUtf8 ();
1525
+
1526
+ break ;
1527
+ } // case 18
1528
+ case 26 :
1529
+ {
1530
+ input .readMessage (getExpireTimeFieldBuilder ().getBuilder (), extensionRegistry );
1531
+
1532
+ break ;
1533
+ } // case 26
1534
+ case 34 :
1535
+ {
1536
+ input .readMessage (getCreateTimeFieldBuilder ().getBuilder (), extensionRegistry );
1537
+
1538
+ break ;
1539
+ } // case 34
1540
+ case 40 :
1541
+ {
1542
+ sizeBytes_ = input .readInt64 ();
1543
+
1544
+ break ;
1545
+ } // case 40
1546
+ case 48 :
1547
+ {
1548
+ state_ = input .readEnum ();
1549
+
1550
+ break ;
1551
+ } // case 48
1552
+ case 58 :
1553
+ {
1554
+ java .lang .String s = input .readStringRequireUtf8 ();
1555
+ ensureReferencingDatabasesIsMutable ();
1556
+ referencingDatabases_ .add (s );
1557
+ break ;
1558
+ } // case 58
1559
+ case 66 :
1560
+ {
1561
+ input .readMessage (getEncryptionInfoFieldBuilder ().getBuilder (), extensionRegistry );
1562
+
1563
+ break ;
1564
+ } // case 66
1565
+ case 74 :
1566
+ {
1567
+ input .readMessage (getVersionTimeFieldBuilder ().getBuilder (), extensionRegistry );
1568
+
1569
+ break ;
1570
+ } // case 74
1571
+ case 80 :
1572
+ {
1573
+ databaseDialect_ = input .readEnum ();
1574
+
1575
+ break ;
1576
+ } // case 80
1577
+ case 90 :
1578
+ {
1579
+ java .lang .String s = input .readStringRequireUtf8 ();
1580
+ ensureReferencingBackupsIsMutable ();
1581
+ referencingBackups_ .add (s );
1582
+ break ;
1583
+ } // case 90
1584
+ case 98 :
1585
+ {
1586
+ input .readMessage (getMaxExpireTimeFieldBuilder ().getBuilder (), extensionRegistry );
1587
+
1588
+ break ;
1589
+ } // case 98
1590
+ default :
1591
+ {
1592
+ if (!super .parseUnknownField (input , extensionRegistry , tag )) {
1593
+ done = true ; // was an endgroup tag
1594
+ }
1595
+ break ;
1596
+ } // default:
1597
+ } // switch (tag)
1598
+ } // while (!done)
1691
1599
} catch (com .google .protobuf .InvalidProtocolBufferException e ) {
1692
- parsedMessage = (com .google .spanner .admin .database .v1 .Backup ) e .getUnfinishedMessage ();
1693
1600
throw e .unwrapIOException ();
1694
1601
} finally {
1695
- if (parsedMessage != null ) {
1696
- mergeFrom (parsedMessage );
1697
- }
1698
- }
1602
+ onChanged ();
1603
+ } // finally
1699
1604
return this ;
1700
1605
}
1701
1606
@@ -3856,7 +3761,18 @@ public Backup parsePartialFrom(
3856
3761
com .google .protobuf .CodedInputStream input ,
3857
3762
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
3858
3763
throws com .google .protobuf .InvalidProtocolBufferException {
3859
- return new Backup (input , extensionRegistry );
3764
+ Builder builder = newBuilder ();
3765
+ try {
3766
+ builder .mergeFrom (input , extensionRegistry );
3767
+ } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
3768
+ throw e .setUnfinishedMessage (builder .buildPartial ());
3769
+ } catch (com .google .protobuf .UninitializedMessageException e ) {
3770
+ throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (builder .buildPartial ());
3771
+ } catch (java .io .IOException e ) {
3772
+ throw new com .google .protobuf .InvalidProtocolBufferException (e )
3773
+ .setUnfinishedMessage (builder .buildPartial ());
3774
+ }
3775
+ return builder .buildPartial ();
3860
3776
}
3861
3777
};
3862
3778
0 commit comments