@@ -55,117 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
5555 return this .unknownFields ;
5656 }
5757
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-
16958 public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
17059 return com .google .cloud .apigateway .v1 .Apigateway
17160 .internal_static_google_cloud_apigateway_v1_Api_descriptor ;
@@ -852,7 +741,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
852741 if (state_ != com .google .cloud .apigateway .v1 .Api .State .STATE_UNSPECIFIED .getNumber ()) {
853742 output .writeEnum (12 , state_ );
854743 }
855- unknownFields .writeTo (output );
744+ getUnknownFields () .writeTo (output );
856745 }
857746
858747 @ java .lang .Override
@@ -889,7 +778,7 @@ public int getSerializedSize() {
889778 if (state_ != com .google .cloud .apigateway .v1 .Api .State .STATE_UNSPECIFIED .getNumber ()) {
890779 size += com .google .protobuf .CodedOutputStream .computeEnumSize (12 , state_ );
891780 }
892- size += unknownFields .getSerializedSize ();
781+ size += getUnknownFields () .getSerializedSize ();
893782 memoizedSize = size ;
894783 return size ;
895784 }
@@ -917,7 +806,7 @@ public boolean equals(final java.lang.Object obj) {
917806 if (!getDisplayName ().equals (other .getDisplayName ())) return false ;
918807 if (!getManagedService ().equals (other .getManagedService ())) return false ;
919808 if (state_ != other .state_ ) return false ;
920- if (!unknownFields .equals (other .unknownFields )) return false ;
809+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
921810 return true ;
922811 }
923812
@@ -948,7 +837,7 @@ public int hashCode() {
948837 hash = (53 * hash ) + getManagedService ().hashCode ();
949838 hash = (37 * hash ) + STATE_FIELD_NUMBER ;
950839 hash = (53 * hash ) + state_ ;
951- hash = (29 * hash ) + unknownFields .hashCode ();
840+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
952841 memoizedHashCode = hash ;
953842 return hash ;
954843 }
@@ -1096,17 +985,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
1096985 }
1097986
1098987 // Construct using com.google.cloud.apigateway.v1.Api.newBuilder()
1099- private Builder () {
1100- maybeForceBuilderInitialization ();
1101- }
988+ private Builder () {}
1102989
1103990 private Builder (com .google .protobuf .GeneratedMessageV3 .BuilderParent parent ) {
1104991 super (parent );
1105- maybeForceBuilderInitialization ();
1106- }
1107-
1108- private void maybeForceBuilderInitialization () {
1109- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {}
1110992 }
1111993
1112994 @ java .lang .Override
@@ -1247,7 +1129,7 @@ public Builder mergeFrom(com.google.cloud.apigateway.v1.Api other) {
12471129 if (other .state_ != 0 ) {
12481130 setStateValue (other .getStateValue ());
12491131 }
1250- this .mergeUnknownFields (other .unknownFields );
1132+ this .mergeUnknownFields (other .getUnknownFields () );
12511133 onChanged ();
12521134 return this ;
12531135 }
@@ -1262,17 +1144,78 @@ public Builder mergeFrom(
12621144 com .google .protobuf .CodedInputStream input ,
12631145 com .google .protobuf .ExtensionRegistryLite extensionRegistry )
12641146 throws java .io .IOException {
1265- com .google .cloud .apigateway .v1 .Api parsedMessage = null ;
1147+ if (extensionRegistry == null ) {
1148+ throw new java .lang .NullPointerException ();
1149+ }
12661150 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)
12681214 } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
1269- parsedMessage = (com .google .cloud .apigateway .v1 .Api ) e .getUnfinishedMessage ();
12701215 throw e .unwrapIOException ();
12711216 } finally {
1272- if (parsedMessage != null ) {
1273- mergeFrom (parsedMessage );
1274- }
1275- }
1217+ onChanged ();
1218+ } // finally
12761219 return this ;
12771220 }
12781221
@@ -2333,7 +2276,18 @@ public Api parsePartialFrom(
23332276 com .google .protobuf .CodedInputStream input ,
23342277 com .google .protobuf .ExtensionRegistryLite extensionRegistry )
23352278 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 ();
23372291 }
23382292 };
23392293
0 commit comments