/src/brpc/build/test/v3.pb.cc
Line | Count | Source |
1 | | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | | // source: v3.proto |
3 | | |
4 | | #include "v3.pb.h" |
5 | | |
6 | | #include <algorithm> |
7 | | |
8 | | #include <google/protobuf/io/coded_stream.h> |
9 | | #include <google/protobuf/extension_set.h> |
10 | | #include <google/protobuf/wire_format_lite.h> |
11 | | #include <google/protobuf/descriptor.h> |
12 | | #include <google/protobuf/generated_message_reflection.h> |
13 | | #include <google/protobuf/reflection_ops.h> |
14 | | #include <google/protobuf/wire_format.h> |
15 | | // @@protoc_insertion_point(includes) |
16 | | #include <google/protobuf/port_def.inc> |
17 | | |
18 | | PROTOBUF_PRAGMA_INIT_SEG |
19 | | |
20 | | namespace _pb = ::PROTOBUF_NAMESPACE_ID; |
21 | | namespace _pbi = _pb::internal; |
22 | | |
23 | | namespace v3 { |
24 | | PROTOBUF_CONSTEXPR EchoRequest::EchoRequest( |
25 | | ::_pbi::ConstantInitialized): _impl_{ |
26 | | /*decltype(_impl_.message_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} |
27 | | , /*decltype(_impl_._cached_size_)*/{}} {} |
28 | | struct EchoRequestDefaultTypeInternal { |
29 | | PROTOBUF_CONSTEXPR EchoRequestDefaultTypeInternal() |
30 | 0 | : _instance(::_pbi::ConstantInitialized{}) {} |
31 | 0 | ~EchoRequestDefaultTypeInternal() {} |
32 | | union { |
33 | | EchoRequest _instance; |
34 | | }; |
35 | | }; |
36 | | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EchoRequestDefaultTypeInternal _EchoRequest_default_instance_; |
37 | | PROTOBUF_CONSTEXPR EchoResponse::EchoResponse( |
38 | | ::_pbi::ConstantInitialized): _impl_{ |
39 | | /*decltype(_impl_.message_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} |
40 | | , /*decltype(_impl_._cached_size_)*/{}} {} |
41 | | struct EchoResponseDefaultTypeInternal { |
42 | | PROTOBUF_CONSTEXPR EchoResponseDefaultTypeInternal() |
43 | 0 | : _instance(::_pbi::ConstantInitialized{}) {} |
44 | 0 | ~EchoResponseDefaultTypeInternal() {} |
45 | | union { |
46 | | EchoResponse _instance; |
47 | | }; |
48 | | }; |
49 | | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EchoResponseDefaultTypeInternal _EchoResponse_default_instance_; |
50 | | } // namespace v3 |
51 | | static ::_pb::Metadata file_level_metadata_v3_2eproto[2]; |
52 | | static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_v3_2eproto = nullptr; |
53 | | static const ::_pb::ServiceDescriptor* file_level_service_descriptors_v3_2eproto[1]; |
54 | | |
55 | | const uint32_t TableStruct_v3_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
56 | | ~0u, // no _has_bits_ |
57 | | PROTOBUF_FIELD_OFFSET(::v3::EchoRequest, _internal_metadata_), |
58 | | ~0u, // no _extensions_ |
59 | | ~0u, // no _oneof_case_ |
60 | | ~0u, // no _weak_field_map_ |
61 | | ~0u, // no _inlined_string_donated_ |
62 | | PROTOBUF_FIELD_OFFSET(::v3::EchoRequest, _impl_.message_), |
63 | | ~0u, // no _has_bits_ |
64 | | PROTOBUF_FIELD_OFFSET(::v3::EchoResponse, _internal_metadata_), |
65 | | ~0u, // no _extensions_ |
66 | | ~0u, // no _oneof_case_ |
67 | | ~0u, // no _weak_field_map_ |
68 | | ~0u, // no _inlined_string_donated_ |
69 | | PROTOBUF_FIELD_OFFSET(::v3::EchoResponse, _impl_.message_), |
70 | | }; |
71 | | static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
72 | | { 0, -1, -1, sizeof(::v3::EchoRequest)}, |
73 | | { 7, -1, -1, sizeof(::v3::EchoResponse)}, |
74 | | }; |
75 | | |
76 | | static const ::_pb::Message* const file_default_instances[] = { |
77 | | &::v3::_EchoRequest_default_instance_._instance, |
78 | | &::v3::_EchoResponse_default_instance_._instance, |
79 | | }; |
80 | | |
81 | | const char descriptor_table_protodef_v3_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = |
82 | | "\n\010v3.proto\022\002v3\"\036\n\013EchoRequest\022\017\n\007message" |
83 | | "\030\001 \001(\t\"\037\n\014EchoResponse\022\017\n\007message\030\001 \001(\t2" |
84 | | "8\n\013EchoService\022)\n\004Echo\022\017.v3.EchoRequest\032" |
85 | | "\020.v3.EchoResponseB\006\200\001\001\370\001\001b\006proto3" |
86 | | ; |
87 | | static ::_pbi::once_flag descriptor_table_v3_2eproto_once; |
88 | | const ::_pbi::DescriptorTable descriptor_table_v3_2eproto = { |
89 | | false, false, 153, descriptor_table_protodef_v3_2eproto, |
90 | | "v3.proto", |
91 | | &descriptor_table_v3_2eproto_once, nullptr, 0, 2, |
92 | | schemas, file_default_instances, TableStruct_v3_2eproto::offsets, |
93 | | file_level_metadata_v3_2eproto, file_level_enum_descriptors_v3_2eproto, |
94 | | file_level_service_descriptors_v3_2eproto, |
95 | | }; |
96 | 0 | PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_v3_2eproto_getter() { |
97 | 0 | return &descriptor_table_v3_2eproto; |
98 | 0 | } |
99 | | |
100 | | // Force running AddDescriptors() at dynamic initialization time. |
101 | | PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_v3_2eproto(&descriptor_table_v3_2eproto); |
102 | | namespace v3 { |
103 | | |
104 | | // =================================================================== |
105 | | |
106 | | class EchoRequest::_Internal { |
107 | | public: |
108 | | }; |
109 | | |
110 | | EchoRequest::EchoRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
111 | | bool is_message_owned) |
112 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { |
113 | 0 | SharedCtor(arena, is_message_owned); |
114 | | // @@protoc_insertion_point(arena_constructor:v3.EchoRequest) |
115 | 0 | } |
116 | | EchoRequest::EchoRequest(const EchoRequest& from) |
117 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message() { |
118 | 0 | EchoRequest* const _this = this; (void)_this; |
119 | 0 | new (&_impl_) Impl_{ |
120 | 0 | decltype(_impl_.message_){} |
121 | 0 | , /*decltype(_impl_._cached_size_)*/{}}; |
122 | |
|
123 | 0 | _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
124 | 0 | _impl_.message_.InitDefault(); |
125 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
126 | | _impl_.message_.Set("", GetArenaForAllocation()); |
127 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
128 | 0 | if (!from._internal_message().empty()) { |
129 | 0 | _this->_impl_.message_.Set(from._internal_message(), |
130 | 0 | _this->GetArenaForAllocation()); |
131 | 0 | } |
132 | | // @@protoc_insertion_point(copy_constructor:v3.EchoRequest) |
133 | 0 | } |
134 | | |
135 | | inline void EchoRequest::SharedCtor( |
136 | 0 | ::_pb::Arena* arena, bool is_message_owned) { |
137 | 0 | (void)arena; |
138 | 0 | (void)is_message_owned; |
139 | 0 | new (&_impl_) Impl_{ |
140 | 0 | decltype(_impl_.message_){} |
141 | 0 | , /*decltype(_impl_._cached_size_)*/{} |
142 | 0 | }; |
143 | 0 | _impl_.message_.InitDefault(); |
144 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
145 | | _impl_.message_.Set("", GetArenaForAllocation()); |
146 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
147 | 0 | } |
148 | | |
149 | 0 | EchoRequest::~EchoRequest() { |
150 | | // @@protoc_insertion_point(destructor:v3.EchoRequest) |
151 | 0 | if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { |
152 | 0 | (void)arena; |
153 | 0 | return; |
154 | 0 | } |
155 | 0 | SharedDtor(); |
156 | 0 | } |
157 | | |
158 | 0 | inline void EchoRequest::SharedDtor() { |
159 | 0 | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
160 | 0 | _impl_.message_.Destroy(); |
161 | 0 | } |
162 | | |
163 | 0 | void EchoRequest::SetCachedSize(int size) const { |
164 | 0 | _impl_._cached_size_.Set(size); |
165 | 0 | } |
166 | | |
167 | 0 | void EchoRequest::Clear() { |
168 | | // @@protoc_insertion_point(message_clear_start:v3.EchoRequest) |
169 | 0 | uint32_t cached_has_bits = 0; |
170 | | // Prevent compiler warnings about cached_has_bits being unused |
171 | 0 | (void) cached_has_bits; |
172 | |
|
173 | 0 | _impl_.message_.ClearToEmpty(); |
174 | 0 | _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
175 | 0 | } |
176 | | |
177 | 0 | const char* EchoRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { |
178 | 0 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
179 | 0 | while (!ctx->Done(&ptr)) { |
180 | 0 | uint32_t tag; |
181 | 0 | ptr = ::_pbi::ReadTag(ptr, &tag); |
182 | 0 | switch (tag >> 3) { |
183 | | // string message = 1; |
184 | 0 | case 1: |
185 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { |
186 | 0 | auto str = _internal_mutable_message(); |
187 | 0 | ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); |
188 | 0 | CHK_(ptr); |
189 | 0 | CHK_(::_pbi::VerifyUTF8(str, "v3.EchoRequest.message")); |
190 | 0 | } else |
191 | 0 | goto handle_unusual; |
192 | 0 | continue; |
193 | 0 | default: |
194 | 0 | goto handle_unusual; |
195 | 0 | } // switch |
196 | 0 | handle_unusual: |
197 | 0 | if ((tag == 0) || ((tag & 7) == 4)) { |
198 | 0 | CHK_(ptr); |
199 | 0 | ctx->SetLastTag(tag); |
200 | 0 | goto message_done; |
201 | 0 | } |
202 | 0 | ptr = UnknownFieldParse( |
203 | 0 | tag, |
204 | 0 | _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), |
205 | 0 | ptr, ctx); |
206 | 0 | CHK_(ptr != nullptr); |
207 | 0 | } // while |
208 | 0 | message_done: |
209 | 0 | return ptr; |
210 | 0 | failure: |
211 | 0 | ptr = nullptr; |
212 | 0 | goto message_done; |
213 | 0 | #undef CHK_ |
214 | 0 | } |
215 | | |
216 | | uint8_t* EchoRequest::_InternalSerialize( |
217 | 0 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
218 | | // @@protoc_insertion_point(serialize_to_array_start:v3.EchoRequest) |
219 | 0 | uint32_t cached_has_bits = 0; |
220 | 0 | (void) cached_has_bits; |
221 | | |
222 | | // string message = 1; |
223 | 0 | if (!this->_internal_message().empty()) { |
224 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
225 | 0 | this->_internal_message().data(), static_cast<int>(this->_internal_message().length()), |
226 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
227 | 0 | "v3.EchoRequest.message"); |
228 | 0 | target = stream->WriteStringMaybeAliased( |
229 | 0 | 1, this->_internal_message(), target); |
230 | 0 | } |
231 | |
|
232 | 0 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
233 | 0 | target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( |
234 | 0 | _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); |
235 | 0 | } |
236 | | // @@protoc_insertion_point(serialize_to_array_end:v3.EchoRequest) |
237 | 0 | return target; |
238 | 0 | } |
239 | | |
240 | 0 | size_t EchoRequest::ByteSizeLong() const { |
241 | | // @@protoc_insertion_point(message_byte_size_start:v3.EchoRequest) |
242 | 0 | size_t total_size = 0; |
243 | |
|
244 | 0 | uint32_t cached_has_bits = 0; |
245 | | // Prevent compiler warnings about cached_has_bits being unused |
246 | 0 | (void) cached_has_bits; |
247 | | |
248 | | // string message = 1; |
249 | 0 | if (!this->_internal_message().empty()) { |
250 | 0 | total_size += 1 + |
251 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
252 | 0 | this->_internal_message()); |
253 | 0 | } |
254 | |
|
255 | 0 | return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); |
256 | 0 | } |
257 | | |
258 | | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EchoRequest::_class_data_ = { |
259 | | ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, |
260 | | EchoRequest::MergeImpl |
261 | | }; |
262 | 0 | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EchoRequest::GetClassData() const { return &_class_data_; } |
263 | | |
264 | | |
265 | 0 | void EchoRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { |
266 | 0 | auto* const _this = static_cast<EchoRequest*>(&to_msg); |
267 | 0 | auto& from = static_cast<const EchoRequest&>(from_msg); |
268 | | // @@protoc_insertion_point(class_specific_merge_from_start:v3.EchoRequest) |
269 | 0 | GOOGLE_DCHECK_NE(&from, _this); |
270 | 0 | uint32_t cached_has_bits = 0; |
271 | 0 | (void) cached_has_bits; |
272 | |
|
273 | 0 | if (!from._internal_message().empty()) { |
274 | 0 | _this->_internal_set_message(from._internal_message()); |
275 | 0 | } |
276 | 0 | _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
277 | 0 | } |
278 | | |
279 | 0 | void EchoRequest::CopyFrom(const EchoRequest& from) { |
280 | | // @@protoc_insertion_point(class_specific_copy_from_start:v3.EchoRequest) |
281 | 0 | if (&from == this) return; |
282 | 0 | Clear(); |
283 | 0 | MergeFrom(from); |
284 | 0 | } |
285 | | |
286 | 0 | bool EchoRequest::IsInitialized() const { |
287 | 0 | return true; |
288 | 0 | } |
289 | | |
290 | 0 | void EchoRequest::InternalSwap(EchoRequest* other) { |
291 | 0 | using std::swap; |
292 | 0 | auto* lhs_arena = GetArenaForAllocation(); |
293 | 0 | auto* rhs_arena = other->GetArenaForAllocation(); |
294 | 0 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
295 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
296 | 0 | &_impl_.message_, lhs_arena, |
297 | 0 | &other->_impl_.message_, rhs_arena |
298 | 0 | ); |
299 | 0 | } |
300 | | |
301 | 0 | ::PROTOBUF_NAMESPACE_ID::Metadata EchoRequest::GetMetadata() const { |
302 | 0 | return ::_pbi::AssignDescriptors( |
303 | 0 | &descriptor_table_v3_2eproto_getter, &descriptor_table_v3_2eproto_once, |
304 | 0 | file_level_metadata_v3_2eproto[0]); |
305 | 0 | } |
306 | | |
307 | | // =================================================================== |
308 | | |
309 | | class EchoResponse::_Internal { |
310 | | public: |
311 | | }; |
312 | | |
313 | | EchoResponse::EchoResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
314 | | bool is_message_owned) |
315 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { |
316 | 0 | SharedCtor(arena, is_message_owned); |
317 | | // @@protoc_insertion_point(arena_constructor:v3.EchoResponse) |
318 | 0 | } |
319 | | EchoResponse::EchoResponse(const EchoResponse& from) |
320 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message() { |
321 | 0 | EchoResponse* const _this = this; (void)_this; |
322 | 0 | new (&_impl_) Impl_{ |
323 | 0 | decltype(_impl_.message_){} |
324 | 0 | , /*decltype(_impl_._cached_size_)*/{}}; |
325 | |
|
326 | 0 | _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
327 | 0 | _impl_.message_.InitDefault(); |
328 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
329 | | _impl_.message_.Set("", GetArenaForAllocation()); |
330 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
331 | 0 | if (!from._internal_message().empty()) { |
332 | 0 | _this->_impl_.message_.Set(from._internal_message(), |
333 | 0 | _this->GetArenaForAllocation()); |
334 | 0 | } |
335 | | // @@protoc_insertion_point(copy_constructor:v3.EchoResponse) |
336 | 0 | } |
337 | | |
338 | | inline void EchoResponse::SharedCtor( |
339 | 0 | ::_pb::Arena* arena, bool is_message_owned) { |
340 | 0 | (void)arena; |
341 | 0 | (void)is_message_owned; |
342 | 0 | new (&_impl_) Impl_{ |
343 | 0 | decltype(_impl_.message_){} |
344 | 0 | , /*decltype(_impl_._cached_size_)*/{} |
345 | 0 | }; |
346 | 0 | _impl_.message_.InitDefault(); |
347 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
348 | | _impl_.message_.Set("", GetArenaForAllocation()); |
349 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
350 | 0 | } |
351 | | |
352 | 0 | EchoResponse::~EchoResponse() { |
353 | | // @@protoc_insertion_point(destructor:v3.EchoResponse) |
354 | 0 | if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { |
355 | 0 | (void)arena; |
356 | 0 | return; |
357 | 0 | } |
358 | 0 | SharedDtor(); |
359 | 0 | } |
360 | | |
361 | 0 | inline void EchoResponse::SharedDtor() { |
362 | 0 | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
363 | 0 | _impl_.message_.Destroy(); |
364 | 0 | } |
365 | | |
366 | 0 | void EchoResponse::SetCachedSize(int size) const { |
367 | 0 | _impl_._cached_size_.Set(size); |
368 | 0 | } |
369 | | |
370 | 0 | void EchoResponse::Clear() { |
371 | | // @@protoc_insertion_point(message_clear_start:v3.EchoResponse) |
372 | 0 | uint32_t cached_has_bits = 0; |
373 | | // Prevent compiler warnings about cached_has_bits being unused |
374 | 0 | (void) cached_has_bits; |
375 | |
|
376 | 0 | _impl_.message_.ClearToEmpty(); |
377 | 0 | _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
378 | 0 | } |
379 | | |
380 | 0 | const char* EchoResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { |
381 | 0 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
382 | 0 | while (!ctx->Done(&ptr)) { |
383 | 0 | uint32_t tag; |
384 | 0 | ptr = ::_pbi::ReadTag(ptr, &tag); |
385 | 0 | switch (tag >> 3) { |
386 | | // string message = 1; |
387 | 0 | case 1: |
388 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { |
389 | 0 | auto str = _internal_mutable_message(); |
390 | 0 | ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); |
391 | 0 | CHK_(ptr); |
392 | 0 | CHK_(::_pbi::VerifyUTF8(str, "v3.EchoResponse.message")); |
393 | 0 | } else |
394 | 0 | goto handle_unusual; |
395 | 0 | continue; |
396 | 0 | default: |
397 | 0 | goto handle_unusual; |
398 | 0 | } // switch |
399 | 0 | handle_unusual: |
400 | 0 | if ((tag == 0) || ((tag & 7) == 4)) { |
401 | 0 | CHK_(ptr); |
402 | 0 | ctx->SetLastTag(tag); |
403 | 0 | goto message_done; |
404 | 0 | } |
405 | 0 | ptr = UnknownFieldParse( |
406 | 0 | tag, |
407 | 0 | _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), |
408 | 0 | ptr, ctx); |
409 | 0 | CHK_(ptr != nullptr); |
410 | 0 | } // while |
411 | 0 | message_done: |
412 | 0 | return ptr; |
413 | 0 | failure: |
414 | 0 | ptr = nullptr; |
415 | 0 | goto message_done; |
416 | 0 | #undef CHK_ |
417 | 0 | } |
418 | | |
419 | | uint8_t* EchoResponse::_InternalSerialize( |
420 | 0 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
421 | | // @@protoc_insertion_point(serialize_to_array_start:v3.EchoResponse) |
422 | 0 | uint32_t cached_has_bits = 0; |
423 | 0 | (void) cached_has_bits; |
424 | | |
425 | | // string message = 1; |
426 | 0 | if (!this->_internal_message().empty()) { |
427 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
428 | 0 | this->_internal_message().data(), static_cast<int>(this->_internal_message().length()), |
429 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
430 | 0 | "v3.EchoResponse.message"); |
431 | 0 | target = stream->WriteStringMaybeAliased( |
432 | 0 | 1, this->_internal_message(), target); |
433 | 0 | } |
434 | |
|
435 | 0 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
436 | 0 | target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( |
437 | 0 | _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); |
438 | 0 | } |
439 | | // @@protoc_insertion_point(serialize_to_array_end:v3.EchoResponse) |
440 | 0 | return target; |
441 | 0 | } |
442 | | |
443 | 0 | size_t EchoResponse::ByteSizeLong() const { |
444 | | // @@protoc_insertion_point(message_byte_size_start:v3.EchoResponse) |
445 | 0 | size_t total_size = 0; |
446 | |
|
447 | 0 | uint32_t cached_has_bits = 0; |
448 | | // Prevent compiler warnings about cached_has_bits being unused |
449 | 0 | (void) cached_has_bits; |
450 | | |
451 | | // string message = 1; |
452 | 0 | if (!this->_internal_message().empty()) { |
453 | 0 | total_size += 1 + |
454 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
455 | 0 | this->_internal_message()); |
456 | 0 | } |
457 | |
|
458 | 0 | return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); |
459 | 0 | } |
460 | | |
461 | | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EchoResponse::_class_data_ = { |
462 | | ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, |
463 | | EchoResponse::MergeImpl |
464 | | }; |
465 | 0 | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EchoResponse::GetClassData() const { return &_class_data_; } |
466 | | |
467 | | |
468 | 0 | void EchoResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { |
469 | 0 | auto* const _this = static_cast<EchoResponse*>(&to_msg); |
470 | 0 | auto& from = static_cast<const EchoResponse&>(from_msg); |
471 | | // @@protoc_insertion_point(class_specific_merge_from_start:v3.EchoResponse) |
472 | 0 | GOOGLE_DCHECK_NE(&from, _this); |
473 | 0 | uint32_t cached_has_bits = 0; |
474 | 0 | (void) cached_has_bits; |
475 | |
|
476 | 0 | if (!from._internal_message().empty()) { |
477 | 0 | _this->_internal_set_message(from._internal_message()); |
478 | 0 | } |
479 | 0 | _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
480 | 0 | } |
481 | | |
482 | 0 | void EchoResponse::CopyFrom(const EchoResponse& from) { |
483 | | // @@protoc_insertion_point(class_specific_copy_from_start:v3.EchoResponse) |
484 | 0 | if (&from == this) return; |
485 | 0 | Clear(); |
486 | 0 | MergeFrom(from); |
487 | 0 | } |
488 | | |
489 | 0 | bool EchoResponse::IsInitialized() const { |
490 | 0 | return true; |
491 | 0 | } |
492 | | |
493 | 0 | void EchoResponse::InternalSwap(EchoResponse* other) { |
494 | 0 | using std::swap; |
495 | 0 | auto* lhs_arena = GetArenaForAllocation(); |
496 | 0 | auto* rhs_arena = other->GetArenaForAllocation(); |
497 | 0 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
498 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
499 | 0 | &_impl_.message_, lhs_arena, |
500 | 0 | &other->_impl_.message_, rhs_arena |
501 | 0 | ); |
502 | 0 | } |
503 | | |
504 | 0 | ::PROTOBUF_NAMESPACE_ID::Metadata EchoResponse::GetMetadata() const { |
505 | 0 | return ::_pbi::AssignDescriptors( |
506 | 0 | &descriptor_table_v3_2eproto_getter, &descriptor_table_v3_2eproto_once, |
507 | 0 | file_level_metadata_v3_2eproto[1]); |
508 | 0 | } |
509 | | |
510 | | // =================================================================== |
511 | | |
512 | 0 | EchoService::~EchoService() {} |
513 | | |
514 | 0 | const ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor* EchoService::descriptor() { |
515 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_v3_2eproto); |
516 | 0 | return file_level_service_descriptors_v3_2eproto[0]; |
517 | 0 | } |
518 | | |
519 | 0 | const ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor* EchoService::GetDescriptor() { |
520 | 0 | return descriptor(); |
521 | 0 | } |
522 | | |
523 | | void EchoService::Echo(::PROTOBUF_NAMESPACE_ID::RpcController* controller, |
524 | | const ::v3::EchoRequest*, |
525 | | ::v3::EchoResponse*, |
526 | 0 | ::google::protobuf::Closure* done) { |
527 | 0 | controller->SetFailed("Method Echo() not implemented."); |
528 | 0 | done->Run(); |
529 | 0 | } |
530 | | |
531 | | void EchoService::CallMethod(const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method, |
532 | | ::PROTOBUF_NAMESPACE_ID::RpcController* controller, |
533 | | const ::PROTOBUF_NAMESPACE_ID::Message* request, |
534 | | ::PROTOBUF_NAMESPACE_ID::Message* response, |
535 | 0 | ::google::protobuf::Closure* done) { |
536 | 0 | GOOGLE_DCHECK_EQ(method->service(), file_level_service_descriptors_v3_2eproto[0]); |
537 | 0 | switch(method->index()) { |
538 | 0 | case 0: |
539 | 0 | Echo(controller, |
540 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::DownCast<const ::v3::EchoRequest*>( |
541 | 0 | request), |
542 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::DownCast<::v3::EchoResponse*>( |
543 | 0 | response), |
544 | 0 | done); |
545 | 0 | break; |
546 | 0 | default: |
547 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
548 | 0 | break; |
549 | 0 | } |
550 | 0 | } |
551 | | |
552 | | const ::PROTOBUF_NAMESPACE_ID::Message& EchoService::GetRequestPrototype( |
553 | 0 | const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method) const { |
554 | 0 | GOOGLE_DCHECK_EQ(method->service(), descriptor()); |
555 | 0 | switch(method->index()) { |
556 | 0 | case 0: |
557 | 0 | return ::v3::EchoRequest::default_instance(); |
558 | 0 | default: |
559 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
560 | 0 | return *::PROTOBUF_NAMESPACE_ID::MessageFactory::generated_factory() |
561 | 0 | ->GetPrototype(method->input_type()); |
562 | 0 | } |
563 | 0 | } |
564 | | |
565 | | const ::PROTOBUF_NAMESPACE_ID::Message& EchoService::GetResponsePrototype( |
566 | 0 | const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method) const { |
567 | 0 | GOOGLE_DCHECK_EQ(method->service(), descriptor()); |
568 | 0 | switch(method->index()) { |
569 | 0 | case 0: |
570 | 0 | return ::v3::EchoResponse::default_instance(); |
571 | 0 | default: |
572 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
573 | 0 | return *::PROTOBUF_NAMESPACE_ID::MessageFactory::generated_factory() |
574 | 0 | ->GetPrototype(method->output_type()); |
575 | 0 | } |
576 | 0 | } |
577 | | |
578 | | EchoService_Stub::EchoService_Stub(::PROTOBUF_NAMESPACE_ID::RpcChannel* channel) |
579 | 0 | : channel_(channel), owns_channel_(false) {} |
580 | | EchoService_Stub::EchoService_Stub( |
581 | | ::PROTOBUF_NAMESPACE_ID::RpcChannel* channel, |
582 | | ::PROTOBUF_NAMESPACE_ID::Service::ChannelOwnership ownership) |
583 | 0 | : channel_(channel), |
584 | 0 | owns_channel_(ownership == ::PROTOBUF_NAMESPACE_ID::Service::STUB_OWNS_CHANNEL) {} |
585 | 0 | EchoService_Stub::~EchoService_Stub() { |
586 | 0 | if (owns_channel_) delete channel_; |
587 | 0 | } |
588 | | |
589 | | void EchoService_Stub::Echo(::PROTOBUF_NAMESPACE_ID::RpcController* controller, |
590 | | const ::v3::EchoRequest* request, |
591 | | ::v3::EchoResponse* response, |
592 | 0 | ::google::protobuf::Closure* done) { |
593 | 0 | channel_->CallMethod(descriptor()->method(0), |
594 | 0 | controller, request, response, done); |
595 | 0 | } |
596 | | |
597 | | // @@protoc_insertion_point(namespace_scope) |
598 | | } // namespace v3 |
599 | | PROTOBUF_NAMESPACE_OPEN |
600 | | template<> PROTOBUF_NOINLINE ::v3::EchoRequest* |
601 | 0 | Arena::CreateMaybeMessage< ::v3::EchoRequest >(Arena* arena) { |
602 | 0 | return Arena::CreateMessageInternal< ::v3::EchoRequest >(arena); |
603 | 0 | } |
604 | | template<> PROTOBUF_NOINLINE ::v3::EchoResponse* |
605 | 0 | Arena::CreateMaybeMessage< ::v3::EchoResponse >(Arena* arena) { |
606 | 0 | return Arena::CreateMessageInternal< ::v3::EchoResponse >(arena); |
607 | 0 | } |
608 | | PROTOBUF_NAMESPACE_CLOSE |
609 | | |
610 | | // @@protoc_insertion_point(global_scope) |
611 | | #include <google/protobuf/port_undef.inc> |