@@ -55,117 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
55
55
return this .unknownFields ;
56
56
}
57
57
58
- private Api (
59
- com .google .protobuf .CodedInputStream input ,
60
- com .google .protobuf .ExtensionRegistryLite extensionRegistry )
61
- throws com .google .protobuf .InvalidProtocolBufferException {
62
- this ();
63
- if (extensionRegistry == null ) {
64
- throw new java .lang .NullPointerException ();
65
- }
66
- int mutable_bitField0_ = 0 ;
67
- com .google .protobuf .UnknownFieldSet .Builder unknownFields =
68
- com .google .protobuf .UnknownFieldSet .newBuilder ();
69
- try {
70
- boolean done = false ;
71
- while (!done ) {
72
- int tag = input .readTag ();
73
- switch (tag ) {
74
- case 0 :
75
- done = true ;
76
- break ;
77
- case 10 :
78
- {
79
- java .lang .String s = input .readStringRequireUtf8 ();
80
-
81
- name_ = s ;
82
- break ;
83
- }
84
- case 18 :
85
- {
86
- com .google .protobuf .Timestamp .Builder subBuilder = null ;
87
- if (createTime_ != null ) {
88
- subBuilder = createTime_ .toBuilder ();
89
- }
90
- createTime_ =
91
- input .readMessage (com .google .protobuf .Timestamp .parser (), extensionRegistry );
92
- if (subBuilder != null ) {
93
- subBuilder .mergeFrom (createTime_ );
94
- createTime_ = subBuilder .buildPartial ();
95
- }
96
-
97
- break ;
98
- }
99
- case 26 :
100
- {
101
- com .google .protobuf .Timestamp .Builder subBuilder = null ;
102
- if (updateTime_ != null ) {
103
- subBuilder = updateTime_ .toBuilder ();
104
- }
105
- updateTime_ =
106
- input .readMessage (com .google .protobuf .Timestamp .parser (), extensionRegistry );
107
- if (subBuilder != null ) {
108
- subBuilder .mergeFrom (updateTime_ );
109
- updateTime_ = subBuilder .buildPartial ();
110
- }
111
-
112
- break ;
113
- }
114
- case 34 :
115
- {
116
- if (!((mutable_bitField0_ & 0x00000001 ) != 0 )) {
117
- labels_ =
118
- com .google .protobuf .MapField .newMapField (LabelsDefaultEntryHolder .defaultEntry );
119
- mutable_bitField0_ |= 0x00000001 ;
120
- }
121
- com .google .protobuf .MapEntry <java .lang .String , java .lang .String > labels__ =
122
- input .readMessage (
123
- LabelsDefaultEntryHolder .defaultEntry .getParserForType (), extensionRegistry );
124
- labels_ .getMutableMap ().put (labels__ .getKey (), labels__ .getValue ());
125
- break ;
126
- }
127
- case 42 :
128
- {
129
- java .lang .String s = input .readStringRequireUtf8 ();
130
-
131
- displayName_ = s ;
132
- break ;
133
- }
134
- case 58 :
135
- {
136
- java .lang .String s = input .readStringRequireUtf8 ();
137
-
138
- managedService_ = s ;
139
- break ;
140
- }
141
- case 96 :
142
- {
143
- int rawValue = input .readEnum ();
144
-
145
- state_ = rawValue ;
146
- break ;
147
- }
148
- default :
149
- {
150
- if (!parseUnknownField (input , unknownFields , extensionRegistry , tag )) {
151
- done = true ;
152
- }
153
- break ;
154
- }
155
- }
156
- }
157
- } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
158
- throw e .setUnfinishedMessage (this );
159
- } catch (com .google .protobuf .UninitializedMessageException e ) {
160
- throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (this );
161
- } catch (java .io .IOException e ) {
162
- throw new com .google .protobuf .InvalidProtocolBufferException (e ).setUnfinishedMessage (this );
163
- } finally {
164
- this .unknownFields = unknownFields .build ();
165
- makeExtensionsImmutable ();
166
- }
167
- }
168
-
169
58
public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
170
59
return com .google .cloud .apigateway .v1 .Apigateway
171
60
.internal_static_google_cloud_apigateway_v1_Api_descriptor ;
@@ -852,7 +741,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
852
741
if (state_ != com .google .cloud .apigateway .v1 .Api .State .STATE_UNSPECIFIED .getNumber ()) {
853
742
output .writeEnum (12 , state_ );
854
743
}
855
- unknownFields .writeTo (output );
744
+ getUnknownFields () .writeTo (output );
856
745
}
857
746
858
747
@ java .lang .Override
@@ -889,7 +778,7 @@ public int getSerializedSize() {
889
778
if (state_ != com .google .cloud .apigateway .v1 .Api .State .STATE_UNSPECIFIED .getNumber ()) {
890
779
size += com .google .protobuf .CodedOutputStream .computeEnumSize (12 , state_ );
891
780
}
892
- size += unknownFields .getSerializedSize ();
781
+ size += getUnknownFields () .getSerializedSize ();
893
782
memoizedSize = size ;
894
783
return size ;
895
784
}
@@ -917,7 +806,7 @@ public boolean equals(final java.lang.Object obj) {
917
806
if (!getDisplayName ().equals (other .getDisplayName ())) return false ;
918
807
if (!getManagedService ().equals (other .getManagedService ())) return false ;
919
808
if (state_ != other .state_ ) return false ;
920
- if (!unknownFields .equals (other .unknownFields )) return false ;
809
+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
921
810
return true ;
922
811
}
923
812
@@ -948,7 +837,7 @@ public int hashCode() {
948
837
hash = (53 * hash ) + getManagedService ().hashCode ();
949
838
hash = (37 * hash ) + STATE_FIELD_NUMBER ;
950
839
hash = (53 * hash ) + state_ ;
951
- hash = (29 * hash ) + unknownFields .hashCode ();
840
+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
952
841
memoizedHashCode = hash ;
953
842
return hash ;
954
843
}
@@ -1096,17 +985,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
1096
985
}
1097
986
1098
987
// Construct using com.google.cloud.apigateway.v1.Api.newBuilder()
1099
- private Builder () {
1100
- maybeForceBuilderInitialization ();
1101
- }
988
+ private Builder () {}
1102
989
1103
990
private Builder (com .google .protobuf .GeneratedMessageV3 .BuilderParent parent ) {
1104
991
super (parent );
1105
- maybeForceBuilderInitialization ();
1106
- }
1107
-
1108
- private void maybeForceBuilderInitialization () {
1109
- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {}
1110
992
}
1111
993
1112
994
@ java .lang .Override
@@ -1247,7 +1129,7 @@ public Builder mergeFrom(com.google.cloud.apigateway.v1.Api other) {
1247
1129
if (other .state_ != 0 ) {
1248
1130
setStateValue (other .getStateValue ());
1249
1131
}
1250
- this .mergeUnknownFields (other .unknownFields );
1132
+ this .mergeUnknownFields (other .getUnknownFields () );
1251
1133
onChanged ();
1252
1134
return this ;
1253
1135
}
@@ -1262,17 +1144,78 @@ public Builder mergeFrom(
1262
1144
com .google .protobuf .CodedInputStream input ,
1263
1145
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
1264
1146
throws java .io .IOException {
1265
- com .google .cloud .apigateway .v1 .Api parsedMessage = null ;
1147
+ if (extensionRegistry == null ) {
1148
+ throw new java .lang .NullPointerException ();
1149
+ }
1266
1150
try {
1267
- parsedMessage = PARSER .parsePartialFrom (input , extensionRegistry );
1151
+ boolean done = false ;
1152
+ while (!done ) {
1153
+ int tag = input .readTag ();
1154
+ switch (tag ) {
1155
+ case 0 :
1156
+ done = true ;
1157
+ break ;
1158
+ case 10 :
1159
+ {
1160
+ name_ = input .readStringRequireUtf8 ();
1161
+
1162
+ break ;
1163
+ } // case 10
1164
+ case 18 :
1165
+ {
1166
+ input .readMessage (getCreateTimeFieldBuilder ().getBuilder (), extensionRegistry );
1167
+
1168
+ break ;
1169
+ } // case 18
1170
+ case 26 :
1171
+ {
1172
+ input .readMessage (getUpdateTimeFieldBuilder ().getBuilder (), extensionRegistry );
1173
+
1174
+ break ;
1175
+ } // case 26
1176
+ case 34 :
1177
+ {
1178
+ com .google .protobuf .MapEntry <java .lang .String , java .lang .String > labels__ =
1179
+ input .readMessage (
1180
+ LabelsDefaultEntryHolder .defaultEntry .getParserForType (),
1181
+ extensionRegistry );
1182
+ internalGetMutableLabels ()
1183
+ .getMutableMap ()
1184
+ .put (labels__ .getKey (), labels__ .getValue ());
1185
+ break ;
1186
+ } // case 34
1187
+ case 42 :
1188
+ {
1189
+ displayName_ = input .readStringRequireUtf8 ();
1190
+
1191
+ break ;
1192
+ } // case 42
1193
+ case 58 :
1194
+ {
1195
+ managedService_ = input .readStringRequireUtf8 ();
1196
+
1197
+ break ;
1198
+ } // case 58
1199
+ case 96 :
1200
+ {
1201
+ state_ = input .readEnum ();
1202
+
1203
+ break ;
1204
+ } // case 96
1205
+ default :
1206
+ {
1207
+ if (!super .parseUnknownField (input , extensionRegistry , tag )) {
1208
+ done = true ; // was an endgroup tag
1209
+ }
1210
+ break ;
1211
+ } // default:
1212
+ } // switch (tag)
1213
+ } // while (!done)
1268
1214
} catch (com .google .protobuf .InvalidProtocolBufferException e ) {
1269
- parsedMessage = (com .google .cloud .apigateway .v1 .Api ) e .getUnfinishedMessage ();
1270
1215
throw e .unwrapIOException ();
1271
1216
} finally {
1272
- if (parsedMessage != null ) {
1273
- mergeFrom (parsedMessage );
1274
- }
1275
- }
1217
+ onChanged ();
1218
+ } // finally
1276
1219
return this ;
1277
1220
}
1278
1221
@@ -2333,7 +2276,18 @@ public Api parsePartialFrom(
2333
2276
com .google .protobuf .CodedInputStream input ,
2334
2277
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
2335
2278
throws com .google .protobuf .InvalidProtocolBufferException {
2336
- return new Api (input , extensionRegistry );
2279
+ Builder builder = newBuilder ();
2280
+ try {
2281
+ builder .mergeFrom (input , extensionRegistry );
2282
+ } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
2283
+ throw e .setUnfinishedMessage (builder .buildPartial ());
2284
+ } catch (com .google .protobuf .UninitializedMessageException e ) {
2285
+ throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (builder .buildPartial ());
2286
+ } catch (java .io .IOException e ) {
2287
+ throw new com .google .protobuf .InvalidProtocolBufferException (e )
2288
+ .setUnfinishedMessage (builder .buildPartial ());
2289
+ }
2290
+ return builder .buildPartial ();
2337
2291
}
2338
2292
};
2339
2293
0 commit comments