@@ -58,146 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
5858 return this .unknownFields ;
5959 }
6060
61- private Api (
62- com .google .protobuf .CodedInputStream input ,
63- com .google .protobuf .ExtensionRegistryLite extensionRegistry )
64- throws com .google .protobuf .InvalidProtocolBufferException {
65- this ();
66- if (extensionRegistry == null ) {
67- throw new java .lang .NullPointerException ();
68- }
69- int mutable_bitField0_ = 0 ;
70- com .google .protobuf .UnknownFieldSet .Builder unknownFields =
71- com .google .protobuf .UnknownFieldSet .newBuilder ();
72- try {
73- boolean done = false ;
74- while (!done ) {
75- int tag = input .readTag ();
76- switch (tag ) {
77- case 0 :
78- done = true ;
79- break ;
80- case 10 :
81- {
82- java .lang .String s = input .readStringRequireUtf8 ();
83-
84- name_ = s ;
85- break ;
86- }
87- case 18 :
88- {
89- java .lang .String s = input .readStringRequireUtf8 ();
90-
91- displayName_ = s ;
92- break ;
93- }
94- case 26 :
95- {
96- java .lang .String s = input .readStringRequireUtf8 ();
97-
98- description_ = s ;
99- break ;
100- }
101- case 34 :
102- {
103- com .google .protobuf .Timestamp .Builder subBuilder = null ;
104- if (createTime_ != null ) {
105- subBuilder = createTime_ .toBuilder ();
106- }
107- createTime_ =
108- input .readMessage (com .google .protobuf .Timestamp .parser (), extensionRegistry );
109- if (subBuilder != null ) {
110- subBuilder .mergeFrom (createTime_ );
111- createTime_ = subBuilder .buildPartial ();
112- }
113-
114- break ;
115- }
116- case 42 :
117- {
118- com .google .protobuf .Timestamp .Builder subBuilder = null ;
119- if (updateTime_ != null ) {
120- subBuilder = updateTime_ .toBuilder ();
121- }
122- updateTime_ =
123- input .readMessage (com .google .protobuf .Timestamp .parser (), extensionRegistry );
124- if (subBuilder != null ) {
125- subBuilder .mergeFrom (updateTime_ );
126- updateTime_ = subBuilder .buildPartial ();
127- }
128-
129- break ;
130- }
131- case 50 :
132- {
133- java .lang .String s = input .readStringRequireUtf8 ();
134-
135- availability_ = s ;
136- break ;
137- }
138- case 58 :
139- {
140- java .lang .String s = input .readStringRequireUtf8 ();
141-
142- recommendedVersion_ = s ;
143- break ;
144- }
145- case 66 :
146- {
147- java .lang .String s = input .readStringRequireUtf8 ();
148-
149- recommendedDeployment_ = s ;
150- break ;
151- }
152- case 74 :
153- {
154- if (!((mutable_bitField0_ & 0x00000001 ) != 0 )) {
155- labels_ =
156- com .google .protobuf .MapField .newMapField (LabelsDefaultEntryHolder .defaultEntry );
157- mutable_bitField0_ |= 0x00000001 ;
158- }
159- com .google .protobuf .MapEntry <java .lang .String , java .lang .String > labels__ =
160- input .readMessage (
161- LabelsDefaultEntryHolder .defaultEntry .getParserForType (), extensionRegistry );
162- labels_ .getMutableMap ().put (labels__ .getKey (), labels__ .getValue ());
163- break ;
164- }
165- case 82 :
166- {
167- if (!((mutable_bitField0_ & 0x00000002 ) != 0 )) {
168- annotations_ =
169- com .google .protobuf .MapField .newMapField (
170- AnnotationsDefaultEntryHolder .defaultEntry );
171- mutable_bitField0_ |= 0x00000002 ;
172- }
173- com .google .protobuf .MapEntry <java .lang .String , java .lang .String > annotations__ =
174- input .readMessage (
175- AnnotationsDefaultEntryHolder .defaultEntry .getParserForType (),
176- extensionRegistry );
177- annotations_ .getMutableMap ().put (annotations__ .getKey (), annotations__ .getValue ());
178- break ;
179- }
180- default :
181- {
182- if (!parseUnknownField (input , unknownFields , extensionRegistry , tag )) {
183- done = true ;
184- }
185- break ;
186- }
187- }
188- }
189- } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
190- throw e .setUnfinishedMessage (this );
191- } catch (com .google .protobuf .UninitializedMessageException e ) {
192- throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (this );
193- } catch (java .io .IOException e ) {
194- throw new com .google .protobuf .InvalidProtocolBufferException (e ).setUnfinishedMessage (this );
195- } finally {
196- this .unknownFields = unknownFields .build ();
197- makeExtensionsImmutable ();
198- }
199- }
200-
20161 public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
20262 return com .google .cloud .apigeeregistry .v1 .RegistryModelsProto
20363 .internal_static_google_cloud_apigeeregistry_v1_Api_descriptor ;
@@ -914,7 +774,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
914774 output , internalGetLabels (), LabelsDefaultEntryHolder .defaultEntry , 9 );
915775 com .google .protobuf .GeneratedMessageV3 .serializeStringMapTo (
916776 output , internalGetAnnotations (), AnnotationsDefaultEntryHolder .defaultEntry , 10 );
917- unknownFields .writeTo (output );
777+ getUnknownFields () .writeTo (output );
918778 }
919779
920780 @ java .lang .Override
@@ -967,7 +827,7 @@ public int getSerializedSize() {
967827 .build ();
968828 size += com .google .protobuf .CodedOutputStream .computeMessageSize (10 , annotations__ );
969829 }
970- size += unknownFields .getSerializedSize ();
830+ size += getUnknownFields () .getSerializedSize ();
971831 memoizedSize = size ;
972832 return size ;
973833 }
@@ -998,7 +858,7 @@ public boolean equals(final java.lang.Object obj) {
998858 if (!getRecommendedDeployment ().equals (other .getRecommendedDeployment ())) return false ;
999859 if (!internalGetLabels ().equals (other .internalGetLabels ())) return false ;
1000860 if (!internalGetAnnotations ().equals (other .internalGetAnnotations ())) return false ;
1001- if (!unknownFields .equals (other .unknownFields )) return false ;
861+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
1002862 return true ;
1003863 }
1004864
@@ -1037,7 +897,7 @@ public int hashCode() {
1037897 hash = (37 * hash ) + ANNOTATIONS_FIELD_NUMBER ;
1038898 hash = (53 * hash ) + internalGetAnnotations ().hashCode ();
1039899 }
1040- hash = (29 * hash ) + unknownFields .hashCode ();
900+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
1041901 memoizedHashCode = hash ;
1042902 return hash ;
1043903 }
@@ -1191,17 +1051,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
11911051 }
11921052
11931053 // Construct using com.google.cloud.apigeeregistry.v1.Api.newBuilder()
1194- private Builder () {
1195- maybeForceBuilderInitialization ();
1196- }
1054+ private Builder () {}
11971055
11981056 private Builder (com .google .protobuf .GeneratedMessageV3 .BuilderParent parent ) {
11991057 super (parent );
1200- maybeForceBuilderInitialization ();
1201- }
1202-
1203- private void maybeForceBuilderInitialization () {
1204- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {}
12051058 }
12061059
12071060 @ java .lang .Override
@@ -1362,7 +1215,7 @@ public Builder mergeFrom(com.google.cloud.apigeeregistry.v1.Api other) {
13621215 }
13631216 internalGetMutableLabels ().mergeFrom (other .internalGetLabels ());
13641217 internalGetMutableAnnotations ().mergeFrom (other .internalGetAnnotations ());
1365- this .mergeUnknownFields (other .unknownFields );
1218+ this .mergeUnknownFields (other .getUnknownFields () );
13661219 onChanged ();
13671220 return this ;
13681221 }
@@ -1377,17 +1230,101 @@ public Builder mergeFrom(
13771230 com .google .protobuf .CodedInputStream input ,
13781231 com .google .protobuf .ExtensionRegistryLite extensionRegistry )
13791232 throws java .io .IOException {
1380- com .google .cloud .apigeeregistry .v1 .Api parsedMessage = null ;
1233+ if (extensionRegistry == null ) {
1234+ throw new java .lang .NullPointerException ();
1235+ }
13811236 try {
1382- parsedMessage = PARSER .parsePartialFrom (input , extensionRegistry );
1237+ boolean done = false ;
1238+ while (!done ) {
1239+ int tag = input .readTag ();
1240+ switch (tag ) {
1241+ case 0 :
1242+ done = true ;
1243+ break ;
1244+ case 10 :
1245+ {
1246+ name_ = input .readStringRequireUtf8 ();
1247+
1248+ break ;
1249+ } // case 10
1250+ case 18 :
1251+ {
1252+ displayName_ = input .readStringRequireUtf8 ();
1253+
1254+ break ;
1255+ } // case 18
1256+ case 26 :
1257+ {
1258+ description_ = input .readStringRequireUtf8 ();
1259+
1260+ break ;
1261+ } // case 26
1262+ case 34 :
1263+ {
1264+ input .readMessage (getCreateTimeFieldBuilder ().getBuilder (), extensionRegistry );
1265+
1266+ break ;
1267+ } // case 34
1268+ case 42 :
1269+ {
1270+ input .readMessage (getUpdateTimeFieldBuilder ().getBuilder (), extensionRegistry );
1271+
1272+ break ;
1273+ } // case 42
1274+ case 50 :
1275+ {
1276+ availability_ = input .readStringRequireUtf8 ();
1277+
1278+ break ;
1279+ } // case 50
1280+ case 58 :
1281+ {
1282+ recommendedVersion_ = input .readStringRequireUtf8 ();
1283+
1284+ break ;
1285+ } // case 58
1286+ case 66 :
1287+ {
1288+ recommendedDeployment_ = input .readStringRequireUtf8 ();
1289+
1290+ break ;
1291+ } // case 66
1292+ case 74 :
1293+ {
1294+ com .google .protobuf .MapEntry <java .lang .String , java .lang .String > labels__ =
1295+ input .readMessage (
1296+ LabelsDefaultEntryHolder .defaultEntry .getParserForType (),
1297+ extensionRegistry );
1298+ internalGetMutableLabels ()
1299+ .getMutableMap ()
1300+ .put (labels__ .getKey (), labels__ .getValue ());
1301+ break ;
1302+ } // case 74
1303+ case 82 :
1304+ {
1305+ com .google .protobuf .MapEntry <java .lang .String , java .lang .String > annotations__ =
1306+ input .readMessage (
1307+ AnnotationsDefaultEntryHolder .defaultEntry .getParserForType (),
1308+ extensionRegistry );
1309+ internalGetMutableAnnotations ()
1310+ .getMutableMap ()
1311+ .put (annotations__ .getKey (), annotations__ .getValue ());
1312+ break ;
1313+ } // case 82
1314+ default :
1315+ {
1316+ if (!super .parseUnknownField (input , extensionRegistry , tag )) {
1317+ done = true ; // was an endgroup tag
1318+ }
1319+ break ;
1320+ } // default:
1321+ } // switch (tag)
1322+ } // while (!done)
13831323 } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
1384- parsedMessage = (com .google .cloud .apigeeregistry .v1 .Api ) e .getUnfinishedMessage ();
13851324 throw e .unwrapIOException ();
13861325 } finally {
1387- if (parsedMessage != null ) {
1388- mergeFrom (parsedMessage );
1389- }
1390- }
1326+ onChanged ();
1327+ } // finally
13911328 return this ;
13921329 }
13931330
@@ -2886,7 +2823,18 @@ public Api parsePartialFrom(
28862823 com .google .protobuf .CodedInputStream input ,
28872824 com .google .protobuf .ExtensionRegistryLite extensionRegistry )
28882825 throws com .google .protobuf .InvalidProtocolBufferException {
2889- return new Api (input , extensionRegistry );
2826+ Builder builder = newBuilder ();
2827+ try {
2828+ builder .mergeFrom (input , extensionRegistry );
2829+ } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
2830+ throw e .setUnfinishedMessage (builder .buildPartial ());
2831+ } catch (com .google .protobuf .UninitializedMessageException e ) {
2832+ throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (builder .buildPartial ());
2833+ } catch (java .io .IOException e ) {
2834+ throw new com .google .protobuf .InvalidProtocolBufferException (e )
2835+ .setUnfinishedMessage (builder .buildPartial ());
2836+ }
2837+ return builder .buildPartial ();
28902838 }
28912839 };
28922840
0 commit comments