/src/brpc/build/test/echo.pb.cc
Line | Count | Source |
1 | | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | | // source: echo.proto |
3 | | |
4 | | #include "echo.pb.h" |
5 | | |
6 | | #include <algorithm> |
7 | | |
8 | | #include <google/protobuf/stubs/common.h> |
9 | | #include <google/protobuf/stubs/port.h> |
10 | | #include <google/protobuf/io/coded_stream.h> |
11 | | #include <google/protobuf/wire_format_lite_inl.h> |
12 | | #include <google/protobuf/descriptor.h> |
13 | | #include <google/protobuf/generated_message_reflection.h> |
14 | | #include <google/protobuf/reflection_ops.h> |
15 | | #include <google/protobuf/wire_format.h> |
16 | | // This is a temporary google only hack |
17 | | #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
18 | | #include "third_party/protobuf/version.h" |
19 | | #endif |
20 | | // @@protoc_insertion_point(includes) |
21 | | |
22 | | namespace protobuf_echo_2eproto { |
23 | | extern PROTOBUF_INTERNAL_EXPORT_protobuf_echo_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_EchoRequest; |
24 | | extern PROTOBUF_INTERNAL_EXPORT_protobuf_echo_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_EchoResponse; |
25 | | extern PROTOBUF_INTERNAL_EXPORT_protobuf_echo_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_RecursiveMessage; |
26 | | } // namespace protobuf_echo_2eproto |
27 | | namespace test { |
28 | | class EchoRequestDefaultTypeInternal { |
29 | | public: |
30 | | ::google::protobuf::internal::ExplicitlyConstructed<EchoRequest> |
31 | | _instance; |
32 | | } _EchoRequest_default_instance_; |
33 | | class EchoResponseDefaultTypeInternal { |
34 | | public: |
35 | | ::google::protobuf::internal::ExplicitlyConstructed<EchoResponse> |
36 | | _instance; |
37 | | } _EchoResponse_default_instance_; |
38 | | class ComboRequestDefaultTypeInternal { |
39 | | public: |
40 | | ::google::protobuf::internal::ExplicitlyConstructed<ComboRequest> |
41 | | _instance; |
42 | | } _ComboRequest_default_instance_; |
43 | | class BytesRequestDefaultTypeInternal { |
44 | | public: |
45 | | ::google::protobuf::internal::ExplicitlyConstructed<BytesRequest> |
46 | | _instance; |
47 | | } _BytesRequest_default_instance_; |
48 | | class BytesResponseDefaultTypeInternal { |
49 | | public: |
50 | | ::google::protobuf::internal::ExplicitlyConstructed<BytesResponse> |
51 | | _instance; |
52 | | } _BytesResponse_default_instance_; |
53 | | class ComboResponseDefaultTypeInternal { |
54 | | public: |
55 | | ::google::protobuf::internal::ExplicitlyConstructed<ComboResponse> |
56 | | _instance; |
57 | | } _ComboResponse_default_instance_; |
58 | | class HttpRequestDefaultTypeInternal { |
59 | | public: |
60 | | ::google::protobuf::internal::ExplicitlyConstructed<HttpRequest> |
61 | | _instance; |
62 | | } _HttpRequest_default_instance_; |
63 | | class HttpResponseDefaultTypeInternal { |
64 | | public: |
65 | | ::google::protobuf::internal::ExplicitlyConstructed<HttpResponse> |
66 | | _instance; |
67 | | } _HttpResponse_default_instance_; |
68 | | class Message1DefaultTypeInternal { |
69 | | public: |
70 | | ::google::protobuf::internal::ExplicitlyConstructed<Message1> |
71 | | _instance; |
72 | | } _Message1_default_instance_; |
73 | | class Message2DefaultTypeInternal { |
74 | | public: |
75 | | ::google::protobuf::internal::ExplicitlyConstructed<Message2> |
76 | | _instance; |
77 | | } _Message2_default_instance_; |
78 | | class RecursiveMessageDefaultTypeInternal { |
79 | | public: |
80 | | ::google::protobuf::internal::ExplicitlyConstructed<RecursiveMessage> |
81 | | _instance; |
82 | | } _RecursiveMessage_default_instance_; |
83 | | } // namespace test |
84 | | namespace protobuf_echo_2eproto { |
85 | 2 | static void InitDefaultsEchoRequest() { |
86 | 2 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
87 | | |
88 | 2 | { |
89 | 2 | void* ptr = &::test::_EchoRequest_default_instance_; |
90 | 2 | new (ptr) ::test::EchoRequest(); |
91 | 2 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
92 | 2 | } |
93 | 2 | ::test::EchoRequest::InitAsDefaultInstance(); |
94 | 2 | } |
95 | | |
96 | | ::google::protobuf::internal::SCCInfo<0> scc_info_EchoRequest = |
97 | | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsEchoRequest}, {}}; |
98 | | |
99 | 2 | static void InitDefaultsEchoResponse() { |
100 | 2 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
101 | | |
102 | 2 | { |
103 | 2 | void* ptr = &::test::_EchoResponse_default_instance_; |
104 | 2 | new (ptr) ::test::EchoResponse(); |
105 | 2 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
106 | 2 | } |
107 | 2 | ::test::EchoResponse::InitAsDefaultInstance(); |
108 | 2 | } |
109 | | |
110 | | ::google::protobuf::internal::SCCInfo<0> scc_info_EchoResponse = |
111 | | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsEchoResponse}, {}}; |
112 | | |
113 | 2 | static void InitDefaultsComboRequest() { |
114 | 2 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
115 | | |
116 | 2 | { |
117 | 2 | void* ptr = &::test::_ComboRequest_default_instance_; |
118 | 2 | new (ptr) ::test::ComboRequest(); |
119 | 2 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
120 | 2 | } |
121 | 2 | ::test::ComboRequest::InitAsDefaultInstance(); |
122 | 2 | } |
123 | | |
124 | | ::google::protobuf::internal::SCCInfo<1> scc_info_ComboRequest = |
125 | | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsComboRequest}, { |
126 | | &protobuf_echo_2eproto::scc_info_EchoRequest.base,}}; |
127 | | |
128 | 2 | static void InitDefaultsBytesRequest() { |
129 | 2 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
130 | | |
131 | 2 | { |
132 | 2 | void* ptr = &::test::_BytesRequest_default_instance_; |
133 | 2 | new (ptr) ::test::BytesRequest(); |
134 | 2 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
135 | 2 | } |
136 | 2 | ::test::BytesRequest::InitAsDefaultInstance(); |
137 | 2 | } |
138 | | |
139 | | ::google::protobuf::internal::SCCInfo<0> scc_info_BytesRequest = |
140 | | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsBytesRequest}, {}}; |
141 | | |
142 | 2 | static void InitDefaultsBytesResponse() { |
143 | 2 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
144 | | |
145 | 2 | { |
146 | 2 | void* ptr = &::test::_BytesResponse_default_instance_; |
147 | 2 | new (ptr) ::test::BytesResponse(); |
148 | 2 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
149 | 2 | } |
150 | 2 | ::test::BytesResponse::InitAsDefaultInstance(); |
151 | 2 | } |
152 | | |
153 | | ::google::protobuf::internal::SCCInfo<0> scc_info_BytesResponse = |
154 | | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsBytesResponse}, {}}; |
155 | | |
156 | 2 | static void InitDefaultsComboResponse() { |
157 | 2 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
158 | | |
159 | 2 | { |
160 | 2 | void* ptr = &::test::_ComboResponse_default_instance_; |
161 | 2 | new (ptr) ::test::ComboResponse(); |
162 | 2 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
163 | 2 | } |
164 | 2 | ::test::ComboResponse::InitAsDefaultInstance(); |
165 | 2 | } |
166 | | |
167 | | ::google::protobuf::internal::SCCInfo<1> scc_info_ComboResponse = |
168 | | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsComboResponse}, { |
169 | | &protobuf_echo_2eproto::scc_info_EchoResponse.base,}}; |
170 | | |
171 | 2 | static void InitDefaultsHttpRequest() { |
172 | 2 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
173 | | |
174 | 2 | { |
175 | 2 | void* ptr = &::test::_HttpRequest_default_instance_; |
176 | 2 | new (ptr) ::test::HttpRequest(); |
177 | 2 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
178 | 2 | } |
179 | 2 | ::test::HttpRequest::InitAsDefaultInstance(); |
180 | 2 | } |
181 | | |
182 | | ::google::protobuf::internal::SCCInfo<0> scc_info_HttpRequest = |
183 | | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsHttpRequest}, {}}; |
184 | | |
185 | 2 | static void InitDefaultsHttpResponse() { |
186 | 2 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
187 | | |
188 | 2 | { |
189 | 2 | void* ptr = &::test::_HttpResponse_default_instance_; |
190 | 2 | new (ptr) ::test::HttpResponse(); |
191 | 2 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
192 | 2 | } |
193 | 2 | ::test::HttpResponse::InitAsDefaultInstance(); |
194 | 2 | } |
195 | | |
196 | | ::google::protobuf::internal::SCCInfo<0> scc_info_HttpResponse = |
197 | | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsHttpResponse}, {}}; |
198 | | |
199 | 2 | static void InitDefaultsMessage1() { |
200 | 2 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
201 | | |
202 | 2 | { |
203 | 2 | void* ptr = &::test::_Message1_default_instance_; |
204 | 2 | new (ptr) ::test::Message1(); |
205 | 2 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
206 | 2 | } |
207 | 2 | ::test::Message1::InitAsDefaultInstance(); |
208 | 2 | } |
209 | | |
210 | | ::google::protobuf::internal::SCCInfo<0> scc_info_Message1 = |
211 | | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMessage1}, {}}; |
212 | | |
213 | 2 | static void InitDefaultsMessage2() { |
214 | 2 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
215 | | |
216 | 2 | { |
217 | 2 | void* ptr = &::test::_Message2_default_instance_; |
218 | 2 | new (ptr) ::test::Message2(); |
219 | 2 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
220 | 2 | } |
221 | 2 | ::test::Message2::InitAsDefaultInstance(); |
222 | 2 | } |
223 | | |
224 | | ::google::protobuf::internal::SCCInfo<0> scc_info_Message2 = |
225 | | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsMessage2}, {}}; |
226 | | |
227 | 2 | static void InitDefaultsRecursiveMessage() { |
228 | 2 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
229 | | |
230 | 2 | { |
231 | 2 | void* ptr = &::test::_RecursiveMessage_default_instance_; |
232 | 2 | new (ptr) ::test::RecursiveMessage(); |
233 | 2 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
234 | 2 | } |
235 | 2 | ::test::RecursiveMessage::InitAsDefaultInstance(); |
236 | 2 | } |
237 | | |
238 | | ::google::protobuf::internal::SCCInfo<0> scc_info_RecursiveMessage = |
239 | | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsRecursiveMessage}, {}}; |
240 | | |
241 | 2 | void InitDefaults() { |
242 | 2 | ::google::protobuf::internal::InitSCC(&scc_info_EchoRequest.base); |
243 | 2 | ::google::protobuf::internal::InitSCC(&scc_info_EchoResponse.base); |
244 | 2 | ::google::protobuf::internal::InitSCC(&scc_info_ComboRequest.base); |
245 | 2 | ::google::protobuf::internal::InitSCC(&scc_info_BytesRequest.base); |
246 | 2 | ::google::protobuf::internal::InitSCC(&scc_info_BytesResponse.base); |
247 | 2 | ::google::protobuf::internal::InitSCC(&scc_info_ComboResponse.base); |
248 | 2 | ::google::protobuf::internal::InitSCC(&scc_info_HttpRequest.base); |
249 | 2 | ::google::protobuf::internal::InitSCC(&scc_info_HttpResponse.base); |
250 | 2 | ::google::protobuf::internal::InitSCC(&scc_info_Message1.base); |
251 | 2 | ::google::protobuf::internal::InitSCC(&scc_info_Message2.base); |
252 | 2 | ::google::protobuf::internal::InitSCC(&scc_info_RecursiveMessage.base); |
253 | 2 | } |
254 | | |
255 | | ::google::protobuf::Metadata file_level_metadata[11]; |
256 | | const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[2]; |
257 | | const ::google::protobuf::ServiceDescriptor* file_level_service_descriptors[7]; |
258 | | |
259 | | const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { |
260 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::EchoRequest, _has_bits_), |
261 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::EchoRequest, _internal_metadata_), |
262 | | ~0u, // no _extensions_ |
263 | | ~0u, // no _oneof_case_ |
264 | | ~0u, // no _weak_field_map_ |
265 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::EchoRequest, message_), |
266 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::EchoRequest, code_), |
267 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::EchoRequest, close_fd_), |
268 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::EchoRequest, sleep_us_), |
269 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::EchoRequest, server_fail_), |
270 | | 0, |
271 | | 1, |
272 | | 2, |
273 | | 3, |
274 | | 4, |
275 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::EchoResponse, _has_bits_), |
276 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::EchoResponse, _internal_metadata_), |
277 | | ~0u, // no _extensions_ |
278 | | ~0u, // no _oneof_case_ |
279 | | ~0u, // no _weak_field_map_ |
280 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::EchoResponse, message_), |
281 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::EchoResponse, code_list_), |
282 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::EchoResponse, receiving_socket_id_), |
283 | | 0, |
284 | | ~0u, |
285 | | 1, |
286 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::ComboRequest, _has_bits_), |
287 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::ComboRequest, _internal_metadata_), |
288 | | ~0u, // no _extensions_ |
289 | | ~0u, // no _oneof_case_ |
290 | | ~0u, // no _weak_field_map_ |
291 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::ComboRequest, requests_), |
292 | | ~0u, |
293 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::BytesRequest, _has_bits_), |
294 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::BytesRequest, _internal_metadata_), |
295 | | ~0u, // no _extensions_ |
296 | | ~0u, // no _oneof_case_ |
297 | | ~0u, // no _weak_field_map_ |
298 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::BytesRequest, databytes_), |
299 | | 0, |
300 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::BytesResponse, _has_bits_), |
301 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::BytesResponse, _internal_metadata_), |
302 | | ~0u, // no _extensions_ |
303 | | ~0u, // no _oneof_case_ |
304 | | ~0u, // no _weak_field_map_ |
305 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::BytesResponse, databytes_), |
306 | | 0, |
307 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::ComboResponse, _has_bits_), |
308 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::ComboResponse, _internal_metadata_), |
309 | | ~0u, // no _extensions_ |
310 | | ~0u, // no _oneof_case_ |
311 | | ~0u, // no _weak_field_map_ |
312 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::ComboResponse, responses_), |
313 | | ~0u, |
314 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::HttpRequest, _has_bits_), |
315 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::HttpRequest, _internal_metadata_), |
316 | | ~0u, // no _extensions_ |
317 | | ~0u, // no _oneof_case_ |
318 | | ~0u, // no _weak_field_map_ |
319 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::HttpResponse, _has_bits_), |
320 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::HttpResponse, _internal_metadata_), |
321 | | ~0u, // no _extensions_ |
322 | | ~0u, // no _oneof_case_ |
323 | | ~0u, // no _weak_field_map_ |
324 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::Message1, _has_bits_), |
325 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::Message1, _internal_metadata_), |
326 | | ~0u, // no _extensions_ |
327 | | ~0u, // no _oneof_case_ |
328 | | ~0u, // no _weak_field_map_ |
329 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::Message1, stat_), |
330 | | 0, |
331 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::Message2, _has_bits_), |
332 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::Message2, _internal_metadata_), |
333 | | ~0u, // no _extensions_ |
334 | | ~0u, // no _oneof_case_ |
335 | | ~0u, // no _weak_field_map_ |
336 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::Message2, stat_), |
337 | | 0, |
338 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::RecursiveMessage, _has_bits_), |
339 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::RecursiveMessage, _internal_metadata_), |
340 | | ~0u, // no _extensions_ |
341 | | ~0u, // no _oneof_case_ |
342 | | ~0u, // no _weak_field_map_ |
343 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::RecursiveMessage, child_), |
344 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::test::RecursiveMessage, data_), |
345 | | 1, |
346 | | 0, |
347 | | }; |
348 | | static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { |
349 | | { 0, 10, sizeof(::test::EchoRequest)}, |
350 | | { 15, 23, sizeof(::test::EchoResponse)}, |
351 | | { 26, 32, sizeof(::test::ComboRequest)}, |
352 | | { 33, 39, sizeof(::test::BytesRequest)}, |
353 | | { 40, 46, sizeof(::test::BytesResponse)}, |
354 | | { 47, 53, sizeof(::test::ComboResponse)}, |
355 | | { 54, 59, sizeof(::test::HttpRequest)}, |
356 | | { 59, 64, sizeof(::test::HttpResponse)}, |
357 | | { 64, 70, sizeof(::test::Message1)}, |
358 | | { 71, 77, sizeof(::test::Message2)}, |
359 | | { 78, 85, sizeof(::test::RecursiveMessage)}, |
360 | | }; |
361 | | |
362 | | static ::google::protobuf::Message const * const file_default_instances[] = { |
363 | | reinterpret_cast<const ::google::protobuf::Message*>(&::test::_EchoRequest_default_instance_), |
364 | | reinterpret_cast<const ::google::protobuf::Message*>(&::test::_EchoResponse_default_instance_), |
365 | | reinterpret_cast<const ::google::protobuf::Message*>(&::test::_ComboRequest_default_instance_), |
366 | | reinterpret_cast<const ::google::protobuf::Message*>(&::test::_BytesRequest_default_instance_), |
367 | | reinterpret_cast<const ::google::protobuf::Message*>(&::test::_BytesResponse_default_instance_), |
368 | | reinterpret_cast<const ::google::protobuf::Message*>(&::test::_ComboResponse_default_instance_), |
369 | | reinterpret_cast<const ::google::protobuf::Message*>(&::test::_HttpRequest_default_instance_), |
370 | | reinterpret_cast<const ::google::protobuf::Message*>(&::test::_HttpResponse_default_instance_), |
371 | | reinterpret_cast<const ::google::protobuf::Message*>(&::test::_Message1_default_instance_), |
372 | | reinterpret_cast<const ::google::protobuf::Message*>(&::test::_Message2_default_instance_), |
373 | | reinterpret_cast<const ::google::protobuf::Message*>(&::test::_RecursiveMessage_default_instance_), |
374 | | }; |
375 | | |
376 | 0 | void protobuf_AssignDescriptors() { |
377 | 0 | AddDescriptors(); |
378 | 0 | AssignDescriptors( |
379 | 0 | "echo.proto", schemas, file_default_instances, TableStruct::offsets, |
380 | 0 | file_level_metadata, file_level_enum_descriptors, file_level_service_descriptors); |
381 | 0 | } |
382 | | |
383 | 0 | void protobuf_AssignDescriptorsOnce() { |
384 | 0 | static ::google::protobuf::internal::once_flag once; |
385 | 0 | ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors); |
386 | 0 | } |
387 | | |
388 | | void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD; |
389 | 0 | void protobuf_RegisterTypes(const ::std::string&) { |
390 | 0 | protobuf_AssignDescriptorsOnce(); |
391 | 0 | ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 11); |
392 | 0 | } |
393 | | |
394 | 2 | void AddDescriptorsImpl() { |
395 | 2 | InitDefaults(); |
396 | 2 | static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { |
397 | 2 | "\n\necho.proto\022\004test\032\021idl_options.proto\"e\n" |
398 | 2 | "\013EchoRequest\022\017\n\007message\030\001 \002(\t\022\014\n\004code\030\002 " |
399 | 2 | "\001(\005\022\020\n\010close_fd\030\003 \001(\010\022\020\n\010sleep_us\030\004 \001(\005\022" |
400 | 2 | "\023\n\013server_fail\030\005 \001(\005\"O\n\014EchoResponse\022\017\n\007" |
401 | 2 | "message\030\001 \002(\t\022\021\n\tcode_list\030\002 \003(\005\022\033\n\023rece" |
402 | 2 | "iving_socket_id\030\003 \001(\004\"3\n\014ComboRequest\022#\n" |
403 | 2 | "\010requests\030\001 \003(\0132\021.test.EchoRequest\"!\n\014By" |
404 | 2 | "tesRequest\022\021\n\tdatabytes\030\001 \002(\014\"\"\n\rBytesRe" |
405 | 2 | "sponse\022\021\n\tdatabytes\030\001 \002(\014\"6\n\rComboRespon" |
406 | 2 | "se\022%\n\tresponses\030\001 \003(\0132\022.test.EchoRespons" |
407 | 2 | "e\"\r\n\013HttpRequest\"\016\n\014HttpResponse\"&\n\010Mess" |
408 | 2 | "age1\022\032\n\004stat\030\001 \002(\0162\014.test.State0\"&\n\010Mess" |
409 | 2 | "age2\022\032\n\004stat\030\001 \002(\0162\014.test.State1\"G\n\020Recu" |
410 | 2 | "rsiveMessage\022%\n\005child\030\001 \001(\0132\026.test.Recur" |
411 | 2 | "siveMessage\022\014\n\004data\030\002 \001(\t*>\n\006State0\022\020\n\014S" |
412 | 2 | "TATE0_NUM_0\020\000\022\020\n\014STATE0_NUM_1\020\001\022\020\n\014STATE" |
413 | 2 | "0_NUM_2\020\002*,\n\006State1\022\020\n\014STATE1_NUM_0\020\000\022\020\n" |
414 | 2 | "\014STATE1_NUM_1\020\0012\340\001\n\013EchoService\022-\n\004Echo\022" |
415 | 2 | "\021.test.EchoRequest\032\022.test.EchoResponse\0224" |
416 | 2 | "\n\tComboEcho\022\022.test.ComboRequest\032\023.test.C" |
417 | 2 | "omboResponse\0225\n\nBytesEcho1\022\022.test.BytesR" |
418 | 2 | "equest\032\023.test.BytesResponse\0225\n\nBytesEcho" |
419 | 2 | "2\022\022.test.BytesRequest\032\023.test.BytesRespon" |
420 | 2 | "se2}\n\017DownloadService\0221\n\010Download\022\021.test" |
421 | 2 | ".HttpRequest\032\022.test.HttpResponse\0227\n\016Down" |
422 | 2 | "loadFailed\022\021.test.HttpRequest\032\022.test.Htt" |
423 | 2 | "pResponse2w\n\rUploadService\022/\n\006Upload\022\021.t" |
424 | 2 | "est.HttpRequest\032\022.test.HttpResponse\0225\n\014U" |
425 | 2 | "ploadFailed\022\021.test.HttpRequest\032\022.test.Ht" |
426 | 2 | "tpResponse2w\n\021UserNamingService\0222\n\tListN" |
427 | 2 | "ames\022\021.test.HttpRequest\032\022.test.HttpRespo" |
428 | 2 | "nse\022.\n\005Touch\022\021.test.HttpRequest\032\022.test.H" |
429 | 2 | "ttpResponse2\215\002\n\026DiscoveryNamingService\022." |
430 | 2 | "\n\005Nodes\022\021.test.HttpRequest\032\022.test.HttpRe" |
431 | 2 | "sponse\022/\n\006Fetchs\022\021.test.HttpRequest\032\022.te" |
432 | 2 | "st.HttpResponse\0221\n\010Register\022\021.test.HttpR" |
433 | 2 | "equest\032\022.test.HttpResponse\022.\n\005Renew\022\021.te" |
434 | 2 | "st.HttpRequest\032\022.test.HttpResponse\022/\n\006Ca" |
435 | 2 | "ncel\022\021.test.HttpRequest\032\022.test.HttpRespo" |
436 | 2 | "nse2s\n\022NacosNamingService\022.\n\005Login\022\021.tes" |
437 | 2 | "t.HttpRequest\032\022.test.HttpResponse\022-\n\004Lis" |
438 | 2 | "t\022\021.test.HttpRequest\032\022.test.HttpResponse" |
439 | 2 | "2m\n\013HttpService\022-\n\004Head\022\021.test.HttpReque" |
440 | 2 | "st\032\022.test.HttpResponse\022/\n\006Expect\022\021.test." |
441 | 2 | "HttpRequest\032\022.test.HttpResponseB\007\200\001\001\300\267,\001" |
442 | 2 | }; |
443 | 2 | ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( |
444 | 2 | descriptor, 1800); |
445 | 2 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( |
446 | 2 | "echo.proto", &protobuf_RegisterTypes); |
447 | 2 | ::protobuf_idl_5foptions_2eproto::AddDescriptors(); |
448 | 2 | } |
449 | | |
450 | 2 | void AddDescriptors() { |
451 | 2 | static ::google::protobuf::internal::once_flag once; |
452 | 2 | ::google::protobuf::internal::call_once(once, AddDescriptorsImpl); |
453 | 2 | } |
454 | | // Force AddDescriptors() to be called at dynamic initialization time. |
455 | | struct StaticDescriptorInitializer { |
456 | 2 | StaticDescriptorInitializer() { |
457 | 2 | AddDescriptors(); |
458 | 2 | } |
459 | | } static_descriptor_initializer; |
460 | | } // namespace protobuf_echo_2eproto |
461 | | namespace test { |
462 | 0 | const ::google::protobuf::EnumDescriptor* State0_descriptor() { |
463 | 0 | protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
464 | 0 | return protobuf_echo_2eproto::file_level_enum_descriptors[0]; |
465 | 0 | } |
466 | 0 | bool State0_IsValid(int value) { |
467 | 0 | switch (value) { |
468 | 0 | case 0: |
469 | 0 | case 1: |
470 | 0 | case 2: |
471 | 0 | return true; |
472 | 0 | default: |
473 | 0 | return false; |
474 | 0 | } |
475 | 0 | } |
476 | | |
477 | 0 | const ::google::protobuf::EnumDescriptor* State1_descriptor() { |
478 | 0 | protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
479 | 0 | return protobuf_echo_2eproto::file_level_enum_descriptors[1]; |
480 | 0 | } |
481 | 0 | bool State1_IsValid(int value) { |
482 | 0 | switch (value) { |
483 | 0 | case 0: |
484 | 0 | case 1: |
485 | 0 | return true; |
486 | 0 | default: |
487 | 0 | return false; |
488 | 0 | } |
489 | 0 | } |
490 | | |
491 | | |
492 | | // =================================================================== |
493 | | |
494 | 2 | void EchoRequest::InitAsDefaultInstance() { |
495 | 2 | } |
496 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
497 | | const int EchoRequest::kMessageFieldNumber; |
498 | | const int EchoRequest::kCodeFieldNumber; |
499 | | const int EchoRequest::kCloseFdFieldNumber; |
500 | | const int EchoRequest::kSleepUsFieldNumber; |
501 | | const int EchoRequest::kServerFailFieldNumber; |
502 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
503 | | |
504 | | EchoRequest::EchoRequest() |
505 | 2 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
506 | 2 | ::google::protobuf::internal::InitSCC( |
507 | 2 | &protobuf_echo_2eproto::scc_info_EchoRequest.base); |
508 | 2 | SharedCtor(); |
509 | | // @@protoc_insertion_point(constructor:test.EchoRequest) |
510 | 2 | } |
511 | | EchoRequest::EchoRequest(const EchoRequest& from) |
512 | 0 | : ::google::protobuf::Message(), |
513 | 0 | _internal_metadata_(NULL), |
514 | 0 | _has_bits_(from._has_bits_) { |
515 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
516 | 0 | message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
517 | 0 | if (from.has_message()) { |
518 | 0 | message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.message_); |
519 | 0 | } |
520 | 0 | ::memcpy(&code_, &from.code_, |
521 | 0 | static_cast<size_t>(reinterpret_cast<char*>(&server_fail_) - |
522 | 0 | reinterpret_cast<char*>(&code_)) + sizeof(server_fail_)); |
523 | | // @@protoc_insertion_point(copy_constructor:test.EchoRequest) |
524 | 0 | } |
525 | | |
526 | 2 | void EchoRequest::SharedCtor() { |
527 | 2 | message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
528 | 2 | ::memset(&code_, 0, static_cast<size_t>( |
529 | 2 | reinterpret_cast<char*>(&server_fail_) - |
530 | 2 | reinterpret_cast<char*>(&code_)) + sizeof(server_fail_)); |
531 | 2 | } |
532 | | |
533 | 0 | EchoRequest::~EchoRequest() { |
534 | | // @@protoc_insertion_point(destructor:test.EchoRequest) |
535 | 0 | SharedDtor(); |
536 | 0 | } |
537 | | |
538 | 0 | void EchoRequest::SharedDtor() { |
539 | 0 | message_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
540 | 0 | } |
541 | | |
542 | 0 | void EchoRequest::SetCachedSize(int size) const { |
543 | 0 | _cached_size_.Set(size); |
544 | 0 | } |
545 | 0 | const ::google::protobuf::Descriptor* EchoRequest::descriptor() { |
546 | 0 | ::protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
547 | 0 | return ::protobuf_echo_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
548 | 0 | } |
549 | | |
550 | 0 | const EchoRequest& EchoRequest::default_instance() { |
551 | 0 | ::google::protobuf::internal::InitSCC(&protobuf_echo_2eproto::scc_info_EchoRequest.base); |
552 | 0 | return *internal_default_instance(); |
553 | 0 | } |
554 | | |
555 | | |
556 | 0 | void EchoRequest::Clear() { |
557 | | // @@protoc_insertion_point(message_clear_start:test.EchoRequest) |
558 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
559 | | // Prevent compiler warnings about cached_has_bits being unused |
560 | 0 | (void) cached_has_bits; |
561 | |
|
562 | 0 | cached_has_bits = _has_bits_[0]; |
563 | 0 | if (cached_has_bits & 0x00000001u) { |
564 | 0 | message_.ClearNonDefaultToEmptyNoArena(); |
565 | 0 | } |
566 | 0 | if (cached_has_bits & 30u) { |
567 | 0 | ::memset(&code_, 0, static_cast<size_t>( |
568 | 0 | reinterpret_cast<char*>(&server_fail_) - |
569 | 0 | reinterpret_cast<char*>(&code_)) + sizeof(server_fail_)); |
570 | 0 | } |
571 | 0 | _has_bits_.Clear(); |
572 | 0 | _internal_metadata_.Clear(); |
573 | 0 | } |
574 | | |
575 | | bool EchoRequest::MergePartialFromCodedStream( |
576 | 0 | ::google::protobuf::io::CodedInputStream* input) { |
577 | 0 | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
578 | 0 | ::google::protobuf::uint32 tag; |
579 | | // @@protoc_insertion_point(parse_start:test.EchoRequest) |
580 | 0 | for (;;) { |
581 | 0 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
582 | 0 | tag = p.first; |
583 | 0 | if (!p.second) goto handle_unusual; |
584 | 0 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
585 | | // required string message = 1; |
586 | 0 | case 1: { |
587 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
588 | 0 | static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { |
589 | 0 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
590 | 0 | input, this->mutable_message())); |
591 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
592 | 0 | this->message().data(), static_cast<int>(this->message().length()), |
593 | 0 | ::google::protobuf::internal::WireFormat::PARSE, |
594 | 0 | "test.EchoRequest.message"); |
595 | 0 | } else { |
596 | 0 | goto handle_unusual; |
597 | 0 | } |
598 | 0 | break; |
599 | 0 | } |
600 | | |
601 | | // optional int32 code = 2; |
602 | 0 | case 2: { |
603 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
604 | 0 | static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { |
605 | 0 | set_has_code(); |
606 | 0 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
607 | 0 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
608 | 0 | input, &code_))); |
609 | 0 | } else { |
610 | 0 | goto handle_unusual; |
611 | 0 | } |
612 | 0 | break; |
613 | 0 | } |
614 | | |
615 | | // optional bool close_fd = 3; |
616 | 0 | case 3: { |
617 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
618 | 0 | static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { |
619 | 0 | set_has_close_fd(); |
620 | 0 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
621 | 0 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
622 | 0 | input, &close_fd_))); |
623 | 0 | } else { |
624 | 0 | goto handle_unusual; |
625 | 0 | } |
626 | 0 | break; |
627 | 0 | } |
628 | | |
629 | | // optional int32 sleep_us = 4; |
630 | 0 | case 4: { |
631 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
632 | 0 | static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { |
633 | 0 | set_has_sleep_us(); |
634 | 0 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
635 | 0 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
636 | 0 | input, &sleep_us_))); |
637 | 0 | } else { |
638 | 0 | goto handle_unusual; |
639 | 0 | } |
640 | 0 | break; |
641 | 0 | } |
642 | | |
643 | | // optional int32 server_fail = 5; |
644 | 0 | case 5: { |
645 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
646 | 0 | static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) { |
647 | 0 | set_has_server_fail(); |
648 | 0 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
649 | 0 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
650 | 0 | input, &server_fail_))); |
651 | 0 | } else { |
652 | 0 | goto handle_unusual; |
653 | 0 | } |
654 | 0 | break; |
655 | 0 | } |
656 | | |
657 | 0 | default: { |
658 | 0 | handle_unusual: |
659 | 0 | if (tag == 0) { |
660 | 0 | goto success; |
661 | 0 | } |
662 | 0 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
663 | 0 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
664 | 0 | break; |
665 | 0 | } |
666 | 0 | } |
667 | 0 | } |
668 | 0 | success: |
669 | | // @@protoc_insertion_point(parse_success:test.EchoRequest) |
670 | 0 | return true; |
671 | 0 | failure: |
672 | | // @@protoc_insertion_point(parse_failure:test.EchoRequest) |
673 | 0 | return false; |
674 | 0 | #undef DO_ |
675 | 0 | } |
676 | | |
677 | | void EchoRequest::SerializeWithCachedSizes( |
678 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
679 | | // @@protoc_insertion_point(serialize_start:test.EchoRequest) |
680 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
681 | 0 | (void) cached_has_bits; |
682 | |
|
683 | 0 | cached_has_bits = _has_bits_[0]; |
684 | | // required string message = 1; |
685 | 0 | if (cached_has_bits & 0x00000001u) { |
686 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
687 | 0 | this->message().data(), static_cast<int>(this->message().length()), |
688 | 0 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
689 | 0 | "test.EchoRequest.message"); |
690 | 0 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
691 | 0 | 1, this->message(), output); |
692 | 0 | } |
693 | | |
694 | | // optional int32 code = 2; |
695 | 0 | if (cached_has_bits & 0x00000002u) { |
696 | 0 | ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->code(), output); |
697 | 0 | } |
698 | | |
699 | | // optional bool close_fd = 3; |
700 | 0 | if (cached_has_bits & 0x00000004u) { |
701 | 0 | ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->close_fd(), output); |
702 | 0 | } |
703 | | |
704 | | // optional int32 sleep_us = 4; |
705 | 0 | if (cached_has_bits & 0x00000008u) { |
706 | 0 | ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->sleep_us(), output); |
707 | 0 | } |
708 | | |
709 | | // optional int32 server_fail = 5; |
710 | 0 | if (cached_has_bits & 0x00000010u) { |
711 | 0 | ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->server_fail(), output); |
712 | 0 | } |
713 | |
|
714 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
715 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
716 | 0 | _internal_metadata_.unknown_fields(), output); |
717 | 0 | } |
718 | | // @@protoc_insertion_point(serialize_end:test.EchoRequest) |
719 | 0 | } |
720 | | |
721 | | ::google::protobuf::uint8* EchoRequest::InternalSerializeWithCachedSizesToArray( |
722 | 0 | bool deterministic, ::google::protobuf::uint8* target) const { |
723 | 0 | (void)deterministic; // Unused |
724 | | // @@protoc_insertion_point(serialize_to_array_start:test.EchoRequest) |
725 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
726 | 0 | (void) cached_has_bits; |
727 | |
|
728 | 0 | cached_has_bits = _has_bits_[0]; |
729 | | // required string message = 1; |
730 | 0 | if (cached_has_bits & 0x00000001u) { |
731 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
732 | 0 | this->message().data(), static_cast<int>(this->message().length()), |
733 | 0 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
734 | 0 | "test.EchoRequest.message"); |
735 | 0 | target = |
736 | 0 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
737 | 0 | 1, this->message(), target); |
738 | 0 | } |
739 | | |
740 | | // optional int32 code = 2; |
741 | 0 | if (cached_has_bits & 0x00000002u) { |
742 | 0 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->code(), target); |
743 | 0 | } |
744 | | |
745 | | // optional bool close_fd = 3; |
746 | 0 | if (cached_has_bits & 0x00000004u) { |
747 | 0 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->close_fd(), target); |
748 | 0 | } |
749 | | |
750 | | // optional int32 sleep_us = 4; |
751 | 0 | if (cached_has_bits & 0x00000008u) { |
752 | 0 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->sleep_us(), target); |
753 | 0 | } |
754 | | |
755 | | // optional int32 server_fail = 5; |
756 | 0 | if (cached_has_bits & 0x00000010u) { |
757 | 0 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->server_fail(), target); |
758 | 0 | } |
759 | |
|
760 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
761 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
762 | 0 | _internal_metadata_.unknown_fields(), target); |
763 | 0 | } |
764 | | // @@protoc_insertion_point(serialize_to_array_end:test.EchoRequest) |
765 | 0 | return target; |
766 | 0 | } |
767 | | |
768 | 0 | size_t EchoRequest::ByteSizeLong() const { |
769 | | // @@protoc_insertion_point(message_byte_size_start:test.EchoRequest) |
770 | 0 | size_t total_size = 0; |
771 | |
|
772 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
773 | 0 | total_size += |
774 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
775 | 0 | _internal_metadata_.unknown_fields()); |
776 | 0 | } |
777 | | // required string message = 1; |
778 | 0 | if (has_message()) { |
779 | 0 | total_size += 1 + |
780 | 0 | ::google::protobuf::internal::WireFormatLite::StringSize( |
781 | 0 | this->message()); |
782 | 0 | } |
783 | 0 | if (_has_bits_[0 / 32] & 30u) { |
784 | | // optional int32 code = 2; |
785 | 0 | if (has_code()) { |
786 | 0 | total_size += 1 + |
787 | 0 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
788 | 0 | this->code()); |
789 | 0 | } |
790 | | |
791 | | // optional bool close_fd = 3; |
792 | 0 | if (has_close_fd()) { |
793 | 0 | total_size += 1 + 1; |
794 | 0 | } |
795 | | |
796 | | // optional int32 sleep_us = 4; |
797 | 0 | if (has_sleep_us()) { |
798 | 0 | total_size += 1 + |
799 | 0 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
800 | 0 | this->sleep_us()); |
801 | 0 | } |
802 | | |
803 | | // optional int32 server_fail = 5; |
804 | 0 | if (has_server_fail()) { |
805 | 0 | total_size += 1 + |
806 | 0 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
807 | 0 | this->server_fail()); |
808 | 0 | } |
809 | |
|
810 | 0 | } |
811 | 0 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
812 | 0 | SetCachedSize(cached_size); |
813 | 0 | return total_size; |
814 | 0 | } |
815 | | |
816 | 0 | void EchoRequest::MergeFrom(const ::google::protobuf::Message& from) { |
817 | | // @@protoc_insertion_point(generalized_merge_from_start:test.EchoRequest) |
818 | 0 | GOOGLE_DCHECK_NE(&from, this); |
819 | 0 | const EchoRequest* source = |
820 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const EchoRequest>( |
821 | 0 | &from); |
822 | 0 | if (source == NULL) { |
823 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:test.EchoRequest) |
824 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
825 | 0 | } else { |
826 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:test.EchoRequest) |
827 | 0 | MergeFrom(*source); |
828 | 0 | } |
829 | 0 | } |
830 | | |
831 | 0 | void EchoRequest::MergeFrom(const EchoRequest& from) { |
832 | | // @@protoc_insertion_point(class_specific_merge_from_start:test.EchoRequest) |
833 | 0 | GOOGLE_DCHECK_NE(&from, this); |
834 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
835 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
836 | 0 | (void) cached_has_bits; |
837 | |
|
838 | 0 | cached_has_bits = from._has_bits_[0]; |
839 | 0 | if (cached_has_bits & 31u) { |
840 | 0 | if (cached_has_bits & 0x00000001u) { |
841 | 0 | set_has_message(); |
842 | 0 | message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.message_); |
843 | 0 | } |
844 | 0 | if (cached_has_bits & 0x00000002u) { |
845 | 0 | code_ = from.code_; |
846 | 0 | } |
847 | 0 | if (cached_has_bits & 0x00000004u) { |
848 | 0 | close_fd_ = from.close_fd_; |
849 | 0 | } |
850 | 0 | if (cached_has_bits & 0x00000008u) { |
851 | 0 | sleep_us_ = from.sleep_us_; |
852 | 0 | } |
853 | 0 | if (cached_has_bits & 0x00000010u) { |
854 | 0 | server_fail_ = from.server_fail_; |
855 | 0 | } |
856 | 0 | _has_bits_[0] |= cached_has_bits; |
857 | 0 | } |
858 | 0 | } |
859 | | |
860 | 0 | void EchoRequest::CopyFrom(const ::google::protobuf::Message& from) { |
861 | | // @@protoc_insertion_point(generalized_copy_from_start:test.EchoRequest) |
862 | 0 | if (&from == this) return; |
863 | 0 | Clear(); |
864 | 0 | MergeFrom(from); |
865 | 0 | } |
866 | | |
867 | 0 | void EchoRequest::CopyFrom(const EchoRequest& from) { |
868 | | // @@protoc_insertion_point(class_specific_copy_from_start:test.EchoRequest) |
869 | 0 | if (&from == this) return; |
870 | 0 | Clear(); |
871 | 0 | MergeFrom(from); |
872 | 0 | } |
873 | | |
874 | 0 | bool EchoRequest::IsInitialized() const { |
875 | 0 | if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; |
876 | 0 | return true; |
877 | 0 | } |
878 | | |
879 | 0 | void EchoRequest::Swap(EchoRequest* other) { |
880 | 0 | if (other == this) return; |
881 | 0 | InternalSwap(other); |
882 | 0 | } |
883 | 0 | void EchoRequest::InternalSwap(EchoRequest* other) { |
884 | 0 | using std::swap; |
885 | 0 | message_.Swap(&other->message_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
886 | 0 | GetArenaNoVirtual()); |
887 | 0 | swap(code_, other->code_); |
888 | 0 | swap(close_fd_, other->close_fd_); |
889 | 0 | swap(sleep_us_, other->sleep_us_); |
890 | 0 | swap(server_fail_, other->server_fail_); |
891 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
892 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
893 | 0 | } |
894 | | |
895 | 0 | ::google::protobuf::Metadata EchoRequest::GetMetadata() const { |
896 | 0 | protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
897 | 0 | return ::protobuf_echo_2eproto::file_level_metadata[kIndexInFileMessages]; |
898 | 0 | } |
899 | | |
900 | | |
901 | | // =================================================================== |
902 | | |
903 | 2 | void EchoResponse::InitAsDefaultInstance() { |
904 | 2 | } |
905 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
906 | | const int EchoResponse::kMessageFieldNumber; |
907 | | const int EchoResponse::kCodeListFieldNumber; |
908 | | const int EchoResponse::kReceivingSocketIdFieldNumber; |
909 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
910 | | |
911 | | EchoResponse::EchoResponse() |
912 | 2 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
913 | 2 | ::google::protobuf::internal::InitSCC( |
914 | 2 | &protobuf_echo_2eproto::scc_info_EchoResponse.base); |
915 | 2 | SharedCtor(); |
916 | | // @@protoc_insertion_point(constructor:test.EchoResponse) |
917 | 2 | } |
918 | | EchoResponse::EchoResponse(const EchoResponse& from) |
919 | 0 | : ::google::protobuf::Message(), |
920 | 0 | _internal_metadata_(NULL), |
921 | 0 | _has_bits_(from._has_bits_), |
922 | 0 | code_list_(from.code_list_) { |
923 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
924 | 0 | message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
925 | 0 | if (from.has_message()) { |
926 | 0 | message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.message_); |
927 | 0 | } |
928 | 0 | receiving_socket_id_ = from.receiving_socket_id_; |
929 | | // @@protoc_insertion_point(copy_constructor:test.EchoResponse) |
930 | 0 | } |
931 | | |
932 | 2 | void EchoResponse::SharedCtor() { |
933 | 2 | message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
934 | 2 | receiving_socket_id_ = GOOGLE_ULONGLONG(0); |
935 | 2 | } |
936 | | |
937 | 0 | EchoResponse::~EchoResponse() { |
938 | | // @@protoc_insertion_point(destructor:test.EchoResponse) |
939 | 0 | SharedDtor(); |
940 | 0 | } |
941 | | |
942 | 0 | void EchoResponse::SharedDtor() { |
943 | 0 | message_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
944 | 0 | } |
945 | | |
946 | 0 | void EchoResponse::SetCachedSize(int size) const { |
947 | 0 | _cached_size_.Set(size); |
948 | 0 | } |
949 | 0 | const ::google::protobuf::Descriptor* EchoResponse::descriptor() { |
950 | 0 | ::protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
951 | 0 | return ::protobuf_echo_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
952 | 0 | } |
953 | | |
954 | 0 | const EchoResponse& EchoResponse::default_instance() { |
955 | 0 | ::google::protobuf::internal::InitSCC(&protobuf_echo_2eproto::scc_info_EchoResponse.base); |
956 | 0 | return *internal_default_instance(); |
957 | 0 | } |
958 | | |
959 | | |
960 | 0 | void EchoResponse::Clear() { |
961 | | // @@protoc_insertion_point(message_clear_start:test.EchoResponse) |
962 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
963 | | // Prevent compiler warnings about cached_has_bits being unused |
964 | 0 | (void) cached_has_bits; |
965 | |
|
966 | 0 | code_list_.Clear(); |
967 | 0 | cached_has_bits = _has_bits_[0]; |
968 | 0 | if (cached_has_bits & 0x00000001u) { |
969 | 0 | message_.ClearNonDefaultToEmptyNoArena(); |
970 | 0 | } |
971 | 0 | receiving_socket_id_ = GOOGLE_ULONGLONG(0); |
972 | 0 | _has_bits_.Clear(); |
973 | 0 | _internal_metadata_.Clear(); |
974 | 0 | } |
975 | | |
976 | | bool EchoResponse::MergePartialFromCodedStream( |
977 | 0 | ::google::protobuf::io::CodedInputStream* input) { |
978 | 0 | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
979 | 0 | ::google::protobuf::uint32 tag; |
980 | | // @@protoc_insertion_point(parse_start:test.EchoResponse) |
981 | 0 | for (;;) { |
982 | 0 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
983 | 0 | tag = p.first; |
984 | 0 | if (!p.second) goto handle_unusual; |
985 | 0 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
986 | | // required string message = 1; |
987 | 0 | case 1: { |
988 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
989 | 0 | static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { |
990 | 0 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
991 | 0 | input, this->mutable_message())); |
992 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
993 | 0 | this->message().data(), static_cast<int>(this->message().length()), |
994 | 0 | ::google::protobuf::internal::WireFormat::PARSE, |
995 | 0 | "test.EchoResponse.message"); |
996 | 0 | } else { |
997 | 0 | goto handle_unusual; |
998 | 0 | } |
999 | 0 | break; |
1000 | 0 | } |
1001 | | |
1002 | | // repeated int32 code_list = 2; |
1003 | 0 | case 2: { |
1004 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
1005 | 0 | static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { |
1006 | 0 | DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< |
1007 | 0 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
1008 | 0 | 1, 16u, input, this->mutable_code_list()))); |
1009 | 0 | } else if ( |
1010 | 0 | static_cast< ::google::protobuf::uint8>(tag) == |
1011 | 0 | static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { |
1012 | 0 | DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< |
1013 | 0 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
1014 | 0 | input, this->mutable_code_list()))); |
1015 | 0 | } else { |
1016 | 0 | goto handle_unusual; |
1017 | 0 | } |
1018 | 0 | break; |
1019 | 0 | } |
1020 | | |
1021 | | // optional uint64 receiving_socket_id = 3; |
1022 | 0 | case 3: { |
1023 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
1024 | 0 | static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { |
1025 | 0 | set_has_receiving_socket_id(); |
1026 | 0 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
1027 | 0 | ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( |
1028 | 0 | input, &receiving_socket_id_))); |
1029 | 0 | } else { |
1030 | 0 | goto handle_unusual; |
1031 | 0 | } |
1032 | 0 | break; |
1033 | 0 | } |
1034 | | |
1035 | 0 | default: { |
1036 | 0 | handle_unusual: |
1037 | 0 | if (tag == 0) { |
1038 | 0 | goto success; |
1039 | 0 | } |
1040 | 0 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
1041 | 0 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1042 | 0 | break; |
1043 | 0 | } |
1044 | 0 | } |
1045 | 0 | } |
1046 | 0 | success: |
1047 | | // @@protoc_insertion_point(parse_success:test.EchoResponse) |
1048 | 0 | return true; |
1049 | 0 | failure: |
1050 | | // @@protoc_insertion_point(parse_failure:test.EchoResponse) |
1051 | 0 | return false; |
1052 | 0 | #undef DO_ |
1053 | 0 | } |
1054 | | |
1055 | | void EchoResponse::SerializeWithCachedSizes( |
1056 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
1057 | | // @@protoc_insertion_point(serialize_start:test.EchoResponse) |
1058 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
1059 | 0 | (void) cached_has_bits; |
1060 | |
|
1061 | 0 | cached_has_bits = _has_bits_[0]; |
1062 | | // required string message = 1; |
1063 | 0 | if (cached_has_bits & 0x00000001u) { |
1064 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
1065 | 0 | this->message().data(), static_cast<int>(this->message().length()), |
1066 | 0 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
1067 | 0 | "test.EchoResponse.message"); |
1068 | 0 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
1069 | 0 | 1, this->message(), output); |
1070 | 0 | } |
1071 | | |
1072 | | // repeated int32 code_list = 2; |
1073 | 0 | for (int i = 0, n = this->code_list_size(); i < n; i++) { |
1074 | 0 | ::google::protobuf::internal::WireFormatLite::WriteInt32( |
1075 | 0 | 2, this->code_list(i), output); |
1076 | 0 | } |
1077 | | |
1078 | | // optional uint64 receiving_socket_id = 3; |
1079 | 0 | if (cached_has_bits & 0x00000002u) { |
1080 | 0 | ::google::protobuf::internal::WireFormatLite::WriteUInt64(3, this->receiving_socket_id(), output); |
1081 | 0 | } |
1082 | |
|
1083 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
1084 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
1085 | 0 | _internal_metadata_.unknown_fields(), output); |
1086 | 0 | } |
1087 | | // @@protoc_insertion_point(serialize_end:test.EchoResponse) |
1088 | 0 | } |
1089 | | |
1090 | | ::google::protobuf::uint8* EchoResponse::InternalSerializeWithCachedSizesToArray( |
1091 | 0 | bool deterministic, ::google::protobuf::uint8* target) const { |
1092 | 0 | (void)deterministic; // Unused |
1093 | | // @@protoc_insertion_point(serialize_to_array_start:test.EchoResponse) |
1094 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
1095 | 0 | (void) cached_has_bits; |
1096 | |
|
1097 | 0 | cached_has_bits = _has_bits_[0]; |
1098 | | // required string message = 1; |
1099 | 0 | if (cached_has_bits & 0x00000001u) { |
1100 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
1101 | 0 | this->message().data(), static_cast<int>(this->message().length()), |
1102 | 0 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
1103 | 0 | "test.EchoResponse.message"); |
1104 | 0 | target = |
1105 | 0 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
1106 | 0 | 1, this->message(), target); |
1107 | 0 | } |
1108 | | |
1109 | | // repeated int32 code_list = 2; |
1110 | 0 | target = ::google::protobuf::internal::WireFormatLite:: |
1111 | 0 | WriteInt32ToArray(2, this->code_list_, target); |
1112 | | |
1113 | | // optional uint64 receiving_socket_id = 3; |
1114 | 0 | if (cached_has_bits & 0x00000002u) { |
1115 | 0 | target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(3, this->receiving_socket_id(), target); |
1116 | 0 | } |
1117 | |
|
1118 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
1119 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
1120 | 0 | _internal_metadata_.unknown_fields(), target); |
1121 | 0 | } |
1122 | | // @@protoc_insertion_point(serialize_to_array_end:test.EchoResponse) |
1123 | 0 | return target; |
1124 | 0 | } |
1125 | | |
1126 | 0 | size_t EchoResponse::ByteSizeLong() const { |
1127 | | // @@protoc_insertion_point(message_byte_size_start:test.EchoResponse) |
1128 | 0 | size_t total_size = 0; |
1129 | |
|
1130 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
1131 | 0 | total_size += |
1132 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
1133 | 0 | _internal_metadata_.unknown_fields()); |
1134 | 0 | } |
1135 | | // required string message = 1; |
1136 | 0 | if (has_message()) { |
1137 | 0 | total_size += 1 + |
1138 | 0 | ::google::protobuf::internal::WireFormatLite::StringSize( |
1139 | 0 | this->message()); |
1140 | 0 | } |
1141 | | // repeated int32 code_list = 2; |
1142 | 0 | { |
1143 | 0 | size_t data_size = ::google::protobuf::internal::WireFormatLite:: |
1144 | 0 | Int32Size(this->code_list_); |
1145 | 0 | total_size += 1 * |
1146 | 0 | ::google::protobuf::internal::FromIntSize(this->code_list_size()); |
1147 | 0 | total_size += data_size; |
1148 | 0 | } |
1149 | | |
1150 | | // optional uint64 receiving_socket_id = 3; |
1151 | 0 | if (has_receiving_socket_id()) { |
1152 | 0 | total_size += 1 + |
1153 | 0 | ::google::protobuf::internal::WireFormatLite::UInt64Size( |
1154 | 0 | this->receiving_socket_id()); |
1155 | 0 | } |
1156 | |
|
1157 | 0 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
1158 | 0 | SetCachedSize(cached_size); |
1159 | 0 | return total_size; |
1160 | 0 | } |
1161 | | |
1162 | 0 | void EchoResponse::MergeFrom(const ::google::protobuf::Message& from) { |
1163 | | // @@protoc_insertion_point(generalized_merge_from_start:test.EchoResponse) |
1164 | 0 | GOOGLE_DCHECK_NE(&from, this); |
1165 | 0 | const EchoResponse* source = |
1166 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const EchoResponse>( |
1167 | 0 | &from); |
1168 | 0 | if (source == NULL) { |
1169 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:test.EchoResponse) |
1170 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
1171 | 0 | } else { |
1172 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:test.EchoResponse) |
1173 | 0 | MergeFrom(*source); |
1174 | 0 | } |
1175 | 0 | } |
1176 | | |
1177 | 0 | void EchoResponse::MergeFrom(const EchoResponse& from) { |
1178 | | // @@protoc_insertion_point(class_specific_merge_from_start:test.EchoResponse) |
1179 | 0 | GOOGLE_DCHECK_NE(&from, this); |
1180 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1181 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
1182 | 0 | (void) cached_has_bits; |
1183 | |
|
1184 | 0 | code_list_.MergeFrom(from.code_list_); |
1185 | 0 | cached_has_bits = from._has_bits_[0]; |
1186 | 0 | if (cached_has_bits & 3u) { |
1187 | 0 | if (cached_has_bits & 0x00000001u) { |
1188 | 0 | set_has_message(); |
1189 | 0 | message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.message_); |
1190 | 0 | } |
1191 | 0 | if (cached_has_bits & 0x00000002u) { |
1192 | 0 | receiving_socket_id_ = from.receiving_socket_id_; |
1193 | 0 | } |
1194 | 0 | _has_bits_[0] |= cached_has_bits; |
1195 | 0 | } |
1196 | 0 | } |
1197 | | |
1198 | 0 | void EchoResponse::CopyFrom(const ::google::protobuf::Message& from) { |
1199 | | // @@protoc_insertion_point(generalized_copy_from_start:test.EchoResponse) |
1200 | 0 | if (&from == this) return; |
1201 | 0 | Clear(); |
1202 | 0 | MergeFrom(from); |
1203 | 0 | } |
1204 | | |
1205 | 0 | void EchoResponse::CopyFrom(const EchoResponse& from) { |
1206 | | // @@protoc_insertion_point(class_specific_copy_from_start:test.EchoResponse) |
1207 | 0 | if (&from == this) return; |
1208 | 0 | Clear(); |
1209 | 0 | MergeFrom(from); |
1210 | 0 | } |
1211 | | |
1212 | 0 | bool EchoResponse::IsInitialized() const { |
1213 | 0 | if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; |
1214 | 0 | return true; |
1215 | 0 | } |
1216 | | |
1217 | 0 | void EchoResponse::Swap(EchoResponse* other) { |
1218 | 0 | if (other == this) return; |
1219 | 0 | InternalSwap(other); |
1220 | 0 | } |
1221 | 0 | void EchoResponse::InternalSwap(EchoResponse* other) { |
1222 | 0 | using std::swap; |
1223 | 0 | code_list_.InternalSwap(&other->code_list_); |
1224 | 0 | message_.Swap(&other->message_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
1225 | 0 | GetArenaNoVirtual()); |
1226 | 0 | swap(receiving_socket_id_, other->receiving_socket_id_); |
1227 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
1228 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1229 | 0 | } |
1230 | | |
1231 | 0 | ::google::protobuf::Metadata EchoResponse::GetMetadata() const { |
1232 | 0 | protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
1233 | 0 | return ::protobuf_echo_2eproto::file_level_metadata[kIndexInFileMessages]; |
1234 | 0 | } |
1235 | | |
1236 | | |
1237 | | // =================================================================== |
1238 | | |
1239 | 2 | void ComboRequest::InitAsDefaultInstance() { |
1240 | 2 | } |
1241 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
1242 | | const int ComboRequest::kRequestsFieldNumber; |
1243 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
1244 | | |
1245 | | ComboRequest::ComboRequest() |
1246 | 2 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
1247 | 2 | ::google::protobuf::internal::InitSCC( |
1248 | 2 | &protobuf_echo_2eproto::scc_info_ComboRequest.base); |
1249 | 2 | SharedCtor(); |
1250 | | // @@protoc_insertion_point(constructor:test.ComboRequest) |
1251 | 2 | } |
1252 | | ComboRequest::ComboRequest(const ComboRequest& from) |
1253 | 0 | : ::google::protobuf::Message(), |
1254 | 0 | _internal_metadata_(NULL), |
1255 | 0 | _has_bits_(from._has_bits_), |
1256 | 0 | requests_(from.requests_) { |
1257 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1258 | | // @@protoc_insertion_point(copy_constructor:test.ComboRequest) |
1259 | 0 | } |
1260 | | |
1261 | 2 | void ComboRequest::SharedCtor() { |
1262 | 2 | } |
1263 | | |
1264 | 0 | ComboRequest::~ComboRequest() { |
1265 | | // @@protoc_insertion_point(destructor:test.ComboRequest) |
1266 | 0 | SharedDtor(); |
1267 | 0 | } |
1268 | | |
1269 | 0 | void ComboRequest::SharedDtor() { |
1270 | 0 | } |
1271 | | |
1272 | 0 | void ComboRequest::SetCachedSize(int size) const { |
1273 | 0 | _cached_size_.Set(size); |
1274 | 0 | } |
1275 | 0 | const ::google::protobuf::Descriptor* ComboRequest::descriptor() { |
1276 | 0 | ::protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
1277 | 0 | return ::protobuf_echo_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
1278 | 0 | } |
1279 | | |
1280 | 0 | const ComboRequest& ComboRequest::default_instance() { |
1281 | 0 | ::google::protobuf::internal::InitSCC(&protobuf_echo_2eproto::scc_info_ComboRequest.base); |
1282 | 0 | return *internal_default_instance(); |
1283 | 0 | } |
1284 | | |
1285 | | |
1286 | 0 | void ComboRequest::Clear() { |
1287 | | // @@protoc_insertion_point(message_clear_start:test.ComboRequest) |
1288 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
1289 | | // Prevent compiler warnings about cached_has_bits being unused |
1290 | 0 | (void) cached_has_bits; |
1291 | |
|
1292 | 0 | requests_.Clear(); |
1293 | 0 | _has_bits_.Clear(); |
1294 | 0 | _internal_metadata_.Clear(); |
1295 | 0 | } |
1296 | | |
1297 | | bool ComboRequest::MergePartialFromCodedStream( |
1298 | 0 | ::google::protobuf::io::CodedInputStream* input) { |
1299 | 0 | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
1300 | 0 | ::google::protobuf::uint32 tag; |
1301 | | // @@protoc_insertion_point(parse_start:test.ComboRequest) |
1302 | 0 | for (;;) { |
1303 | 0 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
1304 | 0 | tag = p.first; |
1305 | 0 | if (!p.second) goto handle_unusual; |
1306 | 0 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
1307 | | // repeated .test.EchoRequest requests = 1; |
1308 | 0 | case 1: { |
1309 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
1310 | 0 | static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { |
1311 | 0 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
1312 | 0 | input, add_requests())); |
1313 | 0 | } else { |
1314 | 0 | goto handle_unusual; |
1315 | 0 | } |
1316 | 0 | break; |
1317 | 0 | } |
1318 | | |
1319 | 0 | default: { |
1320 | 0 | handle_unusual: |
1321 | 0 | if (tag == 0) { |
1322 | 0 | goto success; |
1323 | 0 | } |
1324 | 0 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
1325 | 0 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1326 | 0 | break; |
1327 | 0 | } |
1328 | 0 | } |
1329 | 0 | } |
1330 | 0 | success: |
1331 | | // @@protoc_insertion_point(parse_success:test.ComboRequest) |
1332 | 0 | return true; |
1333 | 0 | failure: |
1334 | | // @@protoc_insertion_point(parse_failure:test.ComboRequest) |
1335 | 0 | return false; |
1336 | 0 | #undef DO_ |
1337 | 0 | } |
1338 | | |
1339 | | void ComboRequest::SerializeWithCachedSizes( |
1340 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
1341 | | // @@protoc_insertion_point(serialize_start:test.ComboRequest) |
1342 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
1343 | 0 | (void) cached_has_bits; |
1344 | | |
1345 | | // repeated .test.EchoRequest requests = 1; |
1346 | 0 | for (unsigned int i = 0, |
1347 | 0 | n = static_cast<unsigned int>(this->requests_size()); i < n; i++) { |
1348 | 0 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
1349 | 0 | 1, |
1350 | 0 | this->requests(static_cast<int>(i)), |
1351 | 0 | output); |
1352 | 0 | } |
1353 | |
|
1354 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
1355 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
1356 | 0 | _internal_metadata_.unknown_fields(), output); |
1357 | 0 | } |
1358 | | // @@protoc_insertion_point(serialize_end:test.ComboRequest) |
1359 | 0 | } |
1360 | | |
1361 | | ::google::protobuf::uint8* ComboRequest::InternalSerializeWithCachedSizesToArray( |
1362 | 0 | bool deterministic, ::google::protobuf::uint8* target) const { |
1363 | 0 | (void)deterministic; // Unused |
1364 | | // @@protoc_insertion_point(serialize_to_array_start:test.ComboRequest) |
1365 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
1366 | 0 | (void) cached_has_bits; |
1367 | | |
1368 | | // repeated .test.EchoRequest requests = 1; |
1369 | 0 | for (unsigned int i = 0, |
1370 | 0 | n = static_cast<unsigned int>(this->requests_size()); i < n; i++) { |
1371 | 0 | target = ::google::protobuf::internal::WireFormatLite:: |
1372 | 0 | InternalWriteMessageToArray( |
1373 | 0 | 1, this->requests(static_cast<int>(i)), deterministic, target); |
1374 | 0 | } |
1375 | |
|
1376 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
1377 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
1378 | 0 | _internal_metadata_.unknown_fields(), target); |
1379 | 0 | } |
1380 | | // @@protoc_insertion_point(serialize_to_array_end:test.ComboRequest) |
1381 | 0 | return target; |
1382 | 0 | } |
1383 | | |
1384 | 0 | size_t ComboRequest::ByteSizeLong() const { |
1385 | | // @@protoc_insertion_point(message_byte_size_start:test.ComboRequest) |
1386 | 0 | size_t total_size = 0; |
1387 | |
|
1388 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
1389 | 0 | total_size += |
1390 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
1391 | 0 | _internal_metadata_.unknown_fields()); |
1392 | 0 | } |
1393 | | // repeated .test.EchoRequest requests = 1; |
1394 | 0 | { |
1395 | 0 | unsigned int count = static_cast<unsigned int>(this->requests_size()); |
1396 | 0 | total_size += 1UL * count; |
1397 | 0 | for (unsigned int i = 0; i < count; i++) { |
1398 | 0 | total_size += |
1399 | 0 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
1400 | 0 | this->requests(static_cast<int>(i))); |
1401 | 0 | } |
1402 | 0 | } |
1403 | |
|
1404 | 0 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
1405 | 0 | SetCachedSize(cached_size); |
1406 | 0 | return total_size; |
1407 | 0 | } |
1408 | | |
1409 | 0 | void ComboRequest::MergeFrom(const ::google::protobuf::Message& from) { |
1410 | | // @@protoc_insertion_point(generalized_merge_from_start:test.ComboRequest) |
1411 | 0 | GOOGLE_DCHECK_NE(&from, this); |
1412 | 0 | const ComboRequest* source = |
1413 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const ComboRequest>( |
1414 | 0 | &from); |
1415 | 0 | if (source == NULL) { |
1416 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:test.ComboRequest) |
1417 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
1418 | 0 | } else { |
1419 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:test.ComboRequest) |
1420 | 0 | MergeFrom(*source); |
1421 | 0 | } |
1422 | 0 | } |
1423 | | |
1424 | 0 | void ComboRequest::MergeFrom(const ComboRequest& from) { |
1425 | | // @@protoc_insertion_point(class_specific_merge_from_start:test.ComboRequest) |
1426 | 0 | GOOGLE_DCHECK_NE(&from, this); |
1427 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1428 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
1429 | 0 | (void) cached_has_bits; |
1430 | |
|
1431 | 0 | requests_.MergeFrom(from.requests_); |
1432 | 0 | } |
1433 | | |
1434 | 0 | void ComboRequest::CopyFrom(const ::google::protobuf::Message& from) { |
1435 | | // @@protoc_insertion_point(generalized_copy_from_start:test.ComboRequest) |
1436 | 0 | if (&from == this) return; |
1437 | 0 | Clear(); |
1438 | 0 | MergeFrom(from); |
1439 | 0 | } |
1440 | | |
1441 | 0 | void ComboRequest::CopyFrom(const ComboRequest& from) { |
1442 | | // @@protoc_insertion_point(class_specific_copy_from_start:test.ComboRequest) |
1443 | 0 | if (&from == this) return; |
1444 | 0 | Clear(); |
1445 | 0 | MergeFrom(from); |
1446 | 0 | } |
1447 | | |
1448 | 0 | bool ComboRequest::IsInitialized() const { |
1449 | 0 | if (!::google::protobuf::internal::AllAreInitialized(this->requests())) return false; |
1450 | 0 | return true; |
1451 | 0 | } |
1452 | | |
1453 | 0 | void ComboRequest::Swap(ComboRequest* other) { |
1454 | 0 | if (other == this) return; |
1455 | 0 | InternalSwap(other); |
1456 | 0 | } |
1457 | 0 | void ComboRequest::InternalSwap(ComboRequest* other) { |
1458 | 0 | using std::swap; |
1459 | 0 | CastToBase(&requests_)->InternalSwap(CastToBase(&other->requests_)); |
1460 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
1461 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1462 | 0 | } |
1463 | | |
1464 | 0 | ::google::protobuf::Metadata ComboRequest::GetMetadata() const { |
1465 | 0 | protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
1466 | 0 | return ::protobuf_echo_2eproto::file_level_metadata[kIndexInFileMessages]; |
1467 | 0 | } |
1468 | | |
1469 | | |
1470 | | // =================================================================== |
1471 | | |
1472 | 2 | void BytesRequest::InitAsDefaultInstance() { |
1473 | 2 | } |
1474 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
1475 | | const int BytesRequest::kDatabytesFieldNumber; |
1476 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
1477 | | |
1478 | | BytesRequest::BytesRequest() |
1479 | 2 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
1480 | 2 | ::google::protobuf::internal::InitSCC( |
1481 | 2 | &protobuf_echo_2eproto::scc_info_BytesRequest.base); |
1482 | 2 | SharedCtor(); |
1483 | | // @@protoc_insertion_point(constructor:test.BytesRequest) |
1484 | 2 | } |
1485 | | BytesRequest::BytesRequest(const BytesRequest& from) |
1486 | 0 | : ::google::protobuf::Message(), |
1487 | 0 | _internal_metadata_(NULL), |
1488 | 0 | _has_bits_(from._has_bits_) { |
1489 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1490 | 0 | databytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
1491 | 0 | if (from.has_databytes()) { |
1492 | 0 | databytes_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.databytes_); |
1493 | 0 | } |
1494 | | // @@protoc_insertion_point(copy_constructor:test.BytesRequest) |
1495 | 0 | } |
1496 | | |
1497 | 2 | void BytesRequest::SharedCtor() { |
1498 | 2 | databytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
1499 | 2 | } |
1500 | | |
1501 | 0 | BytesRequest::~BytesRequest() { |
1502 | | // @@protoc_insertion_point(destructor:test.BytesRequest) |
1503 | 0 | SharedDtor(); |
1504 | 0 | } |
1505 | | |
1506 | 0 | void BytesRequest::SharedDtor() { |
1507 | 0 | databytes_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
1508 | 0 | } |
1509 | | |
1510 | 0 | void BytesRequest::SetCachedSize(int size) const { |
1511 | 0 | _cached_size_.Set(size); |
1512 | 0 | } |
1513 | 0 | const ::google::protobuf::Descriptor* BytesRequest::descriptor() { |
1514 | 0 | ::protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
1515 | 0 | return ::protobuf_echo_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
1516 | 0 | } |
1517 | | |
1518 | 0 | const BytesRequest& BytesRequest::default_instance() { |
1519 | 0 | ::google::protobuf::internal::InitSCC(&protobuf_echo_2eproto::scc_info_BytesRequest.base); |
1520 | 0 | return *internal_default_instance(); |
1521 | 0 | } |
1522 | | |
1523 | | |
1524 | 0 | void BytesRequest::Clear() { |
1525 | | // @@protoc_insertion_point(message_clear_start:test.BytesRequest) |
1526 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
1527 | | // Prevent compiler warnings about cached_has_bits being unused |
1528 | 0 | (void) cached_has_bits; |
1529 | |
|
1530 | 0 | cached_has_bits = _has_bits_[0]; |
1531 | 0 | if (cached_has_bits & 0x00000001u) { |
1532 | 0 | databytes_.ClearNonDefaultToEmptyNoArena(); |
1533 | 0 | } |
1534 | 0 | _has_bits_.Clear(); |
1535 | 0 | _internal_metadata_.Clear(); |
1536 | 0 | } |
1537 | | |
1538 | | bool BytesRequest::MergePartialFromCodedStream( |
1539 | 0 | ::google::protobuf::io::CodedInputStream* input) { |
1540 | 0 | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
1541 | 0 | ::google::protobuf::uint32 tag; |
1542 | | // @@protoc_insertion_point(parse_start:test.BytesRequest) |
1543 | 0 | for (;;) { |
1544 | 0 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
1545 | 0 | tag = p.first; |
1546 | 0 | if (!p.second) goto handle_unusual; |
1547 | 0 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
1548 | | // required bytes databytes = 1; |
1549 | 0 | case 1: { |
1550 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
1551 | 0 | static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { |
1552 | 0 | DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( |
1553 | 0 | input, this->mutable_databytes())); |
1554 | 0 | } else { |
1555 | 0 | goto handle_unusual; |
1556 | 0 | } |
1557 | 0 | break; |
1558 | 0 | } |
1559 | | |
1560 | 0 | default: { |
1561 | 0 | handle_unusual: |
1562 | 0 | if (tag == 0) { |
1563 | 0 | goto success; |
1564 | 0 | } |
1565 | 0 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
1566 | 0 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1567 | 0 | break; |
1568 | 0 | } |
1569 | 0 | } |
1570 | 0 | } |
1571 | 0 | success: |
1572 | | // @@protoc_insertion_point(parse_success:test.BytesRequest) |
1573 | 0 | return true; |
1574 | 0 | failure: |
1575 | | // @@protoc_insertion_point(parse_failure:test.BytesRequest) |
1576 | 0 | return false; |
1577 | 0 | #undef DO_ |
1578 | 0 | } |
1579 | | |
1580 | | void BytesRequest::SerializeWithCachedSizes( |
1581 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
1582 | | // @@protoc_insertion_point(serialize_start:test.BytesRequest) |
1583 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
1584 | 0 | (void) cached_has_bits; |
1585 | |
|
1586 | 0 | cached_has_bits = _has_bits_[0]; |
1587 | | // required bytes databytes = 1; |
1588 | 0 | if (cached_has_bits & 0x00000001u) { |
1589 | 0 | ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( |
1590 | 0 | 1, this->databytes(), output); |
1591 | 0 | } |
1592 | |
|
1593 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
1594 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
1595 | 0 | _internal_metadata_.unknown_fields(), output); |
1596 | 0 | } |
1597 | | // @@protoc_insertion_point(serialize_end:test.BytesRequest) |
1598 | 0 | } |
1599 | | |
1600 | | ::google::protobuf::uint8* BytesRequest::InternalSerializeWithCachedSizesToArray( |
1601 | 0 | bool deterministic, ::google::protobuf::uint8* target) const { |
1602 | 0 | (void)deterministic; // Unused |
1603 | | // @@protoc_insertion_point(serialize_to_array_start:test.BytesRequest) |
1604 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
1605 | 0 | (void) cached_has_bits; |
1606 | |
|
1607 | 0 | cached_has_bits = _has_bits_[0]; |
1608 | | // required bytes databytes = 1; |
1609 | 0 | if (cached_has_bits & 0x00000001u) { |
1610 | 0 | target = |
1611 | 0 | ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( |
1612 | 0 | 1, this->databytes(), target); |
1613 | 0 | } |
1614 | |
|
1615 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
1616 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
1617 | 0 | _internal_metadata_.unknown_fields(), target); |
1618 | 0 | } |
1619 | | // @@protoc_insertion_point(serialize_to_array_end:test.BytesRequest) |
1620 | 0 | return target; |
1621 | 0 | } |
1622 | | |
1623 | 0 | size_t BytesRequest::ByteSizeLong() const { |
1624 | | // @@protoc_insertion_point(message_byte_size_start:test.BytesRequest) |
1625 | 0 | size_t total_size = 0; |
1626 | |
|
1627 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
1628 | 0 | total_size += |
1629 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
1630 | 0 | _internal_metadata_.unknown_fields()); |
1631 | 0 | } |
1632 | | // required bytes databytes = 1; |
1633 | 0 | if (has_databytes()) { |
1634 | 0 | total_size += 1 + |
1635 | 0 | ::google::protobuf::internal::WireFormatLite::BytesSize( |
1636 | 0 | this->databytes()); |
1637 | 0 | } |
1638 | 0 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
1639 | 0 | SetCachedSize(cached_size); |
1640 | 0 | return total_size; |
1641 | 0 | } |
1642 | | |
1643 | 0 | void BytesRequest::MergeFrom(const ::google::protobuf::Message& from) { |
1644 | | // @@protoc_insertion_point(generalized_merge_from_start:test.BytesRequest) |
1645 | 0 | GOOGLE_DCHECK_NE(&from, this); |
1646 | 0 | const BytesRequest* source = |
1647 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const BytesRequest>( |
1648 | 0 | &from); |
1649 | 0 | if (source == NULL) { |
1650 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:test.BytesRequest) |
1651 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
1652 | 0 | } else { |
1653 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:test.BytesRequest) |
1654 | 0 | MergeFrom(*source); |
1655 | 0 | } |
1656 | 0 | } |
1657 | | |
1658 | 0 | void BytesRequest::MergeFrom(const BytesRequest& from) { |
1659 | | // @@protoc_insertion_point(class_specific_merge_from_start:test.BytesRequest) |
1660 | 0 | GOOGLE_DCHECK_NE(&from, this); |
1661 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1662 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
1663 | 0 | (void) cached_has_bits; |
1664 | |
|
1665 | 0 | if (from.has_databytes()) { |
1666 | 0 | set_has_databytes(); |
1667 | 0 | databytes_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.databytes_); |
1668 | 0 | } |
1669 | 0 | } |
1670 | | |
1671 | 0 | void BytesRequest::CopyFrom(const ::google::protobuf::Message& from) { |
1672 | | // @@protoc_insertion_point(generalized_copy_from_start:test.BytesRequest) |
1673 | 0 | if (&from == this) return; |
1674 | 0 | Clear(); |
1675 | 0 | MergeFrom(from); |
1676 | 0 | } |
1677 | | |
1678 | 0 | void BytesRequest::CopyFrom(const BytesRequest& from) { |
1679 | | // @@protoc_insertion_point(class_specific_copy_from_start:test.BytesRequest) |
1680 | 0 | if (&from == this) return; |
1681 | 0 | Clear(); |
1682 | 0 | MergeFrom(from); |
1683 | 0 | } |
1684 | | |
1685 | 0 | bool BytesRequest::IsInitialized() const { |
1686 | 0 | if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; |
1687 | 0 | return true; |
1688 | 0 | } |
1689 | | |
1690 | 0 | void BytesRequest::Swap(BytesRequest* other) { |
1691 | 0 | if (other == this) return; |
1692 | 0 | InternalSwap(other); |
1693 | 0 | } |
1694 | 0 | void BytesRequest::InternalSwap(BytesRequest* other) { |
1695 | 0 | using std::swap; |
1696 | 0 | databytes_.Swap(&other->databytes_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
1697 | 0 | GetArenaNoVirtual()); |
1698 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
1699 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1700 | 0 | } |
1701 | | |
1702 | 0 | ::google::protobuf::Metadata BytesRequest::GetMetadata() const { |
1703 | 0 | protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
1704 | 0 | return ::protobuf_echo_2eproto::file_level_metadata[kIndexInFileMessages]; |
1705 | 0 | } |
1706 | | |
1707 | | |
1708 | | // =================================================================== |
1709 | | |
1710 | 2 | void BytesResponse::InitAsDefaultInstance() { |
1711 | 2 | } |
1712 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
1713 | | const int BytesResponse::kDatabytesFieldNumber; |
1714 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
1715 | | |
1716 | | BytesResponse::BytesResponse() |
1717 | 2 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
1718 | 2 | ::google::protobuf::internal::InitSCC( |
1719 | 2 | &protobuf_echo_2eproto::scc_info_BytesResponse.base); |
1720 | 2 | SharedCtor(); |
1721 | | // @@protoc_insertion_point(constructor:test.BytesResponse) |
1722 | 2 | } |
1723 | | BytesResponse::BytesResponse(const BytesResponse& from) |
1724 | 0 | : ::google::protobuf::Message(), |
1725 | 0 | _internal_metadata_(NULL), |
1726 | 0 | _has_bits_(from._has_bits_) { |
1727 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1728 | 0 | databytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
1729 | 0 | if (from.has_databytes()) { |
1730 | 0 | databytes_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.databytes_); |
1731 | 0 | } |
1732 | | // @@protoc_insertion_point(copy_constructor:test.BytesResponse) |
1733 | 0 | } |
1734 | | |
1735 | 2 | void BytesResponse::SharedCtor() { |
1736 | 2 | databytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
1737 | 2 | } |
1738 | | |
1739 | 0 | BytesResponse::~BytesResponse() { |
1740 | | // @@protoc_insertion_point(destructor:test.BytesResponse) |
1741 | 0 | SharedDtor(); |
1742 | 0 | } |
1743 | | |
1744 | 0 | void BytesResponse::SharedDtor() { |
1745 | 0 | databytes_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
1746 | 0 | } |
1747 | | |
1748 | 0 | void BytesResponse::SetCachedSize(int size) const { |
1749 | 0 | _cached_size_.Set(size); |
1750 | 0 | } |
1751 | 0 | const ::google::protobuf::Descriptor* BytesResponse::descriptor() { |
1752 | 0 | ::protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
1753 | 0 | return ::protobuf_echo_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
1754 | 0 | } |
1755 | | |
1756 | 0 | const BytesResponse& BytesResponse::default_instance() { |
1757 | 0 | ::google::protobuf::internal::InitSCC(&protobuf_echo_2eproto::scc_info_BytesResponse.base); |
1758 | 0 | return *internal_default_instance(); |
1759 | 0 | } |
1760 | | |
1761 | | |
1762 | 0 | void BytesResponse::Clear() { |
1763 | | // @@protoc_insertion_point(message_clear_start:test.BytesResponse) |
1764 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
1765 | | // Prevent compiler warnings about cached_has_bits being unused |
1766 | 0 | (void) cached_has_bits; |
1767 | |
|
1768 | 0 | cached_has_bits = _has_bits_[0]; |
1769 | 0 | if (cached_has_bits & 0x00000001u) { |
1770 | 0 | databytes_.ClearNonDefaultToEmptyNoArena(); |
1771 | 0 | } |
1772 | 0 | _has_bits_.Clear(); |
1773 | 0 | _internal_metadata_.Clear(); |
1774 | 0 | } |
1775 | | |
1776 | | bool BytesResponse::MergePartialFromCodedStream( |
1777 | 0 | ::google::protobuf::io::CodedInputStream* input) { |
1778 | 0 | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
1779 | 0 | ::google::protobuf::uint32 tag; |
1780 | | // @@protoc_insertion_point(parse_start:test.BytesResponse) |
1781 | 0 | for (;;) { |
1782 | 0 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
1783 | 0 | tag = p.first; |
1784 | 0 | if (!p.second) goto handle_unusual; |
1785 | 0 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
1786 | | // required bytes databytes = 1; |
1787 | 0 | case 1: { |
1788 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
1789 | 0 | static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { |
1790 | 0 | DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( |
1791 | 0 | input, this->mutable_databytes())); |
1792 | 0 | } else { |
1793 | 0 | goto handle_unusual; |
1794 | 0 | } |
1795 | 0 | break; |
1796 | 0 | } |
1797 | | |
1798 | 0 | default: { |
1799 | 0 | handle_unusual: |
1800 | 0 | if (tag == 0) { |
1801 | 0 | goto success; |
1802 | 0 | } |
1803 | 0 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
1804 | 0 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1805 | 0 | break; |
1806 | 0 | } |
1807 | 0 | } |
1808 | 0 | } |
1809 | 0 | success: |
1810 | | // @@protoc_insertion_point(parse_success:test.BytesResponse) |
1811 | 0 | return true; |
1812 | 0 | failure: |
1813 | | // @@protoc_insertion_point(parse_failure:test.BytesResponse) |
1814 | 0 | return false; |
1815 | 0 | #undef DO_ |
1816 | 0 | } |
1817 | | |
1818 | | void BytesResponse::SerializeWithCachedSizes( |
1819 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
1820 | | // @@protoc_insertion_point(serialize_start:test.BytesResponse) |
1821 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
1822 | 0 | (void) cached_has_bits; |
1823 | |
|
1824 | 0 | cached_has_bits = _has_bits_[0]; |
1825 | | // required bytes databytes = 1; |
1826 | 0 | if (cached_has_bits & 0x00000001u) { |
1827 | 0 | ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( |
1828 | 0 | 1, this->databytes(), output); |
1829 | 0 | } |
1830 | |
|
1831 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
1832 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
1833 | 0 | _internal_metadata_.unknown_fields(), output); |
1834 | 0 | } |
1835 | | // @@protoc_insertion_point(serialize_end:test.BytesResponse) |
1836 | 0 | } |
1837 | | |
1838 | | ::google::protobuf::uint8* BytesResponse::InternalSerializeWithCachedSizesToArray( |
1839 | 0 | bool deterministic, ::google::protobuf::uint8* target) const { |
1840 | 0 | (void)deterministic; // Unused |
1841 | | // @@protoc_insertion_point(serialize_to_array_start:test.BytesResponse) |
1842 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
1843 | 0 | (void) cached_has_bits; |
1844 | |
|
1845 | 0 | cached_has_bits = _has_bits_[0]; |
1846 | | // required bytes databytes = 1; |
1847 | 0 | if (cached_has_bits & 0x00000001u) { |
1848 | 0 | target = |
1849 | 0 | ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( |
1850 | 0 | 1, this->databytes(), target); |
1851 | 0 | } |
1852 | |
|
1853 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
1854 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
1855 | 0 | _internal_metadata_.unknown_fields(), target); |
1856 | 0 | } |
1857 | | // @@protoc_insertion_point(serialize_to_array_end:test.BytesResponse) |
1858 | 0 | return target; |
1859 | 0 | } |
1860 | | |
1861 | 0 | size_t BytesResponse::ByteSizeLong() const { |
1862 | | // @@protoc_insertion_point(message_byte_size_start:test.BytesResponse) |
1863 | 0 | size_t total_size = 0; |
1864 | |
|
1865 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
1866 | 0 | total_size += |
1867 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
1868 | 0 | _internal_metadata_.unknown_fields()); |
1869 | 0 | } |
1870 | | // required bytes databytes = 1; |
1871 | 0 | if (has_databytes()) { |
1872 | 0 | total_size += 1 + |
1873 | 0 | ::google::protobuf::internal::WireFormatLite::BytesSize( |
1874 | 0 | this->databytes()); |
1875 | 0 | } |
1876 | 0 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
1877 | 0 | SetCachedSize(cached_size); |
1878 | 0 | return total_size; |
1879 | 0 | } |
1880 | | |
1881 | 0 | void BytesResponse::MergeFrom(const ::google::protobuf::Message& from) { |
1882 | | // @@protoc_insertion_point(generalized_merge_from_start:test.BytesResponse) |
1883 | 0 | GOOGLE_DCHECK_NE(&from, this); |
1884 | 0 | const BytesResponse* source = |
1885 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const BytesResponse>( |
1886 | 0 | &from); |
1887 | 0 | if (source == NULL) { |
1888 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:test.BytesResponse) |
1889 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
1890 | 0 | } else { |
1891 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:test.BytesResponse) |
1892 | 0 | MergeFrom(*source); |
1893 | 0 | } |
1894 | 0 | } |
1895 | | |
1896 | 0 | void BytesResponse::MergeFrom(const BytesResponse& from) { |
1897 | | // @@protoc_insertion_point(class_specific_merge_from_start:test.BytesResponse) |
1898 | 0 | GOOGLE_DCHECK_NE(&from, this); |
1899 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1900 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
1901 | 0 | (void) cached_has_bits; |
1902 | |
|
1903 | 0 | if (from.has_databytes()) { |
1904 | 0 | set_has_databytes(); |
1905 | 0 | databytes_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.databytes_); |
1906 | 0 | } |
1907 | 0 | } |
1908 | | |
1909 | 0 | void BytesResponse::CopyFrom(const ::google::protobuf::Message& from) { |
1910 | | // @@protoc_insertion_point(generalized_copy_from_start:test.BytesResponse) |
1911 | 0 | if (&from == this) return; |
1912 | 0 | Clear(); |
1913 | 0 | MergeFrom(from); |
1914 | 0 | } |
1915 | | |
1916 | 0 | void BytesResponse::CopyFrom(const BytesResponse& from) { |
1917 | | // @@protoc_insertion_point(class_specific_copy_from_start:test.BytesResponse) |
1918 | 0 | if (&from == this) return; |
1919 | 0 | Clear(); |
1920 | 0 | MergeFrom(from); |
1921 | 0 | } |
1922 | | |
1923 | 0 | bool BytesResponse::IsInitialized() const { |
1924 | 0 | if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; |
1925 | 0 | return true; |
1926 | 0 | } |
1927 | | |
1928 | 0 | void BytesResponse::Swap(BytesResponse* other) { |
1929 | 0 | if (other == this) return; |
1930 | 0 | InternalSwap(other); |
1931 | 0 | } |
1932 | 0 | void BytesResponse::InternalSwap(BytesResponse* other) { |
1933 | 0 | using std::swap; |
1934 | 0 | databytes_.Swap(&other->databytes_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
1935 | 0 | GetArenaNoVirtual()); |
1936 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
1937 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1938 | 0 | } |
1939 | | |
1940 | 0 | ::google::protobuf::Metadata BytesResponse::GetMetadata() const { |
1941 | 0 | protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
1942 | 0 | return ::protobuf_echo_2eproto::file_level_metadata[kIndexInFileMessages]; |
1943 | 0 | } |
1944 | | |
1945 | | |
1946 | | // =================================================================== |
1947 | | |
1948 | 2 | void ComboResponse::InitAsDefaultInstance() { |
1949 | 2 | } |
1950 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
1951 | | const int ComboResponse::kResponsesFieldNumber; |
1952 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
1953 | | |
1954 | | ComboResponse::ComboResponse() |
1955 | 2 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
1956 | 2 | ::google::protobuf::internal::InitSCC( |
1957 | 2 | &protobuf_echo_2eproto::scc_info_ComboResponse.base); |
1958 | 2 | SharedCtor(); |
1959 | | // @@protoc_insertion_point(constructor:test.ComboResponse) |
1960 | 2 | } |
1961 | | ComboResponse::ComboResponse(const ComboResponse& from) |
1962 | 0 | : ::google::protobuf::Message(), |
1963 | 0 | _internal_metadata_(NULL), |
1964 | 0 | _has_bits_(from._has_bits_), |
1965 | 0 | responses_(from.responses_) { |
1966 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1967 | | // @@protoc_insertion_point(copy_constructor:test.ComboResponse) |
1968 | 0 | } |
1969 | | |
1970 | 2 | void ComboResponse::SharedCtor() { |
1971 | 2 | } |
1972 | | |
1973 | 0 | ComboResponse::~ComboResponse() { |
1974 | | // @@protoc_insertion_point(destructor:test.ComboResponse) |
1975 | 0 | SharedDtor(); |
1976 | 0 | } |
1977 | | |
1978 | 0 | void ComboResponse::SharedDtor() { |
1979 | 0 | } |
1980 | | |
1981 | 0 | void ComboResponse::SetCachedSize(int size) const { |
1982 | 0 | _cached_size_.Set(size); |
1983 | 0 | } |
1984 | 0 | const ::google::protobuf::Descriptor* ComboResponse::descriptor() { |
1985 | 0 | ::protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
1986 | 0 | return ::protobuf_echo_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
1987 | 0 | } |
1988 | | |
1989 | 0 | const ComboResponse& ComboResponse::default_instance() { |
1990 | 0 | ::google::protobuf::internal::InitSCC(&protobuf_echo_2eproto::scc_info_ComboResponse.base); |
1991 | 0 | return *internal_default_instance(); |
1992 | 0 | } |
1993 | | |
1994 | | |
1995 | 0 | void ComboResponse::Clear() { |
1996 | | // @@protoc_insertion_point(message_clear_start:test.ComboResponse) |
1997 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
1998 | | // Prevent compiler warnings about cached_has_bits being unused |
1999 | 0 | (void) cached_has_bits; |
2000 | |
|
2001 | 0 | responses_.Clear(); |
2002 | 0 | _has_bits_.Clear(); |
2003 | 0 | _internal_metadata_.Clear(); |
2004 | 0 | } |
2005 | | |
2006 | | bool ComboResponse::MergePartialFromCodedStream( |
2007 | 0 | ::google::protobuf::io::CodedInputStream* input) { |
2008 | 0 | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
2009 | 0 | ::google::protobuf::uint32 tag; |
2010 | | // @@protoc_insertion_point(parse_start:test.ComboResponse) |
2011 | 0 | for (;;) { |
2012 | 0 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
2013 | 0 | tag = p.first; |
2014 | 0 | if (!p.second) goto handle_unusual; |
2015 | 0 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
2016 | | // repeated .test.EchoResponse responses = 1; |
2017 | 0 | case 1: { |
2018 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
2019 | 0 | static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { |
2020 | 0 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
2021 | 0 | input, add_responses())); |
2022 | 0 | } else { |
2023 | 0 | goto handle_unusual; |
2024 | 0 | } |
2025 | 0 | break; |
2026 | 0 | } |
2027 | | |
2028 | 0 | default: { |
2029 | 0 | handle_unusual: |
2030 | 0 | if (tag == 0) { |
2031 | 0 | goto success; |
2032 | 0 | } |
2033 | 0 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
2034 | 0 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
2035 | 0 | break; |
2036 | 0 | } |
2037 | 0 | } |
2038 | 0 | } |
2039 | 0 | success: |
2040 | | // @@protoc_insertion_point(parse_success:test.ComboResponse) |
2041 | 0 | return true; |
2042 | 0 | failure: |
2043 | | // @@protoc_insertion_point(parse_failure:test.ComboResponse) |
2044 | 0 | return false; |
2045 | 0 | #undef DO_ |
2046 | 0 | } |
2047 | | |
2048 | | void ComboResponse::SerializeWithCachedSizes( |
2049 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
2050 | | // @@protoc_insertion_point(serialize_start:test.ComboResponse) |
2051 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
2052 | 0 | (void) cached_has_bits; |
2053 | | |
2054 | | // repeated .test.EchoResponse responses = 1; |
2055 | 0 | for (unsigned int i = 0, |
2056 | 0 | n = static_cast<unsigned int>(this->responses_size()); i < n; i++) { |
2057 | 0 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
2058 | 0 | 1, |
2059 | 0 | this->responses(static_cast<int>(i)), |
2060 | 0 | output); |
2061 | 0 | } |
2062 | |
|
2063 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
2064 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
2065 | 0 | _internal_metadata_.unknown_fields(), output); |
2066 | 0 | } |
2067 | | // @@protoc_insertion_point(serialize_end:test.ComboResponse) |
2068 | 0 | } |
2069 | | |
2070 | | ::google::protobuf::uint8* ComboResponse::InternalSerializeWithCachedSizesToArray( |
2071 | 0 | bool deterministic, ::google::protobuf::uint8* target) const { |
2072 | 0 | (void)deterministic; // Unused |
2073 | | // @@protoc_insertion_point(serialize_to_array_start:test.ComboResponse) |
2074 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
2075 | 0 | (void) cached_has_bits; |
2076 | | |
2077 | | // repeated .test.EchoResponse responses = 1; |
2078 | 0 | for (unsigned int i = 0, |
2079 | 0 | n = static_cast<unsigned int>(this->responses_size()); i < n; i++) { |
2080 | 0 | target = ::google::protobuf::internal::WireFormatLite:: |
2081 | 0 | InternalWriteMessageToArray( |
2082 | 0 | 1, this->responses(static_cast<int>(i)), deterministic, target); |
2083 | 0 | } |
2084 | |
|
2085 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
2086 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
2087 | 0 | _internal_metadata_.unknown_fields(), target); |
2088 | 0 | } |
2089 | | // @@protoc_insertion_point(serialize_to_array_end:test.ComboResponse) |
2090 | 0 | return target; |
2091 | 0 | } |
2092 | | |
2093 | 0 | size_t ComboResponse::ByteSizeLong() const { |
2094 | | // @@protoc_insertion_point(message_byte_size_start:test.ComboResponse) |
2095 | 0 | size_t total_size = 0; |
2096 | |
|
2097 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
2098 | 0 | total_size += |
2099 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
2100 | 0 | _internal_metadata_.unknown_fields()); |
2101 | 0 | } |
2102 | | // repeated .test.EchoResponse responses = 1; |
2103 | 0 | { |
2104 | 0 | unsigned int count = static_cast<unsigned int>(this->responses_size()); |
2105 | 0 | total_size += 1UL * count; |
2106 | 0 | for (unsigned int i = 0; i < count; i++) { |
2107 | 0 | total_size += |
2108 | 0 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
2109 | 0 | this->responses(static_cast<int>(i))); |
2110 | 0 | } |
2111 | 0 | } |
2112 | |
|
2113 | 0 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
2114 | 0 | SetCachedSize(cached_size); |
2115 | 0 | return total_size; |
2116 | 0 | } |
2117 | | |
2118 | 0 | void ComboResponse::MergeFrom(const ::google::protobuf::Message& from) { |
2119 | | // @@protoc_insertion_point(generalized_merge_from_start:test.ComboResponse) |
2120 | 0 | GOOGLE_DCHECK_NE(&from, this); |
2121 | 0 | const ComboResponse* source = |
2122 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const ComboResponse>( |
2123 | 0 | &from); |
2124 | 0 | if (source == NULL) { |
2125 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:test.ComboResponse) |
2126 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
2127 | 0 | } else { |
2128 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:test.ComboResponse) |
2129 | 0 | MergeFrom(*source); |
2130 | 0 | } |
2131 | 0 | } |
2132 | | |
2133 | 0 | void ComboResponse::MergeFrom(const ComboResponse& from) { |
2134 | | // @@protoc_insertion_point(class_specific_merge_from_start:test.ComboResponse) |
2135 | 0 | GOOGLE_DCHECK_NE(&from, this); |
2136 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2137 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
2138 | 0 | (void) cached_has_bits; |
2139 | |
|
2140 | 0 | responses_.MergeFrom(from.responses_); |
2141 | 0 | } |
2142 | | |
2143 | 0 | void ComboResponse::CopyFrom(const ::google::protobuf::Message& from) { |
2144 | | // @@protoc_insertion_point(generalized_copy_from_start:test.ComboResponse) |
2145 | 0 | if (&from == this) return; |
2146 | 0 | Clear(); |
2147 | 0 | MergeFrom(from); |
2148 | 0 | } |
2149 | | |
2150 | 0 | void ComboResponse::CopyFrom(const ComboResponse& from) { |
2151 | | // @@protoc_insertion_point(class_specific_copy_from_start:test.ComboResponse) |
2152 | 0 | if (&from == this) return; |
2153 | 0 | Clear(); |
2154 | 0 | MergeFrom(from); |
2155 | 0 | } |
2156 | | |
2157 | 0 | bool ComboResponse::IsInitialized() const { |
2158 | 0 | if (!::google::protobuf::internal::AllAreInitialized(this->responses())) return false; |
2159 | 0 | return true; |
2160 | 0 | } |
2161 | | |
2162 | 0 | void ComboResponse::Swap(ComboResponse* other) { |
2163 | 0 | if (other == this) return; |
2164 | 0 | InternalSwap(other); |
2165 | 0 | } |
2166 | 0 | void ComboResponse::InternalSwap(ComboResponse* other) { |
2167 | 0 | using std::swap; |
2168 | 0 | CastToBase(&responses_)->InternalSwap(CastToBase(&other->responses_)); |
2169 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
2170 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
2171 | 0 | } |
2172 | | |
2173 | 0 | ::google::protobuf::Metadata ComboResponse::GetMetadata() const { |
2174 | 0 | protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
2175 | 0 | return ::protobuf_echo_2eproto::file_level_metadata[kIndexInFileMessages]; |
2176 | 0 | } |
2177 | | |
2178 | | |
2179 | | // =================================================================== |
2180 | | |
2181 | 2 | void HttpRequest::InitAsDefaultInstance() { |
2182 | 2 | } |
2183 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
2184 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
2185 | | |
2186 | | HttpRequest::HttpRequest() |
2187 | 2 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
2188 | 2 | ::google::protobuf::internal::InitSCC( |
2189 | 2 | &protobuf_echo_2eproto::scc_info_HttpRequest.base); |
2190 | 2 | SharedCtor(); |
2191 | | // @@protoc_insertion_point(constructor:test.HttpRequest) |
2192 | 2 | } |
2193 | | HttpRequest::HttpRequest(const HttpRequest& from) |
2194 | 0 | : ::google::protobuf::Message(), |
2195 | 0 | _internal_metadata_(NULL), |
2196 | 0 | _has_bits_(from._has_bits_) { |
2197 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2198 | | // @@protoc_insertion_point(copy_constructor:test.HttpRequest) |
2199 | 0 | } |
2200 | | |
2201 | 2 | void HttpRequest::SharedCtor() { |
2202 | 2 | } |
2203 | | |
2204 | 0 | HttpRequest::~HttpRequest() { |
2205 | | // @@protoc_insertion_point(destructor:test.HttpRequest) |
2206 | 0 | SharedDtor(); |
2207 | 0 | } |
2208 | | |
2209 | 0 | void HttpRequest::SharedDtor() { |
2210 | 0 | } |
2211 | | |
2212 | 0 | void HttpRequest::SetCachedSize(int size) const { |
2213 | 0 | _cached_size_.Set(size); |
2214 | 0 | } |
2215 | 0 | const ::google::protobuf::Descriptor* HttpRequest::descriptor() { |
2216 | 0 | ::protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
2217 | 0 | return ::protobuf_echo_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
2218 | 0 | } |
2219 | | |
2220 | 0 | const HttpRequest& HttpRequest::default_instance() { |
2221 | 0 | ::google::protobuf::internal::InitSCC(&protobuf_echo_2eproto::scc_info_HttpRequest.base); |
2222 | 0 | return *internal_default_instance(); |
2223 | 0 | } |
2224 | | |
2225 | | |
2226 | 0 | void HttpRequest::Clear() { |
2227 | | // @@protoc_insertion_point(message_clear_start:test.HttpRequest) |
2228 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
2229 | | // Prevent compiler warnings about cached_has_bits being unused |
2230 | 0 | (void) cached_has_bits; |
2231 | |
|
2232 | 0 | _has_bits_.Clear(); |
2233 | 0 | _internal_metadata_.Clear(); |
2234 | 0 | } |
2235 | | |
2236 | | bool HttpRequest::MergePartialFromCodedStream( |
2237 | 0 | ::google::protobuf::io::CodedInputStream* input) { |
2238 | 0 | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
2239 | 0 | ::google::protobuf::uint32 tag; |
2240 | | // @@protoc_insertion_point(parse_start:test.HttpRequest) |
2241 | 0 | for (;;) { |
2242 | 0 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
2243 | 0 | tag = p.first; |
2244 | 0 | if (!p.second) goto handle_unusual; |
2245 | 0 | handle_unusual: |
2246 | 0 | if (tag == 0) { |
2247 | 0 | goto success; |
2248 | 0 | } |
2249 | 0 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
2250 | 0 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
2251 | 0 | } |
2252 | 0 | success: |
2253 | | // @@protoc_insertion_point(parse_success:test.HttpRequest) |
2254 | 0 | return true; |
2255 | 0 | failure: |
2256 | | // @@protoc_insertion_point(parse_failure:test.HttpRequest) |
2257 | 0 | return false; |
2258 | 0 | #undef DO_ |
2259 | 0 | } |
2260 | | |
2261 | | void HttpRequest::SerializeWithCachedSizes( |
2262 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
2263 | | // @@protoc_insertion_point(serialize_start:test.HttpRequest) |
2264 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
2265 | 0 | (void) cached_has_bits; |
2266 | |
|
2267 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
2268 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
2269 | 0 | _internal_metadata_.unknown_fields(), output); |
2270 | 0 | } |
2271 | | // @@protoc_insertion_point(serialize_end:test.HttpRequest) |
2272 | 0 | } |
2273 | | |
2274 | | ::google::protobuf::uint8* HttpRequest::InternalSerializeWithCachedSizesToArray( |
2275 | 0 | bool deterministic, ::google::protobuf::uint8* target) const { |
2276 | 0 | (void)deterministic; // Unused |
2277 | | // @@protoc_insertion_point(serialize_to_array_start:test.HttpRequest) |
2278 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
2279 | 0 | (void) cached_has_bits; |
2280 | |
|
2281 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
2282 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
2283 | 0 | _internal_metadata_.unknown_fields(), target); |
2284 | 0 | } |
2285 | | // @@protoc_insertion_point(serialize_to_array_end:test.HttpRequest) |
2286 | 0 | return target; |
2287 | 0 | } |
2288 | | |
2289 | 0 | size_t HttpRequest::ByteSizeLong() const { |
2290 | | // @@protoc_insertion_point(message_byte_size_start:test.HttpRequest) |
2291 | 0 | size_t total_size = 0; |
2292 | |
|
2293 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
2294 | 0 | total_size += |
2295 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
2296 | 0 | _internal_metadata_.unknown_fields()); |
2297 | 0 | } |
2298 | 0 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
2299 | 0 | SetCachedSize(cached_size); |
2300 | 0 | return total_size; |
2301 | 0 | } |
2302 | | |
2303 | 0 | void HttpRequest::MergeFrom(const ::google::protobuf::Message& from) { |
2304 | | // @@protoc_insertion_point(generalized_merge_from_start:test.HttpRequest) |
2305 | 0 | GOOGLE_DCHECK_NE(&from, this); |
2306 | 0 | const HttpRequest* source = |
2307 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const HttpRequest>( |
2308 | 0 | &from); |
2309 | 0 | if (source == NULL) { |
2310 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:test.HttpRequest) |
2311 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
2312 | 0 | } else { |
2313 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:test.HttpRequest) |
2314 | 0 | MergeFrom(*source); |
2315 | 0 | } |
2316 | 0 | } |
2317 | | |
2318 | 0 | void HttpRequest::MergeFrom(const HttpRequest& from) { |
2319 | | // @@protoc_insertion_point(class_specific_merge_from_start:test.HttpRequest) |
2320 | 0 | GOOGLE_DCHECK_NE(&from, this); |
2321 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2322 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
2323 | 0 | (void) cached_has_bits; |
2324 | |
|
2325 | 0 | } |
2326 | | |
2327 | 0 | void HttpRequest::CopyFrom(const ::google::protobuf::Message& from) { |
2328 | | // @@protoc_insertion_point(generalized_copy_from_start:test.HttpRequest) |
2329 | 0 | if (&from == this) return; |
2330 | 0 | Clear(); |
2331 | 0 | MergeFrom(from); |
2332 | 0 | } |
2333 | | |
2334 | 0 | void HttpRequest::CopyFrom(const HttpRequest& from) { |
2335 | | // @@protoc_insertion_point(class_specific_copy_from_start:test.HttpRequest) |
2336 | 0 | if (&from == this) return; |
2337 | 0 | Clear(); |
2338 | 0 | MergeFrom(from); |
2339 | 0 | } |
2340 | | |
2341 | 0 | bool HttpRequest::IsInitialized() const { |
2342 | 0 | return true; |
2343 | 0 | } |
2344 | | |
2345 | 0 | void HttpRequest::Swap(HttpRequest* other) { |
2346 | 0 | if (other == this) return; |
2347 | 0 | InternalSwap(other); |
2348 | 0 | } |
2349 | 0 | void HttpRequest::InternalSwap(HttpRequest* other) { |
2350 | 0 | using std::swap; |
2351 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
2352 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
2353 | 0 | } |
2354 | | |
2355 | 0 | ::google::protobuf::Metadata HttpRequest::GetMetadata() const { |
2356 | 0 | protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
2357 | 0 | return ::protobuf_echo_2eproto::file_level_metadata[kIndexInFileMessages]; |
2358 | 0 | } |
2359 | | |
2360 | | |
2361 | | // =================================================================== |
2362 | | |
2363 | 2 | void HttpResponse::InitAsDefaultInstance() { |
2364 | 2 | } |
2365 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
2366 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
2367 | | |
2368 | | HttpResponse::HttpResponse() |
2369 | 2 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
2370 | 2 | ::google::protobuf::internal::InitSCC( |
2371 | 2 | &protobuf_echo_2eproto::scc_info_HttpResponse.base); |
2372 | 2 | SharedCtor(); |
2373 | | // @@protoc_insertion_point(constructor:test.HttpResponse) |
2374 | 2 | } |
2375 | | HttpResponse::HttpResponse(const HttpResponse& from) |
2376 | 0 | : ::google::protobuf::Message(), |
2377 | 0 | _internal_metadata_(NULL), |
2378 | 0 | _has_bits_(from._has_bits_) { |
2379 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2380 | | // @@protoc_insertion_point(copy_constructor:test.HttpResponse) |
2381 | 0 | } |
2382 | | |
2383 | 2 | void HttpResponse::SharedCtor() { |
2384 | 2 | } |
2385 | | |
2386 | 0 | HttpResponse::~HttpResponse() { |
2387 | | // @@protoc_insertion_point(destructor:test.HttpResponse) |
2388 | 0 | SharedDtor(); |
2389 | 0 | } |
2390 | | |
2391 | 0 | void HttpResponse::SharedDtor() { |
2392 | 0 | } |
2393 | | |
2394 | 0 | void HttpResponse::SetCachedSize(int size) const { |
2395 | 0 | _cached_size_.Set(size); |
2396 | 0 | } |
2397 | 0 | const ::google::protobuf::Descriptor* HttpResponse::descriptor() { |
2398 | 0 | ::protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
2399 | 0 | return ::protobuf_echo_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
2400 | 0 | } |
2401 | | |
2402 | 0 | const HttpResponse& HttpResponse::default_instance() { |
2403 | 0 | ::google::protobuf::internal::InitSCC(&protobuf_echo_2eproto::scc_info_HttpResponse.base); |
2404 | 0 | return *internal_default_instance(); |
2405 | 0 | } |
2406 | | |
2407 | | |
2408 | 0 | void HttpResponse::Clear() { |
2409 | | // @@protoc_insertion_point(message_clear_start:test.HttpResponse) |
2410 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
2411 | | // Prevent compiler warnings about cached_has_bits being unused |
2412 | 0 | (void) cached_has_bits; |
2413 | |
|
2414 | 0 | _has_bits_.Clear(); |
2415 | 0 | _internal_metadata_.Clear(); |
2416 | 0 | } |
2417 | | |
2418 | | bool HttpResponse::MergePartialFromCodedStream( |
2419 | 0 | ::google::protobuf::io::CodedInputStream* input) { |
2420 | 0 | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
2421 | 0 | ::google::protobuf::uint32 tag; |
2422 | | // @@protoc_insertion_point(parse_start:test.HttpResponse) |
2423 | 0 | for (;;) { |
2424 | 0 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
2425 | 0 | tag = p.first; |
2426 | 0 | if (!p.second) goto handle_unusual; |
2427 | 0 | handle_unusual: |
2428 | 0 | if (tag == 0) { |
2429 | 0 | goto success; |
2430 | 0 | } |
2431 | 0 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
2432 | 0 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
2433 | 0 | } |
2434 | 0 | success: |
2435 | | // @@protoc_insertion_point(parse_success:test.HttpResponse) |
2436 | 0 | return true; |
2437 | 0 | failure: |
2438 | | // @@protoc_insertion_point(parse_failure:test.HttpResponse) |
2439 | 0 | return false; |
2440 | 0 | #undef DO_ |
2441 | 0 | } |
2442 | | |
2443 | | void HttpResponse::SerializeWithCachedSizes( |
2444 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
2445 | | // @@protoc_insertion_point(serialize_start:test.HttpResponse) |
2446 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
2447 | 0 | (void) cached_has_bits; |
2448 | |
|
2449 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
2450 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
2451 | 0 | _internal_metadata_.unknown_fields(), output); |
2452 | 0 | } |
2453 | | // @@protoc_insertion_point(serialize_end:test.HttpResponse) |
2454 | 0 | } |
2455 | | |
2456 | | ::google::protobuf::uint8* HttpResponse::InternalSerializeWithCachedSizesToArray( |
2457 | 0 | bool deterministic, ::google::protobuf::uint8* target) const { |
2458 | 0 | (void)deterministic; // Unused |
2459 | | // @@protoc_insertion_point(serialize_to_array_start:test.HttpResponse) |
2460 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
2461 | 0 | (void) cached_has_bits; |
2462 | |
|
2463 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
2464 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
2465 | 0 | _internal_metadata_.unknown_fields(), target); |
2466 | 0 | } |
2467 | | // @@protoc_insertion_point(serialize_to_array_end:test.HttpResponse) |
2468 | 0 | return target; |
2469 | 0 | } |
2470 | | |
2471 | 0 | size_t HttpResponse::ByteSizeLong() const { |
2472 | | // @@protoc_insertion_point(message_byte_size_start:test.HttpResponse) |
2473 | 0 | size_t total_size = 0; |
2474 | |
|
2475 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
2476 | 0 | total_size += |
2477 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
2478 | 0 | _internal_metadata_.unknown_fields()); |
2479 | 0 | } |
2480 | 0 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
2481 | 0 | SetCachedSize(cached_size); |
2482 | 0 | return total_size; |
2483 | 0 | } |
2484 | | |
2485 | 0 | void HttpResponse::MergeFrom(const ::google::protobuf::Message& from) { |
2486 | | // @@protoc_insertion_point(generalized_merge_from_start:test.HttpResponse) |
2487 | 0 | GOOGLE_DCHECK_NE(&from, this); |
2488 | 0 | const HttpResponse* source = |
2489 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const HttpResponse>( |
2490 | 0 | &from); |
2491 | 0 | if (source == NULL) { |
2492 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:test.HttpResponse) |
2493 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
2494 | 0 | } else { |
2495 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:test.HttpResponse) |
2496 | 0 | MergeFrom(*source); |
2497 | 0 | } |
2498 | 0 | } |
2499 | | |
2500 | 0 | void HttpResponse::MergeFrom(const HttpResponse& from) { |
2501 | | // @@protoc_insertion_point(class_specific_merge_from_start:test.HttpResponse) |
2502 | 0 | GOOGLE_DCHECK_NE(&from, this); |
2503 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2504 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
2505 | 0 | (void) cached_has_bits; |
2506 | |
|
2507 | 0 | } |
2508 | | |
2509 | 0 | void HttpResponse::CopyFrom(const ::google::protobuf::Message& from) { |
2510 | | // @@protoc_insertion_point(generalized_copy_from_start:test.HttpResponse) |
2511 | 0 | if (&from == this) return; |
2512 | 0 | Clear(); |
2513 | 0 | MergeFrom(from); |
2514 | 0 | } |
2515 | | |
2516 | 0 | void HttpResponse::CopyFrom(const HttpResponse& from) { |
2517 | | // @@protoc_insertion_point(class_specific_copy_from_start:test.HttpResponse) |
2518 | 0 | if (&from == this) return; |
2519 | 0 | Clear(); |
2520 | 0 | MergeFrom(from); |
2521 | 0 | } |
2522 | | |
2523 | 0 | bool HttpResponse::IsInitialized() const { |
2524 | 0 | return true; |
2525 | 0 | } |
2526 | | |
2527 | 0 | void HttpResponse::Swap(HttpResponse* other) { |
2528 | 0 | if (other == this) return; |
2529 | 0 | InternalSwap(other); |
2530 | 0 | } |
2531 | 0 | void HttpResponse::InternalSwap(HttpResponse* other) { |
2532 | 0 | using std::swap; |
2533 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
2534 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
2535 | 0 | } |
2536 | | |
2537 | 0 | ::google::protobuf::Metadata HttpResponse::GetMetadata() const { |
2538 | 0 | protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
2539 | 0 | return ::protobuf_echo_2eproto::file_level_metadata[kIndexInFileMessages]; |
2540 | 0 | } |
2541 | | |
2542 | | |
2543 | | // =================================================================== |
2544 | | |
2545 | 2 | void Message1::InitAsDefaultInstance() { |
2546 | 2 | } |
2547 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
2548 | | const int Message1::kStatFieldNumber; |
2549 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
2550 | | |
2551 | | Message1::Message1() |
2552 | 2 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
2553 | 2 | ::google::protobuf::internal::InitSCC( |
2554 | 2 | &protobuf_echo_2eproto::scc_info_Message1.base); |
2555 | 2 | SharedCtor(); |
2556 | | // @@protoc_insertion_point(constructor:test.Message1) |
2557 | 2 | } |
2558 | | Message1::Message1(const Message1& from) |
2559 | 0 | : ::google::protobuf::Message(), |
2560 | 0 | _internal_metadata_(NULL), |
2561 | 0 | _has_bits_(from._has_bits_) { |
2562 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2563 | 0 | stat_ = from.stat_; |
2564 | | // @@protoc_insertion_point(copy_constructor:test.Message1) |
2565 | 0 | } |
2566 | | |
2567 | 2 | void Message1::SharedCtor() { |
2568 | 2 | stat_ = 0; |
2569 | 2 | } |
2570 | | |
2571 | 0 | Message1::~Message1() { |
2572 | | // @@protoc_insertion_point(destructor:test.Message1) |
2573 | 0 | SharedDtor(); |
2574 | 0 | } |
2575 | | |
2576 | 0 | void Message1::SharedDtor() { |
2577 | 0 | } |
2578 | | |
2579 | 0 | void Message1::SetCachedSize(int size) const { |
2580 | 0 | _cached_size_.Set(size); |
2581 | 0 | } |
2582 | 0 | const ::google::protobuf::Descriptor* Message1::descriptor() { |
2583 | 0 | ::protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
2584 | 0 | return ::protobuf_echo_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
2585 | 0 | } |
2586 | | |
2587 | 0 | const Message1& Message1::default_instance() { |
2588 | 0 | ::google::protobuf::internal::InitSCC(&protobuf_echo_2eproto::scc_info_Message1.base); |
2589 | 0 | return *internal_default_instance(); |
2590 | 0 | } |
2591 | | |
2592 | | |
2593 | 0 | void Message1::Clear() { |
2594 | | // @@protoc_insertion_point(message_clear_start:test.Message1) |
2595 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
2596 | | // Prevent compiler warnings about cached_has_bits being unused |
2597 | 0 | (void) cached_has_bits; |
2598 | |
|
2599 | 0 | stat_ = 0; |
2600 | 0 | _has_bits_.Clear(); |
2601 | 0 | _internal_metadata_.Clear(); |
2602 | 0 | } |
2603 | | |
2604 | | bool Message1::MergePartialFromCodedStream( |
2605 | 0 | ::google::protobuf::io::CodedInputStream* input) { |
2606 | 0 | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
2607 | 0 | ::google::protobuf::uint32 tag; |
2608 | | // @@protoc_insertion_point(parse_start:test.Message1) |
2609 | 0 | for (;;) { |
2610 | 0 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
2611 | 0 | tag = p.first; |
2612 | 0 | if (!p.second) goto handle_unusual; |
2613 | 0 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
2614 | | // required .test.State0 stat = 1; |
2615 | 0 | case 1: { |
2616 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
2617 | 0 | static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { |
2618 | 0 | int value; |
2619 | 0 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
2620 | 0 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
2621 | 0 | input, &value))); |
2622 | 0 | if (::test::State0_IsValid(value)) { |
2623 | 0 | set_stat(static_cast< ::test::State0 >(value)); |
2624 | 0 | } else { |
2625 | 0 | mutable_unknown_fields()->AddVarint( |
2626 | 0 | 1, static_cast< ::google::protobuf::uint64>(value)); |
2627 | 0 | } |
2628 | 0 | } else { |
2629 | 0 | goto handle_unusual; |
2630 | 0 | } |
2631 | 0 | break; |
2632 | 0 | } |
2633 | | |
2634 | 0 | default: { |
2635 | 0 | handle_unusual: |
2636 | 0 | if (tag == 0) { |
2637 | 0 | goto success; |
2638 | 0 | } |
2639 | 0 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
2640 | 0 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
2641 | 0 | break; |
2642 | 0 | } |
2643 | 0 | } |
2644 | 0 | } |
2645 | 0 | success: |
2646 | | // @@protoc_insertion_point(parse_success:test.Message1) |
2647 | 0 | return true; |
2648 | 0 | failure: |
2649 | | // @@protoc_insertion_point(parse_failure:test.Message1) |
2650 | 0 | return false; |
2651 | 0 | #undef DO_ |
2652 | 0 | } |
2653 | | |
2654 | | void Message1::SerializeWithCachedSizes( |
2655 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
2656 | | // @@protoc_insertion_point(serialize_start:test.Message1) |
2657 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
2658 | 0 | (void) cached_has_bits; |
2659 | |
|
2660 | 0 | cached_has_bits = _has_bits_[0]; |
2661 | | // required .test.State0 stat = 1; |
2662 | 0 | if (cached_has_bits & 0x00000001u) { |
2663 | 0 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
2664 | 0 | 1, this->stat(), output); |
2665 | 0 | } |
2666 | |
|
2667 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
2668 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
2669 | 0 | _internal_metadata_.unknown_fields(), output); |
2670 | 0 | } |
2671 | | // @@protoc_insertion_point(serialize_end:test.Message1) |
2672 | 0 | } |
2673 | | |
2674 | | ::google::protobuf::uint8* Message1::InternalSerializeWithCachedSizesToArray( |
2675 | 0 | bool deterministic, ::google::protobuf::uint8* target) const { |
2676 | 0 | (void)deterministic; // Unused |
2677 | | // @@protoc_insertion_point(serialize_to_array_start:test.Message1) |
2678 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
2679 | 0 | (void) cached_has_bits; |
2680 | |
|
2681 | 0 | cached_has_bits = _has_bits_[0]; |
2682 | | // required .test.State0 stat = 1; |
2683 | 0 | if (cached_has_bits & 0x00000001u) { |
2684 | 0 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
2685 | 0 | 1, this->stat(), target); |
2686 | 0 | } |
2687 | |
|
2688 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
2689 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
2690 | 0 | _internal_metadata_.unknown_fields(), target); |
2691 | 0 | } |
2692 | | // @@protoc_insertion_point(serialize_to_array_end:test.Message1) |
2693 | 0 | return target; |
2694 | 0 | } |
2695 | | |
2696 | 0 | size_t Message1::ByteSizeLong() const { |
2697 | | // @@protoc_insertion_point(message_byte_size_start:test.Message1) |
2698 | 0 | size_t total_size = 0; |
2699 | |
|
2700 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
2701 | 0 | total_size += |
2702 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
2703 | 0 | _internal_metadata_.unknown_fields()); |
2704 | 0 | } |
2705 | | // required .test.State0 stat = 1; |
2706 | 0 | if (has_stat()) { |
2707 | 0 | total_size += 1 + |
2708 | 0 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->stat()); |
2709 | 0 | } |
2710 | 0 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
2711 | 0 | SetCachedSize(cached_size); |
2712 | 0 | return total_size; |
2713 | 0 | } |
2714 | | |
2715 | 0 | void Message1::MergeFrom(const ::google::protobuf::Message& from) { |
2716 | | // @@protoc_insertion_point(generalized_merge_from_start:test.Message1) |
2717 | 0 | GOOGLE_DCHECK_NE(&from, this); |
2718 | 0 | const Message1* source = |
2719 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const Message1>( |
2720 | 0 | &from); |
2721 | 0 | if (source == NULL) { |
2722 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:test.Message1) |
2723 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
2724 | 0 | } else { |
2725 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:test.Message1) |
2726 | 0 | MergeFrom(*source); |
2727 | 0 | } |
2728 | 0 | } |
2729 | | |
2730 | 0 | void Message1::MergeFrom(const Message1& from) { |
2731 | | // @@protoc_insertion_point(class_specific_merge_from_start:test.Message1) |
2732 | 0 | GOOGLE_DCHECK_NE(&from, this); |
2733 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2734 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
2735 | 0 | (void) cached_has_bits; |
2736 | |
|
2737 | 0 | if (from.has_stat()) { |
2738 | 0 | set_stat(from.stat()); |
2739 | 0 | } |
2740 | 0 | } |
2741 | | |
2742 | 0 | void Message1::CopyFrom(const ::google::protobuf::Message& from) { |
2743 | | // @@protoc_insertion_point(generalized_copy_from_start:test.Message1) |
2744 | 0 | if (&from == this) return; |
2745 | 0 | Clear(); |
2746 | 0 | MergeFrom(from); |
2747 | 0 | } |
2748 | | |
2749 | 0 | void Message1::CopyFrom(const Message1& from) { |
2750 | | // @@protoc_insertion_point(class_specific_copy_from_start:test.Message1) |
2751 | 0 | if (&from == this) return; |
2752 | 0 | Clear(); |
2753 | 0 | MergeFrom(from); |
2754 | 0 | } |
2755 | | |
2756 | 0 | bool Message1::IsInitialized() const { |
2757 | 0 | if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; |
2758 | 0 | return true; |
2759 | 0 | } |
2760 | | |
2761 | 0 | void Message1::Swap(Message1* other) { |
2762 | 0 | if (other == this) return; |
2763 | 0 | InternalSwap(other); |
2764 | 0 | } |
2765 | 0 | void Message1::InternalSwap(Message1* other) { |
2766 | 0 | using std::swap; |
2767 | 0 | swap(stat_, other->stat_); |
2768 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
2769 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
2770 | 0 | } |
2771 | | |
2772 | 0 | ::google::protobuf::Metadata Message1::GetMetadata() const { |
2773 | 0 | protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
2774 | 0 | return ::protobuf_echo_2eproto::file_level_metadata[kIndexInFileMessages]; |
2775 | 0 | } |
2776 | | |
2777 | | |
2778 | | // =================================================================== |
2779 | | |
2780 | 2 | void Message2::InitAsDefaultInstance() { |
2781 | 2 | } |
2782 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
2783 | | const int Message2::kStatFieldNumber; |
2784 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
2785 | | |
2786 | | Message2::Message2() |
2787 | 2 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
2788 | 2 | ::google::protobuf::internal::InitSCC( |
2789 | 2 | &protobuf_echo_2eproto::scc_info_Message2.base); |
2790 | 2 | SharedCtor(); |
2791 | | // @@protoc_insertion_point(constructor:test.Message2) |
2792 | 2 | } |
2793 | | Message2::Message2(const Message2& from) |
2794 | 0 | : ::google::protobuf::Message(), |
2795 | 0 | _internal_metadata_(NULL), |
2796 | 0 | _has_bits_(from._has_bits_) { |
2797 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2798 | 0 | stat_ = from.stat_; |
2799 | | // @@protoc_insertion_point(copy_constructor:test.Message2) |
2800 | 0 | } |
2801 | | |
2802 | 2 | void Message2::SharedCtor() { |
2803 | 2 | stat_ = 0; |
2804 | 2 | } |
2805 | | |
2806 | 0 | Message2::~Message2() { |
2807 | | // @@protoc_insertion_point(destructor:test.Message2) |
2808 | 0 | SharedDtor(); |
2809 | 0 | } |
2810 | | |
2811 | 0 | void Message2::SharedDtor() { |
2812 | 0 | } |
2813 | | |
2814 | 0 | void Message2::SetCachedSize(int size) const { |
2815 | 0 | _cached_size_.Set(size); |
2816 | 0 | } |
2817 | 0 | const ::google::protobuf::Descriptor* Message2::descriptor() { |
2818 | 0 | ::protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
2819 | 0 | return ::protobuf_echo_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
2820 | 0 | } |
2821 | | |
2822 | 0 | const Message2& Message2::default_instance() { |
2823 | 0 | ::google::protobuf::internal::InitSCC(&protobuf_echo_2eproto::scc_info_Message2.base); |
2824 | 0 | return *internal_default_instance(); |
2825 | 0 | } |
2826 | | |
2827 | | |
2828 | 0 | void Message2::Clear() { |
2829 | | // @@protoc_insertion_point(message_clear_start:test.Message2) |
2830 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
2831 | | // Prevent compiler warnings about cached_has_bits being unused |
2832 | 0 | (void) cached_has_bits; |
2833 | |
|
2834 | 0 | stat_ = 0; |
2835 | 0 | _has_bits_.Clear(); |
2836 | 0 | _internal_metadata_.Clear(); |
2837 | 0 | } |
2838 | | |
2839 | | bool Message2::MergePartialFromCodedStream( |
2840 | 0 | ::google::protobuf::io::CodedInputStream* input) { |
2841 | 0 | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
2842 | 0 | ::google::protobuf::uint32 tag; |
2843 | | // @@protoc_insertion_point(parse_start:test.Message2) |
2844 | 0 | for (;;) { |
2845 | 0 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
2846 | 0 | tag = p.first; |
2847 | 0 | if (!p.second) goto handle_unusual; |
2848 | 0 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
2849 | | // required .test.State1 stat = 1; |
2850 | 0 | case 1: { |
2851 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
2852 | 0 | static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { |
2853 | 0 | int value; |
2854 | 0 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
2855 | 0 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
2856 | 0 | input, &value))); |
2857 | 0 | if (::test::State1_IsValid(value)) { |
2858 | 0 | set_stat(static_cast< ::test::State1 >(value)); |
2859 | 0 | } else { |
2860 | 0 | mutable_unknown_fields()->AddVarint( |
2861 | 0 | 1, static_cast< ::google::protobuf::uint64>(value)); |
2862 | 0 | } |
2863 | 0 | } else { |
2864 | 0 | goto handle_unusual; |
2865 | 0 | } |
2866 | 0 | break; |
2867 | 0 | } |
2868 | | |
2869 | 0 | default: { |
2870 | 0 | handle_unusual: |
2871 | 0 | if (tag == 0) { |
2872 | 0 | goto success; |
2873 | 0 | } |
2874 | 0 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
2875 | 0 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
2876 | 0 | break; |
2877 | 0 | } |
2878 | 0 | } |
2879 | 0 | } |
2880 | 0 | success: |
2881 | | // @@protoc_insertion_point(parse_success:test.Message2) |
2882 | 0 | return true; |
2883 | 0 | failure: |
2884 | | // @@protoc_insertion_point(parse_failure:test.Message2) |
2885 | 0 | return false; |
2886 | 0 | #undef DO_ |
2887 | 0 | } |
2888 | | |
2889 | | void Message2::SerializeWithCachedSizes( |
2890 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
2891 | | // @@protoc_insertion_point(serialize_start:test.Message2) |
2892 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
2893 | 0 | (void) cached_has_bits; |
2894 | |
|
2895 | 0 | cached_has_bits = _has_bits_[0]; |
2896 | | // required .test.State1 stat = 1; |
2897 | 0 | if (cached_has_bits & 0x00000001u) { |
2898 | 0 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
2899 | 0 | 1, this->stat(), output); |
2900 | 0 | } |
2901 | |
|
2902 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
2903 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
2904 | 0 | _internal_metadata_.unknown_fields(), output); |
2905 | 0 | } |
2906 | | // @@protoc_insertion_point(serialize_end:test.Message2) |
2907 | 0 | } |
2908 | | |
2909 | | ::google::protobuf::uint8* Message2::InternalSerializeWithCachedSizesToArray( |
2910 | 0 | bool deterministic, ::google::protobuf::uint8* target) const { |
2911 | 0 | (void)deterministic; // Unused |
2912 | | // @@protoc_insertion_point(serialize_to_array_start:test.Message2) |
2913 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
2914 | 0 | (void) cached_has_bits; |
2915 | |
|
2916 | 0 | cached_has_bits = _has_bits_[0]; |
2917 | | // required .test.State1 stat = 1; |
2918 | 0 | if (cached_has_bits & 0x00000001u) { |
2919 | 0 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
2920 | 0 | 1, this->stat(), target); |
2921 | 0 | } |
2922 | |
|
2923 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
2924 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
2925 | 0 | _internal_metadata_.unknown_fields(), target); |
2926 | 0 | } |
2927 | | // @@protoc_insertion_point(serialize_to_array_end:test.Message2) |
2928 | 0 | return target; |
2929 | 0 | } |
2930 | | |
2931 | 0 | size_t Message2::ByteSizeLong() const { |
2932 | | // @@protoc_insertion_point(message_byte_size_start:test.Message2) |
2933 | 0 | size_t total_size = 0; |
2934 | |
|
2935 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
2936 | 0 | total_size += |
2937 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
2938 | 0 | _internal_metadata_.unknown_fields()); |
2939 | 0 | } |
2940 | | // required .test.State1 stat = 1; |
2941 | 0 | if (has_stat()) { |
2942 | 0 | total_size += 1 + |
2943 | 0 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->stat()); |
2944 | 0 | } |
2945 | 0 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
2946 | 0 | SetCachedSize(cached_size); |
2947 | 0 | return total_size; |
2948 | 0 | } |
2949 | | |
2950 | 0 | void Message2::MergeFrom(const ::google::protobuf::Message& from) { |
2951 | | // @@protoc_insertion_point(generalized_merge_from_start:test.Message2) |
2952 | 0 | GOOGLE_DCHECK_NE(&from, this); |
2953 | 0 | const Message2* source = |
2954 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const Message2>( |
2955 | 0 | &from); |
2956 | 0 | if (source == NULL) { |
2957 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:test.Message2) |
2958 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
2959 | 0 | } else { |
2960 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:test.Message2) |
2961 | 0 | MergeFrom(*source); |
2962 | 0 | } |
2963 | 0 | } |
2964 | | |
2965 | 0 | void Message2::MergeFrom(const Message2& from) { |
2966 | | // @@protoc_insertion_point(class_specific_merge_from_start:test.Message2) |
2967 | 0 | GOOGLE_DCHECK_NE(&from, this); |
2968 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2969 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
2970 | 0 | (void) cached_has_bits; |
2971 | |
|
2972 | 0 | if (from.has_stat()) { |
2973 | 0 | set_stat(from.stat()); |
2974 | 0 | } |
2975 | 0 | } |
2976 | | |
2977 | 0 | void Message2::CopyFrom(const ::google::protobuf::Message& from) { |
2978 | | // @@protoc_insertion_point(generalized_copy_from_start:test.Message2) |
2979 | 0 | if (&from == this) return; |
2980 | 0 | Clear(); |
2981 | 0 | MergeFrom(from); |
2982 | 0 | } |
2983 | | |
2984 | 0 | void Message2::CopyFrom(const Message2& from) { |
2985 | | // @@protoc_insertion_point(class_specific_copy_from_start:test.Message2) |
2986 | 0 | if (&from == this) return; |
2987 | 0 | Clear(); |
2988 | 0 | MergeFrom(from); |
2989 | 0 | } |
2990 | | |
2991 | 0 | bool Message2::IsInitialized() const { |
2992 | 0 | if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; |
2993 | 0 | return true; |
2994 | 0 | } |
2995 | | |
2996 | 0 | void Message2::Swap(Message2* other) { |
2997 | 0 | if (other == this) return; |
2998 | 0 | InternalSwap(other); |
2999 | 0 | } |
3000 | 0 | void Message2::InternalSwap(Message2* other) { |
3001 | 0 | using std::swap; |
3002 | 0 | swap(stat_, other->stat_); |
3003 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
3004 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
3005 | 0 | } |
3006 | | |
3007 | 0 | ::google::protobuf::Metadata Message2::GetMetadata() const { |
3008 | 0 | protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
3009 | 0 | return ::protobuf_echo_2eproto::file_level_metadata[kIndexInFileMessages]; |
3010 | 0 | } |
3011 | | |
3012 | | |
3013 | | // =================================================================== |
3014 | | |
3015 | 2 | void RecursiveMessage::InitAsDefaultInstance() { |
3016 | 2 | ::test::_RecursiveMessage_default_instance_._instance.get_mutable()->child_ = const_cast< ::test::RecursiveMessage*>( |
3017 | 2 | ::test::RecursiveMessage::internal_default_instance()); |
3018 | 2 | } |
3019 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
3020 | | const int RecursiveMessage::kChildFieldNumber; |
3021 | | const int RecursiveMessage::kDataFieldNumber; |
3022 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
3023 | | |
3024 | | RecursiveMessage::RecursiveMessage() |
3025 | 2 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
3026 | 2 | ::google::protobuf::internal::InitSCC( |
3027 | 2 | &protobuf_echo_2eproto::scc_info_RecursiveMessage.base); |
3028 | 2 | SharedCtor(); |
3029 | | // @@protoc_insertion_point(constructor:test.RecursiveMessage) |
3030 | 2 | } |
3031 | | RecursiveMessage::RecursiveMessage(const RecursiveMessage& from) |
3032 | 0 | : ::google::protobuf::Message(), |
3033 | 0 | _internal_metadata_(NULL), |
3034 | 0 | _has_bits_(from._has_bits_) { |
3035 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3036 | 0 | data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
3037 | 0 | if (from.has_data()) { |
3038 | 0 | data_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.data_); |
3039 | 0 | } |
3040 | 0 | if (from.has_child()) { |
3041 | 0 | child_ = new ::test::RecursiveMessage(*from.child_); |
3042 | 0 | } else { |
3043 | 0 | child_ = NULL; |
3044 | 0 | } |
3045 | | // @@protoc_insertion_point(copy_constructor:test.RecursiveMessage) |
3046 | 0 | } |
3047 | | |
3048 | 2 | void RecursiveMessage::SharedCtor() { |
3049 | 2 | data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
3050 | 2 | child_ = NULL; |
3051 | 2 | } |
3052 | | |
3053 | 0 | RecursiveMessage::~RecursiveMessage() { |
3054 | | // @@protoc_insertion_point(destructor:test.RecursiveMessage) |
3055 | 0 | SharedDtor(); |
3056 | 0 | } |
3057 | | |
3058 | 0 | void RecursiveMessage::SharedDtor() { |
3059 | 0 | data_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
3060 | 0 | if (this != internal_default_instance()) delete child_; |
3061 | 0 | } |
3062 | | |
3063 | 0 | void RecursiveMessage::SetCachedSize(int size) const { |
3064 | 0 | _cached_size_.Set(size); |
3065 | 0 | } |
3066 | 0 | const ::google::protobuf::Descriptor* RecursiveMessage::descriptor() { |
3067 | 0 | ::protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
3068 | 0 | return ::protobuf_echo_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
3069 | 0 | } |
3070 | | |
3071 | 0 | const RecursiveMessage& RecursiveMessage::default_instance() { |
3072 | 0 | ::google::protobuf::internal::InitSCC(&protobuf_echo_2eproto::scc_info_RecursiveMessage.base); |
3073 | 0 | return *internal_default_instance(); |
3074 | 0 | } |
3075 | | |
3076 | | |
3077 | 0 | void RecursiveMessage::Clear() { |
3078 | | // @@protoc_insertion_point(message_clear_start:test.RecursiveMessage) |
3079 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
3080 | | // Prevent compiler warnings about cached_has_bits being unused |
3081 | 0 | (void) cached_has_bits; |
3082 | |
|
3083 | 0 | cached_has_bits = _has_bits_[0]; |
3084 | 0 | if (cached_has_bits & 3u) { |
3085 | 0 | if (cached_has_bits & 0x00000001u) { |
3086 | 0 | data_.ClearNonDefaultToEmptyNoArena(); |
3087 | 0 | } |
3088 | 0 | if (cached_has_bits & 0x00000002u) { |
3089 | 0 | GOOGLE_DCHECK(child_ != NULL); |
3090 | 0 | child_->Clear(); |
3091 | 0 | } |
3092 | 0 | } |
3093 | 0 | _has_bits_.Clear(); |
3094 | 0 | _internal_metadata_.Clear(); |
3095 | 0 | } |
3096 | | |
3097 | | bool RecursiveMessage::MergePartialFromCodedStream( |
3098 | 0 | ::google::protobuf::io::CodedInputStream* input) { |
3099 | 0 | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
3100 | 0 | ::google::protobuf::uint32 tag; |
3101 | | // @@protoc_insertion_point(parse_start:test.RecursiveMessage) |
3102 | 0 | for (;;) { |
3103 | 0 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
3104 | 0 | tag = p.first; |
3105 | 0 | if (!p.second) goto handle_unusual; |
3106 | 0 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
3107 | | // optional .test.RecursiveMessage child = 1; |
3108 | 0 | case 1: { |
3109 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
3110 | 0 | static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { |
3111 | 0 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
3112 | 0 | input, mutable_child())); |
3113 | 0 | } else { |
3114 | 0 | goto handle_unusual; |
3115 | 0 | } |
3116 | 0 | break; |
3117 | 0 | } |
3118 | | |
3119 | | // optional string data = 2; |
3120 | 0 | case 2: { |
3121 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
3122 | 0 | static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { |
3123 | 0 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
3124 | 0 | input, this->mutable_data())); |
3125 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
3126 | 0 | this->data().data(), static_cast<int>(this->data().length()), |
3127 | 0 | ::google::protobuf::internal::WireFormat::PARSE, |
3128 | 0 | "test.RecursiveMessage.data"); |
3129 | 0 | } else { |
3130 | 0 | goto handle_unusual; |
3131 | 0 | } |
3132 | 0 | break; |
3133 | 0 | } |
3134 | | |
3135 | 0 | default: { |
3136 | 0 | handle_unusual: |
3137 | 0 | if (tag == 0) { |
3138 | 0 | goto success; |
3139 | 0 | } |
3140 | 0 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
3141 | 0 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
3142 | 0 | break; |
3143 | 0 | } |
3144 | 0 | } |
3145 | 0 | } |
3146 | 0 | success: |
3147 | | // @@protoc_insertion_point(parse_success:test.RecursiveMessage) |
3148 | 0 | return true; |
3149 | 0 | failure: |
3150 | | // @@protoc_insertion_point(parse_failure:test.RecursiveMessage) |
3151 | 0 | return false; |
3152 | 0 | #undef DO_ |
3153 | 0 | } |
3154 | | |
3155 | | void RecursiveMessage::SerializeWithCachedSizes( |
3156 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
3157 | | // @@protoc_insertion_point(serialize_start:test.RecursiveMessage) |
3158 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
3159 | 0 | (void) cached_has_bits; |
3160 | |
|
3161 | 0 | cached_has_bits = _has_bits_[0]; |
3162 | | // optional .test.RecursiveMessage child = 1; |
3163 | 0 | if (cached_has_bits & 0x00000002u) { |
3164 | 0 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
3165 | 0 | 1, this->_internal_child(), output); |
3166 | 0 | } |
3167 | | |
3168 | | // optional string data = 2; |
3169 | 0 | if (cached_has_bits & 0x00000001u) { |
3170 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
3171 | 0 | this->data().data(), static_cast<int>(this->data().length()), |
3172 | 0 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
3173 | 0 | "test.RecursiveMessage.data"); |
3174 | 0 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
3175 | 0 | 2, this->data(), output); |
3176 | 0 | } |
3177 | |
|
3178 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
3179 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
3180 | 0 | _internal_metadata_.unknown_fields(), output); |
3181 | 0 | } |
3182 | | // @@protoc_insertion_point(serialize_end:test.RecursiveMessage) |
3183 | 0 | } |
3184 | | |
3185 | | ::google::protobuf::uint8* RecursiveMessage::InternalSerializeWithCachedSizesToArray( |
3186 | 0 | bool deterministic, ::google::protobuf::uint8* target) const { |
3187 | 0 | (void)deterministic; // Unused |
3188 | | // @@protoc_insertion_point(serialize_to_array_start:test.RecursiveMessage) |
3189 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
3190 | 0 | (void) cached_has_bits; |
3191 | |
|
3192 | 0 | cached_has_bits = _has_bits_[0]; |
3193 | | // optional .test.RecursiveMessage child = 1; |
3194 | 0 | if (cached_has_bits & 0x00000002u) { |
3195 | 0 | target = ::google::protobuf::internal::WireFormatLite:: |
3196 | 0 | InternalWriteMessageToArray( |
3197 | 0 | 1, this->_internal_child(), deterministic, target); |
3198 | 0 | } |
3199 | | |
3200 | | // optional string data = 2; |
3201 | 0 | if (cached_has_bits & 0x00000001u) { |
3202 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
3203 | 0 | this->data().data(), static_cast<int>(this->data().length()), |
3204 | 0 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
3205 | 0 | "test.RecursiveMessage.data"); |
3206 | 0 | target = |
3207 | 0 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
3208 | 0 | 2, this->data(), target); |
3209 | 0 | } |
3210 | |
|
3211 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
3212 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
3213 | 0 | _internal_metadata_.unknown_fields(), target); |
3214 | 0 | } |
3215 | | // @@protoc_insertion_point(serialize_to_array_end:test.RecursiveMessage) |
3216 | 0 | return target; |
3217 | 0 | } |
3218 | | |
3219 | 0 | size_t RecursiveMessage::ByteSizeLong() const { |
3220 | | // @@protoc_insertion_point(message_byte_size_start:test.RecursiveMessage) |
3221 | 0 | size_t total_size = 0; |
3222 | |
|
3223 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
3224 | 0 | total_size += |
3225 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
3226 | 0 | _internal_metadata_.unknown_fields()); |
3227 | 0 | } |
3228 | 0 | if (_has_bits_[0 / 32] & 3u) { |
3229 | | // optional string data = 2; |
3230 | 0 | if (has_data()) { |
3231 | 0 | total_size += 1 + |
3232 | 0 | ::google::protobuf::internal::WireFormatLite::StringSize( |
3233 | 0 | this->data()); |
3234 | 0 | } |
3235 | | |
3236 | | // optional .test.RecursiveMessage child = 1; |
3237 | 0 | if (has_child()) { |
3238 | 0 | total_size += 1 + |
3239 | 0 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
3240 | 0 | *child_); |
3241 | 0 | } |
3242 | |
|
3243 | 0 | } |
3244 | 0 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
3245 | 0 | SetCachedSize(cached_size); |
3246 | 0 | return total_size; |
3247 | 0 | } |
3248 | | |
3249 | 0 | void RecursiveMessage::MergeFrom(const ::google::protobuf::Message& from) { |
3250 | | // @@protoc_insertion_point(generalized_merge_from_start:test.RecursiveMessage) |
3251 | 0 | GOOGLE_DCHECK_NE(&from, this); |
3252 | 0 | const RecursiveMessage* source = |
3253 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const RecursiveMessage>( |
3254 | 0 | &from); |
3255 | 0 | if (source == NULL) { |
3256 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:test.RecursiveMessage) |
3257 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
3258 | 0 | } else { |
3259 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:test.RecursiveMessage) |
3260 | 0 | MergeFrom(*source); |
3261 | 0 | } |
3262 | 0 | } |
3263 | | |
3264 | 0 | void RecursiveMessage::MergeFrom(const RecursiveMessage& from) { |
3265 | | // @@protoc_insertion_point(class_specific_merge_from_start:test.RecursiveMessage) |
3266 | 0 | GOOGLE_DCHECK_NE(&from, this); |
3267 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3268 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
3269 | 0 | (void) cached_has_bits; |
3270 | |
|
3271 | 0 | cached_has_bits = from._has_bits_[0]; |
3272 | 0 | if (cached_has_bits & 3u) { |
3273 | 0 | if (cached_has_bits & 0x00000001u) { |
3274 | 0 | set_has_data(); |
3275 | 0 | data_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.data_); |
3276 | 0 | } |
3277 | 0 | if (cached_has_bits & 0x00000002u) { |
3278 | 0 | mutable_child()->::test::RecursiveMessage::MergeFrom(from.child()); |
3279 | 0 | } |
3280 | 0 | } |
3281 | 0 | } |
3282 | | |
3283 | 0 | void RecursiveMessage::CopyFrom(const ::google::protobuf::Message& from) { |
3284 | | // @@protoc_insertion_point(generalized_copy_from_start:test.RecursiveMessage) |
3285 | 0 | if (&from == this) return; |
3286 | 0 | Clear(); |
3287 | 0 | MergeFrom(from); |
3288 | 0 | } |
3289 | | |
3290 | 0 | void RecursiveMessage::CopyFrom(const RecursiveMessage& from) { |
3291 | | // @@protoc_insertion_point(class_specific_copy_from_start:test.RecursiveMessage) |
3292 | 0 | if (&from == this) return; |
3293 | 0 | Clear(); |
3294 | 0 | MergeFrom(from); |
3295 | 0 | } |
3296 | | |
3297 | 0 | bool RecursiveMessage::IsInitialized() const { |
3298 | 0 | return true; |
3299 | 0 | } |
3300 | | |
3301 | 0 | void RecursiveMessage::Swap(RecursiveMessage* other) { |
3302 | 0 | if (other == this) return; |
3303 | 0 | InternalSwap(other); |
3304 | 0 | } |
3305 | 0 | void RecursiveMessage::InternalSwap(RecursiveMessage* other) { |
3306 | 0 | using std::swap; |
3307 | 0 | data_.Swap(&other->data_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
3308 | 0 | GetArenaNoVirtual()); |
3309 | 0 | swap(child_, other->child_); |
3310 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
3311 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
3312 | 0 | } |
3313 | | |
3314 | 0 | ::google::protobuf::Metadata RecursiveMessage::GetMetadata() const { |
3315 | 0 | protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
3316 | 0 | return ::protobuf_echo_2eproto::file_level_metadata[kIndexInFileMessages]; |
3317 | 0 | } |
3318 | | |
3319 | | |
3320 | | // =================================================================== |
3321 | | |
3322 | 0 | EchoService::~EchoService() {} |
3323 | | |
3324 | 0 | const ::google::protobuf::ServiceDescriptor* EchoService::descriptor() { |
3325 | 0 | protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
3326 | 0 | return protobuf_echo_2eproto::file_level_service_descriptors[0]; |
3327 | 0 | } |
3328 | | |
3329 | 0 | const ::google::protobuf::ServiceDescriptor* EchoService::GetDescriptor() { |
3330 | 0 | return descriptor(); |
3331 | 0 | } |
3332 | | |
3333 | | void EchoService::Echo(::google::protobuf::RpcController* controller, |
3334 | | const ::test::EchoRequest*, |
3335 | | ::test::EchoResponse*, |
3336 | 0 | ::google::protobuf::Closure* done) { |
3337 | 0 | controller->SetFailed("Method Echo() not implemented."); |
3338 | 0 | done->Run(); |
3339 | 0 | } |
3340 | | |
3341 | | void EchoService::ComboEcho(::google::protobuf::RpcController* controller, |
3342 | | const ::test::ComboRequest*, |
3343 | | ::test::ComboResponse*, |
3344 | 0 | ::google::protobuf::Closure* done) { |
3345 | 0 | controller->SetFailed("Method ComboEcho() not implemented."); |
3346 | 0 | done->Run(); |
3347 | 0 | } |
3348 | | |
3349 | | void EchoService::BytesEcho1(::google::protobuf::RpcController* controller, |
3350 | | const ::test::BytesRequest*, |
3351 | | ::test::BytesResponse*, |
3352 | 0 | ::google::protobuf::Closure* done) { |
3353 | 0 | controller->SetFailed("Method BytesEcho1() not implemented."); |
3354 | 0 | done->Run(); |
3355 | 0 | } |
3356 | | |
3357 | | void EchoService::BytesEcho2(::google::protobuf::RpcController* controller, |
3358 | | const ::test::BytesRequest*, |
3359 | | ::test::BytesResponse*, |
3360 | 0 | ::google::protobuf::Closure* done) { |
3361 | 0 | controller->SetFailed("Method BytesEcho2() not implemented."); |
3362 | 0 | done->Run(); |
3363 | 0 | } |
3364 | | |
3365 | | void EchoService::CallMethod(const ::google::protobuf::MethodDescriptor* method, |
3366 | | ::google::protobuf::RpcController* controller, |
3367 | | const ::google::protobuf::Message* request, |
3368 | | ::google::protobuf::Message* response, |
3369 | 0 | ::google::protobuf::Closure* done) { |
3370 | 0 | GOOGLE_DCHECK_EQ(method->service(), protobuf_echo_2eproto::file_level_service_descriptors[0]); |
3371 | 0 | switch(method->index()) { |
3372 | 0 | case 0: |
3373 | 0 | Echo(controller, |
3374 | 0 | ::google::protobuf::down_cast<const ::test::EchoRequest*>(request), |
3375 | 0 | ::google::protobuf::down_cast< ::test::EchoResponse*>(response), |
3376 | 0 | done); |
3377 | 0 | break; |
3378 | 0 | case 1: |
3379 | 0 | ComboEcho(controller, |
3380 | 0 | ::google::protobuf::down_cast<const ::test::ComboRequest*>(request), |
3381 | 0 | ::google::protobuf::down_cast< ::test::ComboResponse*>(response), |
3382 | 0 | done); |
3383 | 0 | break; |
3384 | 0 | case 2: |
3385 | 0 | BytesEcho1(controller, |
3386 | 0 | ::google::protobuf::down_cast<const ::test::BytesRequest*>(request), |
3387 | 0 | ::google::protobuf::down_cast< ::test::BytesResponse*>(response), |
3388 | 0 | done); |
3389 | 0 | break; |
3390 | 0 | case 3: |
3391 | 0 | BytesEcho2(controller, |
3392 | 0 | ::google::protobuf::down_cast<const ::test::BytesRequest*>(request), |
3393 | 0 | ::google::protobuf::down_cast< ::test::BytesResponse*>(response), |
3394 | 0 | done); |
3395 | 0 | break; |
3396 | 0 | default: |
3397 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
3398 | 0 | break; |
3399 | 0 | } |
3400 | 0 | } |
3401 | | |
3402 | | const ::google::protobuf::Message& EchoService::GetRequestPrototype( |
3403 | 0 | const ::google::protobuf::MethodDescriptor* method) const { |
3404 | 0 | GOOGLE_DCHECK_EQ(method->service(), descriptor()); |
3405 | 0 | switch(method->index()) { |
3406 | 0 | case 0: |
3407 | 0 | return ::test::EchoRequest::default_instance(); |
3408 | 0 | case 1: |
3409 | 0 | return ::test::ComboRequest::default_instance(); |
3410 | 0 | case 2: |
3411 | 0 | return ::test::BytesRequest::default_instance(); |
3412 | 0 | case 3: |
3413 | 0 | return ::test::BytesRequest::default_instance(); |
3414 | 0 | default: |
3415 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
3416 | 0 | return *::google::protobuf::MessageFactory::generated_factory() |
3417 | 0 | ->GetPrototype(method->input_type()); |
3418 | 0 | } |
3419 | 0 | } |
3420 | | |
3421 | | const ::google::protobuf::Message& EchoService::GetResponsePrototype( |
3422 | 0 | const ::google::protobuf::MethodDescriptor* method) const { |
3423 | 0 | GOOGLE_DCHECK_EQ(method->service(), descriptor()); |
3424 | 0 | switch(method->index()) { |
3425 | 0 | case 0: |
3426 | 0 | return ::test::EchoResponse::default_instance(); |
3427 | 0 | case 1: |
3428 | 0 | return ::test::ComboResponse::default_instance(); |
3429 | 0 | case 2: |
3430 | 0 | return ::test::BytesResponse::default_instance(); |
3431 | 0 | case 3: |
3432 | 0 | return ::test::BytesResponse::default_instance(); |
3433 | 0 | default: |
3434 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
3435 | 0 | return *::google::protobuf::MessageFactory::generated_factory() |
3436 | 0 | ->GetPrototype(method->output_type()); |
3437 | 0 | } |
3438 | 0 | } |
3439 | | |
3440 | | EchoService_Stub::EchoService_Stub(::google::protobuf::RpcChannel* channel) |
3441 | 0 | : channel_(channel), owns_channel_(false) {} |
3442 | | EchoService_Stub::EchoService_Stub( |
3443 | | ::google::protobuf::RpcChannel* channel, |
3444 | | ::google::protobuf::Service::ChannelOwnership ownership) |
3445 | 0 | : channel_(channel), |
3446 | 0 | owns_channel_(ownership == ::google::protobuf::Service::STUB_OWNS_CHANNEL) {} |
3447 | 0 | EchoService_Stub::~EchoService_Stub() { |
3448 | 0 | if (owns_channel_) delete channel_; |
3449 | 0 | } |
3450 | | |
3451 | | void EchoService_Stub::Echo(::google::protobuf::RpcController* controller, |
3452 | | const ::test::EchoRequest* request, |
3453 | | ::test::EchoResponse* response, |
3454 | 0 | ::google::protobuf::Closure* done) { |
3455 | 0 | channel_->CallMethod(descriptor()->method(0), |
3456 | 0 | controller, request, response, done); |
3457 | 0 | } |
3458 | | void EchoService_Stub::ComboEcho(::google::protobuf::RpcController* controller, |
3459 | | const ::test::ComboRequest* request, |
3460 | | ::test::ComboResponse* response, |
3461 | 0 | ::google::protobuf::Closure* done) { |
3462 | 0 | channel_->CallMethod(descriptor()->method(1), |
3463 | 0 | controller, request, response, done); |
3464 | 0 | } |
3465 | | void EchoService_Stub::BytesEcho1(::google::protobuf::RpcController* controller, |
3466 | | const ::test::BytesRequest* request, |
3467 | | ::test::BytesResponse* response, |
3468 | 0 | ::google::protobuf::Closure* done) { |
3469 | 0 | channel_->CallMethod(descriptor()->method(2), |
3470 | 0 | controller, request, response, done); |
3471 | 0 | } |
3472 | | void EchoService_Stub::BytesEcho2(::google::protobuf::RpcController* controller, |
3473 | | const ::test::BytesRequest* request, |
3474 | | ::test::BytesResponse* response, |
3475 | 0 | ::google::protobuf::Closure* done) { |
3476 | 0 | channel_->CallMethod(descriptor()->method(3), |
3477 | 0 | controller, request, response, done); |
3478 | 0 | } |
3479 | | // =================================================================== |
3480 | | |
3481 | 0 | DownloadService::~DownloadService() {} |
3482 | | |
3483 | 0 | const ::google::protobuf::ServiceDescriptor* DownloadService::descriptor() { |
3484 | 0 | protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
3485 | 0 | return protobuf_echo_2eproto::file_level_service_descriptors[1]; |
3486 | 0 | } |
3487 | | |
3488 | 0 | const ::google::protobuf::ServiceDescriptor* DownloadService::GetDescriptor() { |
3489 | 0 | return descriptor(); |
3490 | 0 | } |
3491 | | |
3492 | | void DownloadService::Download(::google::protobuf::RpcController* controller, |
3493 | | const ::test::HttpRequest*, |
3494 | | ::test::HttpResponse*, |
3495 | 0 | ::google::protobuf::Closure* done) { |
3496 | 0 | controller->SetFailed("Method Download() not implemented."); |
3497 | 0 | done->Run(); |
3498 | 0 | } |
3499 | | |
3500 | | void DownloadService::DownloadFailed(::google::protobuf::RpcController* controller, |
3501 | | const ::test::HttpRequest*, |
3502 | | ::test::HttpResponse*, |
3503 | 0 | ::google::protobuf::Closure* done) { |
3504 | 0 | controller->SetFailed("Method DownloadFailed() not implemented."); |
3505 | 0 | done->Run(); |
3506 | 0 | } |
3507 | | |
3508 | | void DownloadService::CallMethod(const ::google::protobuf::MethodDescriptor* method, |
3509 | | ::google::protobuf::RpcController* controller, |
3510 | | const ::google::protobuf::Message* request, |
3511 | | ::google::protobuf::Message* response, |
3512 | 0 | ::google::protobuf::Closure* done) { |
3513 | 0 | GOOGLE_DCHECK_EQ(method->service(), protobuf_echo_2eproto::file_level_service_descriptors[1]); |
3514 | 0 | switch(method->index()) { |
3515 | 0 | case 0: |
3516 | 0 | Download(controller, |
3517 | 0 | ::google::protobuf::down_cast<const ::test::HttpRequest*>(request), |
3518 | 0 | ::google::protobuf::down_cast< ::test::HttpResponse*>(response), |
3519 | 0 | done); |
3520 | 0 | break; |
3521 | 0 | case 1: |
3522 | 0 | DownloadFailed(controller, |
3523 | 0 | ::google::protobuf::down_cast<const ::test::HttpRequest*>(request), |
3524 | 0 | ::google::protobuf::down_cast< ::test::HttpResponse*>(response), |
3525 | 0 | done); |
3526 | 0 | break; |
3527 | 0 | default: |
3528 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
3529 | 0 | break; |
3530 | 0 | } |
3531 | 0 | } |
3532 | | |
3533 | | const ::google::protobuf::Message& DownloadService::GetRequestPrototype( |
3534 | 0 | const ::google::protobuf::MethodDescriptor* method) const { |
3535 | 0 | GOOGLE_DCHECK_EQ(method->service(), descriptor()); |
3536 | 0 | switch(method->index()) { |
3537 | 0 | case 0: |
3538 | 0 | return ::test::HttpRequest::default_instance(); |
3539 | 0 | case 1: |
3540 | 0 | return ::test::HttpRequest::default_instance(); |
3541 | 0 | default: |
3542 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
3543 | 0 | return *::google::protobuf::MessageFactory::generated_factory() |
3544 | 0 | ->GetPrototype(method->input_type()); |
3545 | 0 | } |
3546 | 0 | } |
3547 | | |
3548 | | const ::google::protobuf::Message& DownloadService::GetResponsePrototype( |
3549 | 0 | const ::google::protobuf::MethodDescriptor* method) const { |
3550 | 0 | GOOGLE_DCHECK_EQ(method->service(), descriptor()); |
3551 | 0 | switch(method->index()) { |
3552 | 0 | case 0: |
3553 | 0 | return ::test::HttpResponse::default_instance(); |
3554 | 0 | case 1: |
3555 | 0 | return ::test::HttpResponse::default_instance(); |
3556 | 0 | default: |
3557 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
3558 | 0 | return *::google::protobuf::MessageFactory::generated_factory() |
3559 | 0 | ->GetPrototype(method->output_type()); |
3560 | 0 | } |
3561 | 0 | } |
3562 | | |
3563 | | DownloadService_Stub::DownloadService_Stub(::google::protobuf::RpcChannel* channel) |
3564 | 0 | : channel_(channel), owns_channel_(false) {} |
3565 | | DownloadService_Stub::DownloadService_Stub( |
3566 | | ::google::protobuf::RpcChannel* channel, |
3567 | | ::google::protobuf::Service::ChannelOwnership ownership) |
3568 | 0 | : channel_(channel), |
3569 | 0 | owns_channel_(ownership == ::google::protobuf::Service::STUB_OWNS_CHANNEL) {} |
3570 | 0 | DownloadService_Stub::~DownloadService_Stub() { |
3571 | 0 | if (owns_channel_) delete channel_; |
3572 | 0 | } |
3573 | | |
3574 | | void DownloadService_Stub::Download(::google::protobuf::RpcController* controller, |
3575 | | const ::test::HttpRequest* request, |
3576 | | ::test::HttpResponse* response, |
3577 | 0 | ::google::protobuf::Closure* done) { |
3578 | 0 | channel_->CallMethod(descriptor()->method(0), |
3579 | 0 | controller, request, response, done); |
3580 | 0 | } |
3581 | | void DownloadService_Stub::DownloadFailed(::google::protobuf::RpcController* controller, |
3582 | | const ::test::HttpRequest* request, |
3583 | | ::test::HttpResponse* response, |
3584 | 0 | ::google::protobuf::Closure* done) { |
3585 | 0 | channel_->CallMethod(descriptor()->method(1), |
3586 | 0 | controller, request, response, done); |
3587 | 0 | } |
3588 | | // =================================================================== |
3589 | | |
3590 | 0 | UploadService::~UploadService() {} |
3591 | | |
3592 | 0 | const ::google::protobuf::ServiceDescriptor* UploadService::descriptor() { |
3593 | 0 | protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
3594 | 0 | return protobuf_echo_2eproto::file_level_service_descriptors[2]; |
3595 | 0 | } |
3596 | | |
3597 | 0 | const ::google::protobuf::ServiceDescriptor* UploadService::GetDescriptor() { |
3598 | 0 | return descriptor(); |
3599 | 0 | } |
3600 | | |
3601 | | void UploadService::Upload(::google::protobuf::RpcController* controller, |
3602 | | const ::test::HttpRequest*, |
3603 | | ::test::HttpResponse*, |
3604 | 0 | ::google::protobuf::Closure* done) { |
3605 | 0 | controller->SetFailed("Method Upload() not implemented."); |
3606 | 0 | done->Run(); |
3607 | 0 | } |
3608 | | |
3609 | | void UploadService::UploadFailed(::google::protobuf::RpcController* controller, |
3610 | | const ::test::HttpRequest*, |
3611 | | ::test::HttpResponse*, |
3612 | 0 | ::google::protobuf::Closure* done) { |
3613 | 0 | controller->SetFailed("Method UploadFailed() not implemented."); |
3614 | 0 | done->Run(); |
3615 | 0 | } |
3616 | | |
3617 | | void UploadService::CallMethod(const ::google::protobuf::MethodDescriptor* method, |
3618 | | ::google::protobuf::RpcController* controller, |
3619 | | const ::google::protobuf::Message* request, |
3620 | | ::google::protobuf::Message* response, |
3621 | 0 | ::google::protobuf::Closure* done) { |
3622 | 0 | GOOGLE_DCHECK_EQ(method->service(), protobuf_echo_2eproto::file_level_service_descriptors[2]); |
3623 | 0 | switch(method->index()) { |
3624 | 0 | case 0: |
3625 | 0 | Upload(controller, |
3626 | 0 | ::google::protobuf::down_cast<const ::test::HttpRequest*>(request), |
3627 | 0 | ::google::protobuf::down_cast< ::test::HttpResponse*>(response), |
3628 | 0 | done); |
3629 | 0 | break; |
3630 | 0 | case 1: |
3631 | 0 | UploadFailed(controller, |
3632 | 0 | ::google::protobuf::down_cast<const ::test::HttpRequest*>(request), |
3633 | 0 | ::google::protobuf::down_cast< ::test::HttpResponse*>(response), |
3634 | 0 | done); |
3635 | 0 | break; |
3636 | 0 | default: |
3637 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
3638 | 0 | break; |
3639 | 0 | } |
3640 | 0 | } |
3641 | | |
3642 | | const ::google::protobuf::Message& UploadService::GetRequestPrototype( |
3643 | 0 | const ::google::protobuf::MethodDescriptor* method) const { |
3644 | 0 | GOOGLE_DCHECK_EQ(method->service(), descriptor()); |
3645 | 0 | switch(method->index()) { |
3646 | 0 | case 0: |
3647 | 0 | return ::test::HttpRequest::default_instance(); |
3648 | 0 | case 1: |
3649 | 0 | return ::test::HttpRequest::default_instance(); |
3650 | 0 | default: |
3651 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
3652 | 0 | return *::google::protobuf::MessageFactory::generated_factory() |
3653 | 0 | ->GetPrototype(method->input_type()); |
3654 | 0 | } |
3655 | 0 | } |
3656 | | |
3657 | | const ::google::protobuf::Message& UploadService::GetResponsePrototype( |
3658 | 0 | const ::google::protobuf::MethodDescriptor* method) const { |
3659 | 0 | GOOGLE_DCHECK_EQ(method->service(), descriptor()); |
3660 | 0 | switch(method->index()) { |
3661 | 0 | case 0: |
3662 | 0 | return ::test::HttpResponse::default_instance(); |
3663 | 0 | case 1: |
3664 | 0 | return ::test::HttpResponse::default_instance(); |
3665 | 0 | default: |
3666 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
3667 | 0 | return *::google::protobuf::MessageFactory::generated_factory() |
3668 | 0 | ->GetPrototype(method->output_type()); |
3669 | 0 | } |
3670 | 0 | } |
3671 | | |
3672 | | UploadService_Stub::UploadService_Stub(::google::protobuf::RpcChannel* channel) |
3673 | 0 | : channel_(channel), owns_channel_(false) {} |
3674 | | UploadService_Stub::UploadService_Stub( |
3675 | | ::google::protobuf::RpcChannel* channel, |
3676 | | ::google::protobuf::Service::ChannelOwnership ownership) |
3677 | 0 | : channel_(channel), |
3678 | 0 | owns_channel_(ownership == ::google::protobuf::Service::STUB_OWNS_CHANNEL) {} |
3679 | 0 | UploadService_Stub::~UploadService_Stub() { |
3680 | 0 | if (owns_channel_) delete channel_; |
3681 | 0 | } |
3682 | | |
3683 | | void UploadService_Stub::Upload(::google::protobuf::RpcController* controller, |
3684 | | const ::test::HttpRequest* request, |
3685 | | ::test::HttpResponse* response, |
3686 | 0 | ::google::protobuf::Closure* done) { |
3687 | 0 | channel_->CallMethod(descriptor()->method(0), |
3688 | 0 | controller, request, response, done); |
3689 | 0 | } |
3690 | | void UploadService_Stub::UploadFailed(::google::protobuf::RpcController* controller, |
3691 | | const ::test::HttpRequest* request, |
3692 | | ::test::HttpResponse* response, |
3693 | 0 | ::google::protobuf::Closure* done) { |
3694 | 0 | channel_->CallMethod(descriptor()->method(1), |
3695 | 0 | controller, request, response, done); |
3696 | 0 | } |
3697 | | // =================================================================== |
3698 | | |
3699 | 0 | UserNamingService::~UserNamingService() {} |
3700 | | |
3701 | 0 | const ::google::protobuf::ServiceDescriptor* UserNamingService::descriptor() { |
3702 | 0 | protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
3703 | 0 | return protobuf_echo_2eproto::file_level_service_descriptors[3]; |
3704 | 0 | } |
3705 | | |
3706 | 0 | const ::google::protobuf::ServiceDescriptor* UserNamingService::GetDescriptor() { |
3707 | 0 | return descriptor(); |
3708 | 0 | } |
3709 | | |
3710 | | void UserNamingService::ListNames(::google::protobuf::RpcController* controller, |
3711 | | const ::test::HttpRequest*, |
3712 | | ::test::HttpResponse*, |
3713 | 0 | ::google::protobuf::Closure* done) { |
3714 | 0 | controller->SetFailed("Method ListNames() not implemented."); |
3715 | 0 | done->Run(); |
3716 | 0 | } |
3717 | | |
3718 | | void UserNamingService::Touch(::google::protobuf::RpcController* controller, |
3719 | | const ::test::HttpRequest*, |
3720 | | ::test::HttpResponse*, |
3721 | 0 | ::google::protobuf::Closure* done) { |
3722 | 0 | controller->SetFailed("Method Touch() not implemented."); |
3723 | 0 | done->Run(); |
3724 | 0 | } |
3725 | | |
3726 | | void UserNamingService::CallMethod(const ::google::protobuf::MethodDescriptor* method, |
3727 | | ::google::protobuf::RpcController* controller, |
3728 | | const ::google::protobuf::Message* request, |
3729 | | ::google::protobuf::Message* response, |
3730 | 0 | ::google::protobuf::Closure* done) { |
3731 | 0 | GOOGLE_DCHECK_EQ(method->service(), protobuf_echo_2eproto::file_level_service_descriptors[3]); |
3732 | 0 | switch(method->index()) { |
3733 | 0 | case 0: |
3734 | 0 | ListNames(controller, |
3735 | 0 | ::google::protobuf::down_cast<const ::test::HttpRequest*>(request), |
3736 | 0 | ::google::protobuf::down_cast< ::test::HttpResponse*>(response), |
3737 | 0 | done); |
3738 | 0 | break; |
3739 | 0 | case 1: |
3740 | 0 | Touch(controller, |
3741 | 0 | ::google::protobuf::down_cast<const ::test::HttpRequest*>(request), |
3742 | 0 | ::google::protobuf::down_cast< ::test::HttpResponse*>(response), |
3743 | 0 | done); |
3744 | 0 | break; |
3745 | 0 | default: |
3746 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
3747 | 0 | break; |
3748 | 0 | } |
3749 | 0 | } |
3750 | | |
3751 | | const ::google::protobuf::Message& UserNamingService::GetRequestPrototype( |
3752 | 0 | const ::google::protobuf::MethodDescriptor* method) const { |
3753 | 0 | GOOGLE_DCHECK_EQ(method->service(), descriptor()); |
3754 | 0 | switch(method->index()) { |
3755 | 0 | case 0: |
3756 | 0 | return ::test::HttpRequest::default_instance(); |
3757 | 0 | case 1: |
3758 | 0 | return ::test::HttpRequest::default_instance(); |
3759 | 0 | default: |
3760 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
3761 | 0 | return *::google::protobuf::MessageFactory::generated_factory() |
3762 | 0 | ->GetPrototype(method->input_type()); |
3763 | 0 | } |
3764 | 0 | } |
3765 | | |
3766 | | const ::google::protobuf::Message& UserNamingService::GetResponsePrototype( |
3767 | 0 | const ::google::protobuf::MethodDescriptor* method) const { |
3768 | 0 | GOOGLE_DCHECK_EQ(method->service(), descriptor()); |
3769 | 0 | switch(method->index()) { |
3770 | 0 | case 0: |
3771 | 0 | return ::test::HttpResponse::default_instance(); |
3772 | 0 | case 1: |
3773 | 0 | return ::test::HttpResponse::default_instance(); |
3774 | 0 | default: |
3775 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
3776 | 0 | return *::google::protobuf::MessageFactory::generated_factory() |
3777 | 0 | ->GetPrototype(method->output_type()); |
3778 | 0 | } |
3779 | 0 | } |
3780 | | |
3781 | | UserNamingService_Stub::UserNamingService_Stub(::google::protobuf::RpcChannel* channel) |
3782 | 0 | : channel_(channel), owns_channel_(false) {} |
3783 | | UserNamingService_Stub::UserNamingService_Stub( |
3784 | | ::google::protobuf::RpcChannel* channel, |
3785 | | ::google::protobuf::Service::ChannelOwnership ownership) |
3786 | 0 | : channel_(channel), |
3787 | 0 | owns_channel_(ownership == ::google::protobuf::Service::STUB_OWNS_CHANNEL) {} |
3788 | 0 | UserNamingService_Stub::~UserNamingService_Stub() { |
3789 | 0 | if (owns_channel_) delete channel_; |
3790 | 0 | } |
3791 | | |
3792 | | void UserNamingService_Stub::ListNames(::google::protobuf::RpcController* controller, |
3793 | | const ::test::HttpRequest* request, |
3794 | | ::test::HttpResponse* response, |
3795 | 0 | ::google::protobuf::Closure* done) { |
3796 | 0 | channel_->CallMethod(descriptor()->method(0), |
3797 | 0 | controller, request, response, done); |
3798 | 0 | } |
3799 | | void UserNamingService_Stub::Touch(::google::protobuf::RpcController* controller, |
3800 | | const ::test::HttpRequest* request, |
3801 | | ::test::HttpResponse* response, |
3802 | 0 | ::google::protobuf::Closure* done) { |
3803 | 0 | channel_->CallMethod(descriptor()->method(1), |
3804 | 0 | controller, request, response, done); |
3805 | 0 | } |
3806 | | // =================================================================== |
3807 | | |
3808 | 0 | DiscoveryNamingService::~DiscoveryNamingService() {} |
3809 | | |
3810 | 0 | const ::google::protobuf::ServiceDescriptor* DiscoveryNamingService::descriptor() { |
3811 | 0 | protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
3812 | 0 | return protobuf_echo_2eproto::file_level_service_descriptors[4]; |
3813 | 0 | } |
3814 | | |
3815 | 0 | const ::google::protobuf::ServiceDescriptor* DiscoveryNamingService::GetDescriptor() { |
3816 | 0 | return descriptor(); |
3817 | 0 | } |
3818 | | |
3819 | | void DiscoveryNamingService::Nodes(::google::protobuf::RpcController* controller, |
3820 | | const ::test::HttpRequest*, |
3821 | | ::test::HttpResponse*, |
3822 | 0 | ::google::protobuf::Closure* done) { |
3823 | 0 | controller->SetFailed("Method Nodes() not implemented."); |
3824 | 0 | done->Run(); |
3825 | 0 | } |
3826 | | |
3827 | | void DiscoveryNamingService::Fetchs(::google::protobuf::RpcController* controller, |
3828 | | const ::test::HttpRequest*, |
3829 | | ::test::HttpResponse*, |
3830 | 0 | ::google::protobuf::Closure* done) { |
3831 | 0 | controller->SetFailed("Method Fetchs() not implemented."); |
3832 | 0 | done->Run(); |
3833 | 0 | } |
3834 | | |
3835 | | void DiscoveryNamingService::Register(::google::protobuf::RpcController* controller, |
3836 | | const ::test::HttpRequest*, |
3837 | | ::test::HttpResponse*, |
3838 | 0 | ::google::protobuf::Closure* done) { |
3839 | 0 | controller->SetFailed("Method Register() not implemented."); |
3840 | 0 | done->Run(); |
3841 | 0 | } |
3842 | | |
3843 | | void DiscoveryNamingService::Renew(::google::protobuf::RpcController* controller, |
3844 | | const ::test::HttpRequest*, |
3845 | | ::test::HttpResponse*, |
3846 | 0 | ::google::protobuf::Closure* done) { |
3847 | 0 | controller->SetFailed("Method Renew() not implemented."); |
3848 | 0 | done->Run(); |
3849 | 0 | } |
3850 | | |
3851 | | void DiscoveryNamingService::Cancel(::google::protobuf::RpcController* controller, |
3852 | | const ::test::HttpRequest*, |
3853 | | ::test::HttpResponse*, |
3854 | 0 | ::google::protobuf::Closure* done) { |
3855 | 0 | controller->SetFailed("Method Cancel() not implemented."); |
3856 | 0 | done->Run(); |
3857 | 0 | } |
3858 | | |
3859 | | void DiscoveryNamingService::CallMethod(const ::google::protobuf::MethodDescriptor* method, |
3860 | | ::google::protobuf::RpcController* controller, |
3861 | | const ::google::protobuf::Message* request, |
3862 | | ::google::protobuf::Message* response, |
3863 | 0 | ::google::protobuf::Closure* done) { |
3864 | 0 | GOOGLE_DCHECK_EQ(method->service(), protobuf_echo_2eproto::file_level_service_descriptors[4]); |
3865 | 0 | switch(method->index()) { |
3866 | 0 | case 0: |
3867 | 0 | Nodes(controller, |
3868 | 0 | ::google::protobuf::down_cast<const ::test::HttpRequest*>(request), |
3869 | 0 | ::google::protobuf::down_cast< ::test::HttpResponse*>(response), |
3870 | 0 | done); |
3871 | 0 | break; |
3872 | 0 | case 1: |
3873 | 0 | Fetchs(controller, |
3874 | 0 | ::google::protobuf::down_cast<const ::test::HttpRequest*>(request), |
3875 | 0 | ::google::protobuf::down_cast< ::test::HttpResponse*>(response), |
3876 | 0 | done); |
3877 | 0 | break; |
3878 | 0 | case 2: |
3879 | 0 | Register(controller, |
3880 | 0 | ::google::protobuf::down_cast<const ::test::HttpRequest*>(request), |
3881 | 0 | ::google::protobuf::down_cast< ::test::HttpResponse*>(response), |
3882 | 0 | done); |
3883 | 0 | break; |
3884 | 0 | case 3: |
3885 | 0 | Renew(controller, |
3886 | 0 | ::google::protobuf::down_cast<const ::test::HttpRequest*>(request), |
3887 | 0 | ::google::protobuf::down_cast< ::test::HttpResponse*>(response), |
3888 | 0 | done); |
3889 | 0 | break; |
3890 | 0 | case 4: |
3891 | 0 | Cancel(controller, |
3892 | 0 | ::google::protobuf::down_cast<const ::test::HttpRequest*>(request), |
3893 | 0 | ::google::protobuf::down_cast< ::test::HttpResponse*>(response), |
3894 | 0 | done); |
3895 | 0 | break; |
3896 | 0 | default: |
3897 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
3898 | 0 | break; |
3899 | 0 | } |
3900 | 0 | } |
3901 | | |
3902 | | const ::google::protobuf::Message& DiscoveryNamingService::GetRequestPrototype( |
3903 | 0 | const ::google::protobuf::MethodDescriptor* method) const { |
3904 | 0 | GOOGLE_DCHECK_EQ(method->service(), descriptor()); |
3905 | 0 | switch(method->index()) { |
3906 | 0 | case 0: |
3907 | 0 | return ::test::HttpRequest::default_instance(); |
3908 | 0 | case 1: |
3909 | 0 | return ::test::HttpRequest::default_instance(); |
3910 | 0 | case 2: |
3911 | 0 | return ::test::HttpRequest::default_instance(); |
3912 | 0 | case 3: |
3913 | 0 | return ::test::HttpRequest::default_instance(); |
3914 | 0 | case 4: |
3915 | 0 | return ::test::HttpRequest::default_instance(); |
3916 | 0 | default: |
3917 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
3918 | 0 | return *::google::protobuf::MessageFactory::generated_factory() |
3919 | 0 | ->GetPrototype(method->input_type()); |
3920 | 0 | } |
3921 | 0 | } |
3922 | | |
3923 | | const ::google::protobuf::Message& DiscoveryNamingService::GetResponsePrototype( |
3924 | 0 | const ::google::protobuf::MethodDescriptor* method) const { |
3925 | 0 | GOOGLE_DCHECK_EQ(method->service(), descriptor()); |
3926 | 0 | switch(method->index()) { |
3927 | 0 | case 0: |
3928 | 0 | return ::test::HttpResponse::default_instance(); |
3929 | 0 | case 1: |
3930 | 0 | return ::test::HttpResponse::default_instance(); |
3931 | 0 | case 2: |
3932 | 0 | return ::test::HttpResponse::default_instance(); |
3933 | 0 | case 3: |
3934 | 0 | return ::test::HttpResponse::default_instance(); |
3935 | 0 | case 4: |
3936 | 0 | return ::test::HttpResponse::default_instance(); |
3937 | 0 | default: |
3938 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
3939 | 0 | return *::google::protobuf::MessageFactory::generated_factory() |
3940 | 0 | ->GetPrototype(method->output_type()); |
3941 | 0 | } |
3942 | 0 | } |
3943 | | |
3944 | | DiscoveryNamingService_Stub::DiscoveryNamingService_Stub(::google::protobuf::RpcChannel* channel) |
3945 | 0 | : channel_(channel), owns_channel_(false) {} |
3946 | | DiscoveryNamingService_Stub::DiscoveryNamingService_Stub( |
3947 | | ::google::protobuf::RpcChannel* channel, |
3948 | | ::google::protobuf::Service::ChannelOwnership ownership) |
3949 | 0 | : channel_(channel), |
3950 | 0 | owns_channel_(ownership == ::google::protobuf::Service::STUB_OWNS_CHANNEL) {} |
3951 | 0 | DiscoveryNamingService_Stub::~DiscoveryNamingService_Stub() { |
3952 | 0 | if (owns_channel_) delete channel_; |
3953 | 0 | } |
3954 | | |
3955 | | void DiscoveryNamingService_Stub::Nodes(::google::protobuf::RpcController* controller, |
3956 | | const ::test::HttpRequest* request, |
3957 | | ::test::HttpResponse* response, |
3958 | 0 | ::google::protobuf::Closure* done) { |
3959 | 0 | channel_->CallMethod(descriptor()->method(0), |
3960 | 0 | controller, request, response, done); |
3961 | 0 | } |
3962 | | void DiscoveryNamingService_Stub::Fetchs(::google::protobuf::RpcController* controller, |
3963 | | const ::test::HttpRequest* request, |
3964 | | ::test::HttpResponse* response, |
3965 | 0 | ::google::protobuf::Closure* done) { |
3966 | 0 | channel_->CallMethod(descriptor()->method(1), |
3967 | 0 | controller, request, response, done); |
3968 | 0 | } |
3969 | | void DiscoveryNamingService_Stub::Register(::google::protobuf::RpcController* controller, |
3970 | | const ::test::HttpRequest* request, |
3971 | | ::test::HttpResponse* response, |
3972 | 0 | ::google::protobuf::Closure* done) { |
3973 | 0 | channel_->CallMethod(descriptor()->method(2), |
3974 | 0 | controller, request, response, done); |
3975 | 0 | } |
3976 | | void DiscoveryNamingService_Stub::Renew(::google::protobuf::RpcController* controller, |
3977 | | const ::test::HttpRequest* request, |
3978 | | ::test::HttpResponse* response, |
3979 | 0 | ::google::protobuf::Closure* done) { |
3980 | 0 | channel_->CallMethod(descriptor()->method(3), |
3981 | 0 | controller, request, response, done); |
3982 | 0 | } |
3983 | | void DiscoveryNamingService_Stub::Cancel(::google::protobuf::RpcController* controller, |
3984 | | const ::test::HttpRequest* request, |
3985 | | ::test::HttpResponse* response, |
3986 | 0 | ::google::protobuf::Closure* done) { |
3987 | 0 | channel_->CallMethod(descriptor()->method(4), |
3988 | 0 | controller, request, response, done); |
3989 | 0 | } |
3990 | | // =================================================================== |
3991 | | |
3992 | 0 | NacosNamingService::~NacosNamingService() {} |
3993 | | |
3994 | 0 | const ::google::protobuf::ServiceDescriptor* NacosNamingService::descriptor() { |
3995 | 0 | protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
3996 | 0 | return protobuf_echo_2eproto::file_level_service_descriptors[5]; |
3997 | 0 | } |
3998 | | |
3999 | 0 | const ::google::protobuf::ServiceDescriptor* NacosNamingService::GetDescriptor() { |
4000 | 0 | return descriptor(); |
4001 | 0 | } |
4002 | | |
4003 | | void NacosNamingService::Login(::google::protobuf::RpcController* controller, |
4004 | | const ::test::HttpRequest*, |
4005 | | ::test::HttpResponse*, |
4006 | 0 | ::google::protobuf::Closure* done) { |
4007 | 0 | controller->SetFailed("Method Login() not implemented."); |
4008 | 0 | done->Run(); |
4009 | 0 | } |
4010 | | |
4011 | | void NacosNamingService::List(::google::protobuf::RpcController* controller, |
4012 | | const ::test::HttpRequest*, |
4013 | | ::test::HttpResponse*, |
4014 | 0 | ::google::protobuf::Closure* done) { |
4015 | 0 | controller->SetFailed("Method List() not implemented."); |
4016 | 0 | done->Run(); |
4017 | 0 | } |
4018 | | |
4019 | | void NacosNamingService::CallMethod(const ::google::protobuf::MethodDescriptor* method, |
4020 | | ::google::protobuf::RpcController* controller, |
4021 | | const ::google::protobuf::Message* request, |
4022 | | ::google::protobuf::Message* response, |
4023 | 0 | ::google::protobuf::Closure* done) { |
4024 | 0 | GOOGLE_DCHECK_EQ(method->service(), protobuf_echo_2eproto::file_level_service_descriptors[5]); |
4025 | 0 | switch(method->index()) { |
4026 | 0 | case 0: |
4027 | 0 | Login(controller, |
4028 | 0 | ::google::protobuf::down_cast<const ::test::HttpRequest*>(request), |
4029 | 0 | ::google::protobuf::down_cast< ::test::HttpResponse*>(response), |
4030 | 0 | done); |
4031 | 0 | break; |
4032 | 0 | case 1: |
4033 | 0 | List(controller, |
4034 | 0 | ::google::protobuf::down_cast<const ::test::HttpRequest*>(request), |
4035 | 0 | ::google::protobuf::down_cast< ::test::HttpResponse*>(response), |
4036 | 0 | done); |
4037 | 0 | break; |
4038 | 0 | default: |
4039 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
4040 | 0 | break; |
4041 | 0 | } |
4042 | 0 | } |
4043 | | |
4044 | | const ::google::protobuf::Message& NacosNamingService::GetRequestPrototype( |
4045 | 0 | const ::google::protobuf::MethodDescriptor* method) const { |
4046 | 0 | GOOGLE_DCHECK_EQ(method->service(), descriptor()); |
4047 | 0 | switch(method->index()) { |
4048 | 0 | case 0: |
4049 | 0 | return ::test::HttpRequest::default_instance(); |
4050 | 0 | case 1: |
4051 | 0 | return ::test::HttpRequest::default_instance(); |
4052 | 0 | default: |
4053 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
4054 | 0 | return *::google::protobuf::MessageFactory::generated_factory() |
4055 | 0 | ->GetPrototype(method->input_type()); |
4056 | 0 | } |
4057 | 0 | } |
4058 | | |
4059 | | const ::google::protobuf::Message& NacosNamingService::GetResponsePrototype( |
4060 | 0 | const ::google::protobuf::MethodDescriptor* method) const { |
4061 | 0 | GOOGLE_DCHECK_EQ(method->service(), descriptor()); |
4062 | 0 | switch(method->index()) { |
4063 | 0 | case 0: |
4064 | 0 | return ::test::HttpResponse::default_instance(); |
4065 | 0 | case 1: |
4066 | 0 | return ::test::HttpResponse::default_instance(); |
4067 | 0 | default: |
4068 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
4069 | 0 | return *::google::protobuf::MessageFactory::generated_factory() |
4070 | 0 | ->GetPrototype(method->output_type()); |
4071 | 0 | } |
4072 | 0 | } |
4073 | | |
4074 | | NacosNamingService_Stub::NacosNamingService_Stub(::google::protobuf::RpcChannel* channel) |
4075 | 0 | : channel_(channel), owns_channel_(false) {} |
4076 | | NacosNamingService_Stub::NacosNamingService_Stub( |
4077 | | ::google::protobuf::RpcChannel* channel, |
4078 | | ::google::protobuf::Service::ChannelOwnership ownership) |
4079 | 0 | : channel_(channel), |
4080 | 0 | owns_channel_(ownership == ::google::protobuf::Service::STUB_OWNS_CHANNEL) {} |
4081 | 0 | NacosNamingService_Stub::~NacosNamingService_Stub() { |
4082 | 0 | if (owns_channel_) delete channel_; |
4083 | 0 | } |
4084 | | |
4085 | | void NacosNamingService_Stub::Login(::google::protobuf::RpcController* controller, |
4086 | | const ::test::HttpRequest* request, |
4087 | | ::test::HttpResponse* response, |
4088 | 0 | ::google::protobuf::Closure* done) { |
4089 | 0 | channel_->CallMethod(descriptor()->method(0), |
4090 | 0 | controller, request, response, done); |
4091 | 0 | } |
4092 | | void NacosNamingService_Stub::List(::google::protobuf::RpcController* controller, |
4093 | | const ::test::HttpRequest* request, |
4094 | | ::test::HttpResponse* response, |
4095 | 0 | ::google::protobuf::Closure* done) { |
4096 | 0 | channel_->CallMethod(descriptor()->method(1), |
4097 | 0 | controller, request, response, done); |
4098 | 0 | } |
4099 | | // =================================================================== |
4100 | | |
4101 | 0 | HttpService::~HttpService() {} |
4102 | | |
4103 | 0 | const ::google::protobuf::ServiceDescriptor* HttpService::descriptor() { |
4104 | 0 | protobuf_echo_2eproto::protobuf_AssignDescriptorsOnce(); |
4105 | 0 | return protobuf_echo_2eproto::file_level_service_descriptors[6]; |
4106 | 0 | } |
4107 | | |
4108 | 0 | const ::google::protobuf::ServiceDescriptor* HttpService::GetDescriptor() { |
4109 | 0 | return descriptor(); |
4110 | 0 | } |
4111 | | |
4112 | | void HttpService::Head(::google::protobuf::RpcController* controller, |
4113 | | const ::test::HttpRequest*, |
4114 | | ::test::HttpResponse*, |
4115 | 0 | ::google::protobuf::Closure* done) { |
4116 | 0 | controller->SetFailed("Method Head() not implemented."); |
4117 | 0 | done->Run(); |
4118 | 0 | } |
4119 | | |
4120 | | void HttpService::Expect(::google::protobuf::RpcController* controller, |
4121 | | const ::test::HttpRequest*, |
4122 | | ::test::HttpResponse*, |
4123 | 0 | ::google::protobuf::Closure* done) { |
4124 | 0 | controller->SetFailed("Method Expect() not implemented."); |
4125 | 0 | done->Run(); |
4126 | 0 | } |
4127 | | |
4128 | | void HttpService::CallMethod(const ::google::protobuf::MethodDescriptor* method, |
4129 | | ::google::protobuf::RpcController* controller, |
4130 | | const ::google::protobuf::Message* request, |
4131 | | ::google::protobuf::Message* response, |
4132 | 0 | ::google::protobuf::Closure* done) { |
4133 | 0 | GOOGLE_DCHECK_EQ(method->service(), protobuf_echo_2eproto::file_level_service_descriptors[6]); |
4134 | 0 | switch(method->index()) { |
4135 | 0 | case 0: |
4136 | 0 | Head(controller, |
4137 | 0 | ::google::protobuf::down_cast<const ::test::HttpRequest*>(request), |
4138 | 0 | ::google::protobuf::down_cast< ::test::HttpResponse*>(response), |
4139 | 0 | done); |
4140 | 0 | break; |
4141 | 0 | case 1: |
4142 | 0 | Expect(controller, |
4143 | 0 | ::google::protobuf::down_cast<const ::test::HttpRequest*>(request), |
4144 | 0 | ::google::protobuf::down_cast< ::test::HttpResponse*>(response), |
4145 | 0 | done); |
4146 | 0 | break; |
4147 | 0 | default: |
4148 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
4149 | 0 | break; |
4150 | 0 | } |
4151 | 0 | } |
4152 | | |
4153 | | const ::google::protobuf::Message& HttpService::GetRequestPrototype( |
4154 | 0 | const ::google::protobuf::MethodDescriptor* method) const { |
4155 | 0 | GOOGLE_DCHECK_EQ(method->service(), descriptor()); |
4156 | 0 | switch(method->index()) { |
4157 | 0 | case 0: |
4158 | 0 | return ::test::HttpRequest::default_instance(); |
4159 | 0 | case 1: |
4160 | 0 | return ::test::HttpRequest::default_instance(); |
4161 | 0 | default: |
4162 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
4163 | 0 | return *::google::protobuf::MessageFactory::generated_factory() |
4164 | 0 | ->GetPrototype(method->input_type()); |
4165 | 0 | } |
4166 | 0 | } |
4167 | | |
4168 | | const ::google::protobuf::Message& HttpService::GetResponsePrototype( |
4169 | 0 | const ::google::protobuf::MethodDescriptor* method) const { |
4170 | 0 | GOOGLE_DCHECK_EQ(method->service(), descriptor()); |
4171 | 0 | switch(method->index()) { |
4172 | 0 | case 0: |
4173 | 0 | return ::test::HttpResponse::default_instance(); |
4174 | 0 | case 1: |
4175 | 0 | return ::test::HttpResponse::default_instance(); |
4176 | 0 | default: |
4177 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
4178 | 0 | return *::google::protobuf::MessageFactory::generated_factory() |
4179 | 0 | ->GetPrototype(method->output_type()); |
4180 | 0 | } |
4181 | 0 | } |
4182 | | |
4183 | | HttpService_Stub::HttpService_Stub(::google::protobuf::RpcChannel* channel) |
4184 | 0 | : channel_(channel), owns_channel_(false) {} |
4185 | | HttpService_Stub::HttpService_Stub( |
4186 | | ::google::protobuf::RpcChannel* channel, |
4187 | | ::google::protobuf::Service::ChannelOwnership ownership) |
4188 | 0 | : channel_(channel), |
4189 | 0 | owns_channel_(ownership == ::google::protobuf::Service::STUB_OWNS_CHANNEL) {} |
4190 | 0 | HttpService_Stub::~HttpService_Stub() { |
4191 | 0 | if (owns_channel_) delete channel_; |
4192 | 0 | } |
4193 | | |
4194 | | void HttpService_Stub::Head(::google::protobuf::RpcController* controller, |
4195 | | const ::test::HttpRequest* request, |
4196 | | ::test::HttpResponse* response, |
4197 | 0 | ::google::protobuf::Closure* done) { |
4198 | 0 | channel_->CallMethod(descriptor()->method(0), |
4199 | 0 | controller, request, response, done); |
4200 | 0 | } |
4201 | | void HttpService_Stub::Expect(::google::protobuf::RpcController* controller, |
4202 | | const ::test::HttpRequest* request, |
4203 | | ::test::HttpResponse* response, |
4204 | 0 | ::google::protobuf::Closure* done) { |
4205 | 0 | channel_->CallMethod(descriptor()->method(1), |
4206 | 0 | controller, request, response, done); |
4207 | 0 | } |
4208 | | |
4209 | | // @@protoc_insertion_point(namespace_scope) |
4210 | | } // namespace test |
4211 | | namespace google { |
4212 | | namespace protobuf { |
4213 | 0 | template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::test::EchoRequest* Arena::CreateMaybeMessage< ::test::EchoRequest >(Arena* arena) { |
4214 | 0 | return Arena::CreateInternal< ::test::EchoRequest >(arena); |
4215 | 0 | } |
4216 | 0 | template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::test::EchoResponse* Arena::CreateMaybeMessage< ::test::EchoResponse >(Arena* arena) { |
4217 | 0 | return Arena::CreateInternal< ::test::EchoResponse >(arena); |
4218 | 0 | } |
4219 | 0 | template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::test::ComboRequest* Arena::CreateMaybeMessage< ::test::ComboRequest >(Arena* arena) { |
4220 | 0 | return Arena::CreateInternal< ::test::ComboRequest >(arena); |
4221 | 0 | } |
4222 | 0 | template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::test::BytesRequest* Arena::CreateMaybeMessage< ::test::BytesRequest >(Arena* arena) { |
4223 | 0 | return Arena::CreateInternal< ::test::BytesRequest >(arena); |
4224 | 0 | } |
4225 | 0 | template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::test::BytesResponse* Arena::CreateMaybeMessage< ::test::BytesResponse >(Arena* arena) { |
4226 | 0 | return Arena::CreateInternal< ::test::BytesResponse >(arena); |
4227 | 0 | } |
4228 | 0 | template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::test::ComboResponse* Arena::CreateMaybeMessage< ::test::ComboResponse >(Arena* arena) { |
4229 | 0 | return Arena::CreateInternal< ::test::ComboResponse >(arena); |
4230 | 0 | } |
4231 | 0 | template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::test::HttpRequest* Arena::CreateMaybeMessage< ::test::HttpRequest >(Arena* arena) { |
4232 | 0 | return Arena::CreateInternal< ::test::HttpRequest >(arena); |
4233 | 0 | } |
4234 | 0 | template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::test::HttpResponse* Arena::CreateMaybeMessage< ::test::HttpResponse >(Arena* arena) { |
4235 | 0 | return Arena::CreateInternal< ::test::HttpResponse >(arena); |
4236 | 0 | } |
4237 | 0 | template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::test::Message1* Arena::CreateMaybeMessage< ::test::Message1 >(Arena* arena) { |
4238 | 0 | return Arena::CreateInternal< ::test::Message1 >(arena); |
4239 | 0 | } |
4240 | 0 | template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::test::Message2* Arena::CreateMaybeMessage< ::test::Message2 >(Arena* arena) { |
4241 | 0 | return Arena::CreateInternal< ::test::Message2 >(arena); |
4242 | 0 | } |
4243 | 0 | template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::test::RecursiveMessage* Arena::CreateMaybeMessage< ::test::RecursiveMessage >(Arena* arena) { |
4244 | 0 | return Arena::CreateInternal< ::test::RecursiveMessage >(arena); |
4245 | 0 | } |
4246 | | } // namespace protobuf |
4247 | | } // namespace google |
4248 | | |
4249 | | // @@protoc_insertion_point(global_scope) |