@@ -102,95 +102,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
102
102
return this .unknownFields ;
103
103
}
104
104
105
- private AppEngineHttpRequest (
106
- com .google .protobuf .CodedInputStream input ,
107
- com .google .protobuf .ExtensionRegistryLite extensionRegistry )
108
- throws com .google .protobuf .InvalidProtocolBufferException {
109
- this ();
110
- if (extensionRegistry == null ) {
111
- throw new java .lang .NullPointerException ();
112
- }
113
- int mutable_bitField0_ = 0 ;
114
- com .google .protobuf .UnknownFieldSet .Builder unknownFields =
115
- com .google .protobuf .UnknownFieldSet .newBuilder ();
116
- try {
117
- boolean done = false ;
118
- while (!done ) {
119
- int tag = input .readTag ();
120
- switch (tag ) {
121
- case 0 :
122
- done = true ;
123
- break ;
124
- case 8 :
125
- {
126
- int rawValue = input .readEnum ();
127
-
128
- httpMethod_ = rawValue ;
129
- break ;
130
- }
131
- case 18 :
132
- {
133
- com .google .cloud .tasks .v2 .AppEngineRouting .Builder subBuilder = null ;
134
- if (appEngineRouting_ != null ) {
135
- subBuilder = appEngineRouting_ .toBuilder ();
136
- }
137
- appEngineRouting_ =
138
- input .readMessage (
139
- com .google .cloud .tasks .v2 .AppEngineRouting .parser (), extensionRegistry );
140
- if (subBuilder != null ) {
141
- subBuilder .mergeFrom (appEngineRouting_ );
142
- appEngineRouting_ = subBuilder .buildPartial ();
143
- }
144
-
145
- break ;
146
- }
147
- case 26 :
148
- {
149
- java .lang .String s = input .readStringRequireUtf8 ();
150
-
151
- relativeUri_ = s ;
152
- break ;
153
- }
154
- case 34 :
155
- {
156
- if (!((mutable_bitField0_ & 0x00000001 ) != 0 )) {
157
- headers_ =
158
- com .google .protobuf .MapField .newMapField (
159
- HeadersDefaultEntryHolder .defaultEntry );
160
- mutable_bitField0_ |= 0x00000001 ;
161
- }
162
- com .google .protobuf .MapEntry <java .lang .String , java .lang .String > headers__ =
163
- input .readMessage (
164
- HeadersDefaultEntryHolder .defaultEntry .getParserForType (), extensionRegistry );
165
- headers_ .getMutableMap ().put (headers__ .getKey (), headers__ .getValue ());
166
- break ;
167
- }
168
- case 42 :
169
- {
170
- body_ = input .readBytes ();
171
- break ;
172
- }
173
- default :
174
- {
175
- if (!parseUnknownField (input , unknownFields , extensionRegistry , tag )) {
176
- done = true ;
177
- }
178
- break ;
179
- }
180
- }
181
- }
182
- } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
183
- throw e .setUnfinishedMessage (this );
184
- } catch (com .google .protobuf .UninitializedMessageException e ) {
185
- throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (this );
186
- } catch (java .io .IOException e ) {
187
- throw new com .google .protobuf .InvalidProtocolBufferException (e ).setUnfinishedMessage (this );
188
- } finally {
189
- this .unknownFields = unknownFields .build ();
190
- makeExtensionsImmutable ();
191
- }
192
- }
193
-
194
105
public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
195
106
return com .google .cloud .tasks .v2 .TargetProto
196
107
.internal_static_google_cloud_tasks_v2_AppEngineHttpRequest_descriptor ;
@@ -662,7 +573,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
662
573
if (!body_ .isEmpty ()) {
663
574
output .writeBytes (5 , body_ );
664
575
}
665
- unknownFields .writeTo (output );
576
+ getUnknownFields () .writeTo (output );
666
577
}
667
578
668
579
@ java .lang .Override
@@ -693,7 +604,7 @@ public int getSerializedSize() {
693
604
if (!body_ .isEmpty ()) {
694
605
size += com .google .protobuf .CodedOutputStream .computeBytesSize (5 , body_ );
695
606
}
696
- size += unknownFields .getSerializedSize ();
607
+ size += getUnknownFields () .getSerializedSize ();
697
608
memoizedSize = size ;
698
609
return size ;
699
610
}
@@ -717,7 +628,7 @@ public boolean equals(final java.lang.Object obj) {
717
628
if (!getRelativeUri ().equals (other .getRelativeUri ())) return false ;
718
629
if (!internalGetHeaders ().equals (other .internalGetHeaders ())) return false ;
719
630
if (!getBody ().equals (other .getBody ())) return false ;
720
- if (!unknownFields .equals (other .unknownFields )) return false ;
631
+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
721
632
return true ;
722
633
}
723
634
@@ -742,7 +653,7 @@ public int hashCode() {
742
653
}
743
654
hash = (37 * hash ) + BODY_FIELD_NUMBER ;
744
655
hash = (53 * hash ) + getBody ().hashCode ();
745
- hash = (29 * hash ) + unknownFields .hashCode ();
656
+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
746
657
memoizedHashCode = hash ;
747
658
return hash ;
748
659
}
@@ -939,17 +850,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
939
850
}
940
851
941
852
// Construct using com.google.cloud.tasks.v2.AppEngineHttpRequest.newBuilder()
942
- private Builder () {
943
- maybeForceBuilderInitialization ();
944
- }
853
+ private Builder () {}
945
854
946
855
private Builder (com .google .protobuf .GeneratedMessageV3 .BuilderParent parent ) {
947
856
super (parent );
948
- maybeForceBuilderInitialization ();
949
- }
950
-
951
- private void maybeForceBuilderInitialization () {
952
- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {}
953
857
}
954
858
955
859
@ java .lang .Override
@@ -1069,7 +973,7 @@ public Builder mergeFrom(com.google.cloud.tasks.v2.AppEngineHttpRequest other) {
1069
973
if (other .getBody () != com .google .protobuf .ByteString .EMPTY ) {
1070
974
setBody (other .getBody ());
1071
975
}
1072
- this .mergeUnknownFields (other .unknownFields );
976
+ this .mergeUnknownFields (other .getUnknownFields () );
1073
977
onChanged ();
1074
978
return this ;
1075
979
}
@@ -1084,17 +988,67 @@ public Builder mergeFrom(
1084
988
com .google .protobuf .CodedInputStream input ,
1085
989
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
1086
990
throws java .io .IOException {
1087
- com .google .cloud .tasks .v2 .AppEngineHttpRequest parsedMessage = null ;
991
+ if (extensionRegistry == null ) {
992
+ throw new java .lang .NullPointerException ();
993
+ }
1088
994
try {
1089
- parsedMessage = PARSER .parsePartialFrom (input , extensionRegistry );
995
+ boolean done = false ;
996
+ while (!done ) {
997
+ int tag = input .readTag ();
998
+ switch (tag ) {
999
+ case 0 :
1000
+ done = true ;
1001
+ break ;
1002
+ case 8 :
1003
+ {
1004
+ httpMethod_ = input .readEnum ();
1005
+
1006
+ break ;
1007
+ } // case 8
1008
+ case 18 :
1009
+ {
1010
+ input .readMessage (
1011
+ getAppEngineRoutingFieldBuilder ().getBuilder (), extensionRegistry );
1012
+
1013
+ break ;
1014
+ } // case 18
1015
+ case 26 :
1016
+ {
1017
+ relativeUri_ = input .readStringRequireUtf8 ();
1018
+
1019
+ break ;
1020
+ } // case 26
1021
+ case 34 :
1022
+ {
1023
+ com .google .protobuf .MapEntry <java .lang .String , java .lang .String > headers__ =
1024
+ input .readMessage (
1025
+ HeadersDefaultEntryHolder .defaultEntry .getParserForType (),
1026
+ extensionRegistry );
1027
+ internalGetMutableHeaders ()
1028
+ .getMutableMap ()
1029
+ .put (headers__ .getKey (), headers__ .getValue ());
1030
+ break ;
1031
+ } // case 34
1032
+ case 42 :
1033
+ {
1034
+ body_ = input .readBytes ();
1035
+
1036
+ break ;
1037
+ } // case 42
1038
+ default :
1039
+ {
1040
+ if (!super .parseUnknownField (input , extensionRegistry , tag )) {
1041
+ done = true ; // was an endgroup tag
1042
+ }
1043
+ break ;
1044
+ } // default:
1045
+ } // switch (tag)
1046
+ } // while (!done)
1090
1047
} catch (com .google .protobuf .InvalidProtocolBufferException e ) {
1091
- parsedMessage = (com .google .cloud .tasks .v2 .AppEngineHttpRequest ) e .getUnfinishedMessage ();
1092
1048
throw e .unwrapIOException ();
1093
1049
} finally {
1094
- if (parsedMessage != null ) {
1095
- mergeFrom (parsedMessage );
1096
- }
1097
- }
1050
+ onChanged ();
1051
+ } // finally
1098
1052
return this ;
1099
1053
}
1100
1054
@@ -2059,7 +2013,18 @@ public AppEngineHttpRequest parsePartialFrom(
2059
2013
com .google .protobuf .CodedInputStream input ,
2060
2014
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
2061
2015
throws com .google .protobuf .InvalidProtocolBufferException {
2062
- return new AppEngineHttpRequest (input , extensionRegistry );
2016
+ Builder builder = newBuilder ();
2017
+ try {
2018
+ builder .mergeFrom (input , extensionRegistry );
2019
+ } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
2020
+ throw e .setUnfinishedMessage (builder .buildPartial ());
2021
+ } catch (com .google .protobuf .UninitializedMessageException e ) {
2022
+ throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (builder .buildPartial ());
2023
+ } catch (java .io .IOException e ) {
2024
+ throw new com .google .protobuf .InvalidProtocolBufferException (e )
2025
+ .setUnfinishedMessage (builder .buildPartial ());
2026
+ }
2027
+ return builder .buildPartial ();
2063
2028
}
2064
2029
};
2065
2030
0 commit comments