/src/brpc/build/test/v1.pb.cc
Line | Count | Source |
1 | | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | | // source: v1.proto |
3 | | |
4 | | #include "v1.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 v1 { |
24 | | PROTOBUF_CONSTEXPR EchoRequest::EchoRequest( |
25 | | ::_pbi::ConstantInitialized): _impl_{ |
26 | | /*decltype(_impl_._has_bits_)*/{} |
27 | | , /*decltype(_impl_._cached_size_)*/{} |
28 | | , /*decltype(_impl_.message_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {} |
29 | | struct EchoRequestDefaultTypeInternal { |
30 | | PROTOBUF_CONSTEXPR EchoRequestDefaultTypeInternal() |
31 | 0 | : _instance(::_pbi::ConstantInitialized{}) {} |
32 | 0 | ~EchoRequestDefaultTypeInternal() {} |
33 | | union { |
34 | | EchoRequest _instance; |
35 | | }; |
36 | | }; |
37 | | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EchoRequestDefaultTypeInternal _EchoRequest_default_instance_; |
38 | | PROTOBUF_CONSTEXPR EchoResponse::EchoResponse( |
39 | | ::_pbi::ConstantInitialized): _impl_{ |
40 | | /*decltype(_impl_._has_bits_)*/{} |
41 | | , /*decltype(_impl_._cached_size_)*/{} |
42 | | , /*decltype(_impl_.message_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {} |
43 | | struct EchoResponseDefaultTypeInternal { |
44 | | PROTOBUF_CONSTEXPR EchoResponseDefaultTypeInternal() |
45 | 0 | : _instance(::_pbi::ConstantInitialized{}) {} |
46 | 0 | ~EchoResponseDefaultTypeInternal() {} |
47 | | union { |
48 | | EchoResponse _instance; |
49 | | }; |
50 | | }; |
51 | | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EchoResponseDefaultTypeInternal _EchoResponse_default_instance_; |
52 | | } // namespace v1 |
53 | | static ::_pb::Metadata file_level_metadata_v1_2eproto[2]; |
54 | | static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_v1_2eproto = nullptr; |
55 | | static const ::_pb::ServiceDescriptor* file_level_service_descriptors_v1_2eproto[1]; |
56 | | |
57 | | const uint32_t TableStruct_v1_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
58 | | PROTOBUF_FIELD_OFFSET(::v1::EchoRequest, _impl_._has_bits_), |
59 | | PROTOBUF_FIELD_OFFSET(::v1::EchoRequest, _internal_metadata_), |
60 | | ~0u, // no _extensions_ |
61 | | ~0u, // no _oneof_case_ |
62 | | ~0u, // no _weak_field_map_ |
63 | | ~0u, // no _inlined_string_donated_ |
64 | | PROTOBUF_FIELD_OFFSET(::v1::EchoRequest, _impl_.message_), |
65 | | 0, |
66 | | PROTOBUF_FIELD_OFFSET(::v1::EchoResponse, _impl_._has_bits_), |
67 | | PROTOBUF_FIELD_OFFSET(::v1::EchoResponse, _internal_metadata_), |
68 | | ~0u, // no _extensions_ |
69 | | ~0u, // no _oneof_case_ |
70 | | ~0u, // no _weak_field_map_ |
71 | | ~0u, // no _inlined_string_donated_ |
72 | | PROTOBUF_FIELD_OFFSET(::v1::EchoResponse, _impl_.message_), |
73 | | 0, |
74 | | }; |
75 | | static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
76 | | { 0, 7, -1, sizeof(::v1::EchoRequest)}, |
77 | | { 8, 15, -1, sizeof(::v1::EchoResponse)}, |
78 | | }; |
79 | | |
80 | | static const ::_pb::Message* const file_default_instances[] = { |
81 | | &::v1::_EchoRequest_default_instance_._instance, |
82 | | &::v1::_EchoResponse_default_instance_._instance, |
83 | | }; |
84 | | |
85 | | const char descriptor_table_protodef_v1_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = |
86 | | "\n\010v1.proto\022\002v1\"\036\n\013EchoRequest\022\017\n\007message" |
87 | | "\030\001 \002(\t\"\037\n\014EchoResponse\022\017\n\007message\030\001 \002(\t2" |
88 | | "\350\001\n\013EchoService\022)\n\004Echo\022\017.v1.EchoRequest" |
89 | | "\032\020.v1.EchoResponse\022*\n\005Echo2\022\017.v1.EchoReq" |
90 | | "uest\032\020.v1.EchoResponse\022*\n\005Echo3\022\017.v1.Ech" |
91 | | "oRequest\032\020.v1.EchoResponse\022*\n\005Echo4\022\017.v1" |
92 | | ".EchoRequest\032\020.v1.EchoResponse\022*\n\005Echo5\022" |
93 | | "\017.v1.EchoRequest\032\020.v1.EchoResponseB\003\200\001\001" |
94 | | ; |
95 | | static ::_pbi::once_flag descriptor_table_v1_2eproto_once; |
96 | | const ::_pbi::DescriptorTable descriptor_table_v1_2eproto = { |
97 | | false, false, 319, descriptor_table_protodef_v1_2eproto, |
98 | | "v1.proto", |
99 | | &descriptor_table_v1_2eproto_once, nullptr, 0, 2, |
100 | | schemas, file_default_instances, TableStruct_v1_2eproto::offsets, |
101 | | file_level_metadata_v1_2eproto, file_level_enum_descriptors_v1_2eproto, |
102 | | file_level_service_descriptors_v1_2eproto, |
103 | | }; |
104 | 0 | PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_v1_2eproto_getter() { |
105 | 0 | return &descriptor_table_v1_2eproto; |
106 | 0 | } |
107 | | |
108 | | // Force running AddDescriptors() at dynamic initialization time. |
109 | | PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_v1_2eproto(&descriptor_table_v1_2eproto); |
110 | | namespace v1 { |
111 | | |
112 | | // =================================================================== |
113 | | |
114 | | class EchoRequest::_Internal { |
115 | | public: |
116 | | using HasBits = decltype(std::declval<EchoRequest>()._impl_._has_bits_); |
117 | 0 | static void set_has_message(HasBits* has_bits) { |
118 | 0 | (*has_bits)[0] |= 1u; |
119 | 0 | } |
120 | 0 | static bool MissingRequiredFields(const HasBits& has_bits) { |
121 | 0 | return ((has_bits[0] & 0x00000001) ^ 0x00000001) != 0; |
122 | 0 | } |
123 | | }; |
124 | | |
125 | | EchoRequest::EchoRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
126 | | bool is_message_owned) |
127 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { |
128 | 0 | SharedCtor(arena, is_message_owned); |
129 | | // @@protoc_insertion_point(arena_constructor:v1.EchoRequest) |
130 | 0 | } |
131 | | EchoRequest::EchoRequest(const EchoRequest& from) |
132 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message() { |
133 | 0 | EchoRequest* const _this = this; (void)_this; |
134 | 0 | new (&_impl_) Impl_{ |
135 | 0 | decltype(_impl_._has_bits_){from._impl_._has_bits_} |
136 | 0 | , /*decltype(_impl_._cached_size_)*/{} |
137 | 0 | , decltype(_impl_.message_){}}; |
138 | |
|
139 | 0 | _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
140 | 0 | _impl_.message_.InitDefault(); |
141 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
142 | | _impl_.message_.Set("", GetArenaForAllocation()); |
143 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
144 | 0 | if (from._internal_has_message()) { |
145 | 0 | _this->_impl_.message_.Set(from._internal_message(), |
146 | 0 | _this->GetArenaForAllocation()); |
147 | 0 | } |
148 | | // @@protoc_insertion_point(copy_constructor:v1.EchoRequest) |
149 | 0 | } |
150 | | |
151 | | inline void EchoRequest::SharedCtor( |
152 | 0 | ::_pb::Arena* arena, bool is_message_owned) { |
153 | 0 | (void)arena; |
154 | 0 | (void)is_message_owned; |
155 | 0 | new (&_impl_) Impl_{ |
156 | 0 | decltype(_impl_._has_bits_){} |
157 | 0 | , /*decltype(_impl_._cached_size_)*/{} |
158 | 0 | , decltype(_impl_.message_){} |
159 | 0 | }; |
160 | 0 | _impl_.message_.InitDefault(); |
161 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
162 | | _impl_.message_.Set("", GetArenaForAllocation()); |
163 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
164 | 0 | } |
165 | | |
166 | 0 | EchoRequest::~EchoRequest() { |
167 | | // @@protoc_insertion_point(destructor:v1.EchoRequest) |
168 | 0 | if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { |
169 | 0 | (void)arena; |
170 | 0 | return; |
171 | 0 | } |
172 | 0 | SharedDtor(); |
173 | 0 | } |
174 | | |
175 | 0 | inline void EchoRequest::SharedDtor() { |
176 | 0 | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
177 | 0 | _impl_.message_.Destroy(); |
178 | 0 | } |
179 | | |
180 | 0 | void EchoRequest::SetCachedSize(int size) const { |
181 | 0 | _impl_._cached_size_.Set(size); |
182 | 0 | } |
183 | | |
184 | 0 | void EchoRequest::Clear() { |
185 | | // @@protoc_insertion_point(message_clear_start:v1.EchoRequest) |
186 | 0 | uint32_t cached_has_bits = 0; |
187 | | // Prevent compiler warnings about cached_has_bits being unused |
188 | 0 | (void) cached_has_bits; |
189 | |
|
190 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
191 | 0 | if (cached_has_bits & 0x00000001u) { |
192 | 0 | _impl_.message_.ClearNonDefaultToEmpty(); |
193 | 0 | } |
194 | 0 | _impl_._has_bits_.Clear(); |
195 | 0 | _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
196 | 0 | } |
197 | | |
198 | 0 | const char* EchoRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { |
199 | 0 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
200 | 0 | _Internal::HasBits has_bits{}; |
201 | 0 | while (!ctx->Done(&ptr)) { |
202 | 0 | uint32_t tag; |
203 | 0 | ptr = ::_pbi::ReadTag(ptr, &tag); |
204 | 0 | switch (tag >> 3) { |
205 | | // required string message = 1; |
206 | 0 | case 1: |
207 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { |
208 | 0 | auto str = _internal_mutable_message(); |
209 | 0 | ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); |
210 | 0 | CHK_(ptr); |
211 | 0 | #ifndef NDEBUG |
212 | 0 | ::_pbi::VerifyUTF8(str, "v1.EchoRequest.message"); |
213 | 0 | #endif // !NDEBUG |
214 | 0 | } else |
215 | 0 | goto handle_unusual; |
216 | 0 | continue; |
217 | 0 | default: |
218 | 0 | goto handle_unusual; |
219 | 0 | } // switch |
220 | 0 | handle_unusual: |
221 | 0 | if ((tag == 0) || ((tag & 7) == 4)) { |
222 | 0 | CHK_(ptr); |
223 | 0 | ctx->SetLastTag(tag); |
224 | 0 | goto message_done; |
225 | 0 | } |
226 | 0 | ptr = UnknownFieldParse( |
227 | 0 | tag, |
228 | 0 | _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), |
229 | 0 | ptr, ctx); |
230 | 0 | CHK_(ptr != nullptr); |
231 | 0 | } // while |
232 | 0 | message_done: |
233 | 0 | _impl_._has_bits_.Or(has_bits); |
234 | 0 | return ptr; |
235 | 0 | failure: |
236 | 0 | ptr = nullptr; |
237 | 0 | goto message_done; |
238 | 0 | #undef CHK_ |
239 | 0 | } |
240 | | |
241 | | uint8_t* EchoRequest::_InternalSerialize( |
242 | 0 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
243 | | // @@protoc_insertion_point(serialize_to_array_start:v1.EchoRequest) |
244 | 0 | uint32_t cached_has_bits = 0; |
245 | 0 | (void) cached_has_bits; |
246 | |
|
247 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
248 | | // required string message = 1; |
249 | 0 | if (cached_has_bits & 0x00000001u) { |
250 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( |
251 | 0 | this->_internal_message().data(), static_cast<int>(this->_internal_message().length()), |
252 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, |
253 | 0 | "v1.EchoRequest.message"); |
254 | 0 | target = stream->WriteStringMaybeAliased( |
255 | 0 | 1, this->_internal_message(), target); |
256 | 0 | } |
257 | |
|
258 | 0 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
259 | 0 | target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( |
260 | 0 | _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); |
261 | 0 | } |
262 | | // @@protoc_insertion_point(serialize_to_array_end:v1.EchoRequest) |
263 | 0 | return target; |
264 | 0 | } |
265 | | |
266 | 0 | size_t EchoRequest::ByteSizeLong() const { |
267 | | // @@protoc_insertion_point(message_byte_size_start:v1.EchoRequest) |
268 | 0 | size_t total_size = 0; |
269 | | |
270 | | // required string message = 1; |
271 | 0 | if (_internal_has_message()) { |
272 | 0 | total_size += 1 + |
273 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
274 | 0 | this->_internal_message()); |
275 | 0 | } |
276 | 0 | uint32_t cached_has_bits = 0; |
277 | | // Prevent compiler warnings about cached_has_bits being unused |
278 | 0 | (void) cached_has_bits; |
279 | |
|
280 | 0 | return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); |
281 | 0 | } |
282 | | |
283 | | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EchoRequest::_class_data_ = { |
284 | | ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, |
285 | | EchoRequest::MergeImpl |
286 | | }; |
287 | 0 | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EchoRequest::GetClassData() const { return &_class_data_; } |
288 | | |
289 | | |
290 | 0 | void EchoRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { |
291 | 0 | auto* const _this = static_cast<EchoRequest*>(&to_msg); |
292 | 0 | auto& from = static_cast<const EchoRequest&>(from_msg); |
293 | | // @@protoc_insertion_point(class_specific_merge_from_start:v1.EchoRequest) |
294 | 0 | GOOGLE_DCHECK_NE(&from, _this); |
295 | 0 | uint32_t cached_has_bits = 0; |
296 | 0 | (void) cached_has_bits; |
297 | |
|
298 | 0 | if (from._internal_has_message()) { |
299 | 0 | _this->_internal_set_message(from._internal_message()); |
300 | 0 | } |
301 | 0 | _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
302 | 0 | } |
303 | | |
304 | 0 | void EchoRequest::CopyFrom(const EchoRequest& from) { |
305 | | // @@protoc_insertion_point(class_specific_copy_from_start:v1.EchoRequest) |
306 | 0 | if (&from == this) return; |
307 | 0 | Clear(); |
308 | 0 | MergeFrom(from); |
309 | 0 | } |
310 | | |
311 | 0 | bool EchoRequest::IsInitialized() const { |
312 | 0 | if (_Internal::MissingRequiredFields(_impl_._has_bits_)) return false; |
313 | 0 | return true; |
314 | 0 | } |
315 | | |
316 | 0 | void EchoRequest::InternalSwap(EchoRequest* other) { |
317 | 0 | using std::swap; |
318 | 0 | auto* lhs_arena = GetArenaForAllocation(); |
319 | 0 | auto* rhs_arena = other->GetArenaForAllocation(); |
320 | 0 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
321 | 0 | swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); |
322 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
323 | 0 | &_impl_.message_, lhs_arena, |
324 | 0 | &other->_impl_.message_, rhs_arena |
325 | 0 | ); |
326 | 0 | } |
327 | | |
328 | 0 | ::PROTOBUF_NAMESPACE_ID::Metadata EchoRequest::GetMetadata() const { |
329 | 0 | return ::_pbi::AssignDescriptors( |
330 | 0 | &descriptor_table_v1_2eproto_getter, &descriptor_table_v1_2eproto_once, |
331 | 0 | file_level_metadata_v1_2eproto[0]); |
332 | 0 | } |
333 | | |
334 | | // =================================================================== |
335 | | |
336 | | class EchoResponse::_Internal { |
337 | | public: |
338 | | using HasBits = decltype(std::declval<EchoResponse>()._impl_._has_bits_); |
339 | 0 | static void set_has_message(HasBits* has_bits) { |
340 | 0 | (*has_bits)[0] |= 1u; |
341 | 0 | } |
342 | 0 | static bool MissingRequiredFields(const HasBits& has_bits) { |
343 | 0 | return ((has_bits[0] & 0x00000001) ^ 0x00000001) != 0; |
344 | 0 | } |
345 | | }; |
346 | | |
347 | | EchoResponse::EchoResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
348 | | bool is_message_owned) |
349 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { |
350 | 0 | SharedCtor(arena, is_message_owned); |
351 | | // @@protoc_insertion_point(arena_constructor:v1.EchoResponse) |
352 | 0 | } |
353 | | EchoResponse::EchoResponse(const EchoResponse& from) |
354 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message() { |
355 | 0 | EchoResponse* const _this = this; (void)_this; |
356 | 0 | new (&_impl_) Impl_{ |
357 | 0 | decltype(_impl_._has_bits_){from._impl_._has_bits_} |
358 | 0 | , /*decltype(_impl_._cached_size_)*/{} |
359 | 0 | , decltype(_impl_.message_){}}; |
360 | |
|
361 | 0 | _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
362 | 0 | _impl_.message_.InitDefault(); |
363 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
364 | | _impl_.message_.Set("", GetArenaForAllocation()); |
365 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
366 | 0 | if (from._internal_has_message()) { |
367 | 0 | _this->_impl_.message_.Set(from._internal_message(), |
368 | 0 | _this->GetArenaForAllocation()); |
369 | 0 | } |
370 | | // @@protoc_insertion_point(copy_constructor:v1.EchoResponse) |
371 | 0 | } |
372 | | |
373 | | inline void EchoResponse::SharedCtor( |
374 | 0 | ::_pb::Arena* arena, bool is_message_owned) { |
375 | 0 | (void)arena; |
376 | 0 | (void)is_message_owned; |
377 | 0 | new (&_impl_) Impl_{ |
378 | 0 | decltype(_impl_._has_bits_){} |
379 | 0 | , /*decltype(_impl_._cached_size_)*/{} |
380 | 0 | , decltype(_impl_.message_){} |
381 | 0 | }; |
382 | 0 | _impl_.message_.InitDefault(); |
383 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
384 | | _impl_.message_.Set("", GetArenaForAllocation()); |
385 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
386 | 0 | } |
387 | | |
388 | 0 | EchoResponse::~EchoResponse() { |
389 | | // @@protoc_insertion_point(destructor:v1.EchoResponse) |
390 | 0 | if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { |
391 | 0 | (void)arena; |
392 | 0 | return; |
393 | 0 | } |
394 | 0 | SharedDtor(); |
395 | 0 | } |
396 | | |
397 | 0 | inline void EchoResponse::SharedDtor() { |
398 | 0 | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
399 | 0 | _impl_.message_.Destroy(); |
400 | 0 | } |
401 | | |
402 | 0 | void EchoResponse::SetCachedSize(int size) const { |
403 | 0 | _impl_._cached_size_.Set(size); |
404 | 0 | } |
405 | | |
406 | 0 | void EchoResponse::Clear() { |
407 | | // @@protoc_insertion_point(message_clear_start:v1.EchoResponse) |
408 | 0 | uint32_t cached_has_bits = 0; |
409 | | // Prevent compiler warnings about cached_has_bits being unused |
410 | 0 | (void) cached_has_bits; |
411 | |
|
412 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
413 | 0 | if (cached_has_bits & 0x00000001u) { |
414 | 0 | _impl_.message_.ClearNonDefaultToEmpty(); |
415 | 0 | } |
416 | 0 | _impl_._has_bits_.Clear(); |
417 | 0 | _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
418 | 0 | } |
419 | | |
420 | 0 | const char* EchoResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { |
421 | 0 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
422 | 0 | _Internal::HasBits has_bits{}; |
423 | 0 | while (!ctx->Done(&ptr)) { |
424 | 0 | uint32_t tag; |
425 | 0 | ptr = ::_pbi::ReadTag(ptr, &tag); |
426 | 0 | switch (tag >> 3) { |
427 | | // required string message = 1; |
428 | 0 | case 1: |
429 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { |
430 | 0 | auto str = _internal_mutable_message(); |
431 | 0 | ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); |
432 | 0 | CHK_(ptr); |
433 | 0 | #ifndef NDEBUG |
434 | 0 | ::_pbi::VerifyUTF8(str, "v1.EchoResponse.message"); |
435 | 0 | #endif // !NDEBUG |
436 | 0 | } else |
437 | 0 | goto handle_unusual; |
438 | 0 | continue; |
439 | 0 | default: |
440 | 0 | goto handle_unusual; |
441 | 0 | } // switch |
442 | 0 | handle_unusual: |
443 | 0 | if ((tag == 0) || ((tag & 7) == 4)) { |
444 | 0 | CHK_(ptr); |
445 | 0 | ctx->SetLastTag(tag); |
446 | 0 | goto message_done; |
447 | 0 | } |
448 | 0 | ptr = UnknownFieldParse( |
449 | 0 | tag, |
450 | 0 | _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), |
451 | 0 | ptr, ctx); |
452 | 0 | CHK_(ptr != nullptr); |
453 | 0 | } // while |
454 | 0 | message_done: |
455 | 0 | _impl_._has_bits_.Or(has_bits); |
456 | 0 | return ptr; |
457 | 0 | failure: |
458 | 0 | ptr = nullptr; |
459 | 0 | goto message_done; |
460 | 0 | #undef CHK_ |
461 | 0 | } |
462 | | |
463 | | uint8_t* EchoResponse::_InternalSerialize( |
464 | 0 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
465 | | // @@protoc_insertion_point(serialize_to_array_start:v1.EchoResponse) |
466 | 0 | uint32_t cached_has_bits = 0; |
467 | 0 | (void) cached_has_bits; |
468 | |
|
469 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
470 | | // required string message = 1; |
471 | 0 | if (cached_has_bits & 0x00000001u) { |
472 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( |
473 | 0 | this->_internal_message().data(), static_cast<int>(this->_internal_message().length()), |
474 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, |
475 | 0 | "v1.EchoResponse.message"); |
476 | 0 | target = stream->WriteStringMaybeAliased( |
477 | 0 | 1, this->_internal_message(), target); |
478 | 0 | } |
479 | |
|
480 | 0 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
481 | 0 | target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( |
482 | 0 | _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); |
483 | 0 | } |
484 | | // @@protoc_insertion_point(serialize_to_array_end:v1.EchoResponse) |
485 | 0 | return target; |
486 | 0 | } |
487 | | |
488 | 0 | size_t EchoResponse::ByteSizeLong() const { |
489 | | // @@protoc_insertion_point(message_byte_size_start:v1.EchoResponse) |
490 | 0 | size_t total_size = 0; |
491 | | |
492 | | // required string message = 1; |
493 | 0 | if (_internal_has_message()) { |
494 | 0 | total_size += 1 + |
495 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
496 | 0 | this->_internal_message()); |
497 | 0 | } |
498 | 0 | uint32_t cached_has_bits = 0; |
499 | | // Prevent compiler warnings about cached_has_bits being unused |
500 | 0 | (void) cached_has_bits; |
501 | |
|
502 | 0 | return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); |
503 | 0 | } |
504 | | |
505 | | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EchoResponse::_class_data_ = { |
506 | | ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, |
507 | | EchoResponse::MergeImpl |
508 | | }; |
509 | 0 | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EchoResponse::GetClassData() const { return &_class_data_; } |
510 | | |
511 | | |
512 | 0 | void EchoResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { |
513 | 0 | auto* const _this = static_cast<EchoResponse*>(&to_msg); |
514 | 0 | auto& from = static_cast<const EchoResponse&>(from_msg); |
515 | | // @@protoc_insertion_point(class_specific_merge_from_start:v1.EchoResponse) |
516 | 0 | GOOGLE_DCHECK_NE(&from, _this); |
517 | 0 | uint32_t cached_has_bits = 0; |
518 | 0 | (void) cached_has_bits; |
519 | |
|
520 | 0 | if (from._internal_has_message()) { |
521 | 0 | _this->_internal_set_message(from._internal_message()); |
522 | 0 | } |
523 | 0 | _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
524 | 0 | } |
525 | | |
526 | 0 | void EchoResponse::CopyFrom(const EchoResponse& from) { |
527 | | // @@protoc_insertion_point(class_specific_copy_from_start:v1.EchoResponse) |
528 | 0 | if (&from == this) return; |
529 | 0 | Clear(); |
530 | 0 | MergeFrom(from); |
531 | 0 | } |
532 | | |
533 | 0 | bool EchoResponse::IsInitialized() const { |
534 | 0 | if (_Internal::MissingRequiredFields(_impl_._has_bits_)) return false; |
535 | 0 | return true; |
536 | 0 | } |
537 | | |
538 | 0 | void EchoResponse::InternalSwap(EchoResponse* other) { |
539 | 0 | using std::swap; |
540 | 0 | auto* lhs_arena = GetArenaForAllocation(); |
541 | 0 | auto* rhs_arena = other->GetArenaForAllocation(); |
542 | 0 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
543 | 0 | swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); |
544 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
545 | 0 | &_impl_.message_, lhs_arena, |
546 | 0 | &other->_impl_.message_, rhs_arena |
547 | 0 | ); |
548 | 0 | } |
549 | | |
550 | 0 | ::PROTOBUF_NAMESPACE_ID::Metadata EchoResponse::GetMetadata() const { |
551 | 0 | return ::_pbi::AssignDescriptors( |
552 | 0 | &descriptor_table_v1_2eproto_getter, &descriptor_table_v1_2eproto_once, |
553 | 0 | file_level_metadata_v1_2eproto[1]); |
554 | 0 | } |
555 | | |
556 | | // =================================================================== |
557 | | |
558 | 0 | EchoService::~EchoService() {} |
559 | | |
560 | 0 | const ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor* EchoService::descriptor() { |
561 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_v1_2eproto); |
562 | 0 | return file_level_service_descriptors_v1_2eproto[0]; |
563 | 0 | } |
564 | | |
565 | 0 | const ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor* EchoService::GetDescriptor() { |
566 | 0 | return descriptor(); |
567 | 0 | } |
568 | | |
569 | | void EchoService::Echo(::PROTOBUF_NAMESPACE_ID::RpcController* controller, |
570 | | const ::v1::EchoRequest*, |
571 | | ::v1::EchoResponse*, |
572 | 0 | ::google::protobuf::Closure* done) { |
573 | 0 | controller->SetFailed("Method Echo() not implemented."); |
574 | 0 | done->Run(); |
575 | 0 | } |
576 | | |
577 | | void EchoService::Echo2(::PROTOBUF_NAMESPACE_ID::RpcController* controller, |
578 | | const ::v1::EchoRequest*, |
579 | | ::v1::EchoResponse*, |
580 | 0 | ::google::protobuf::Closure* done) { |
581 | 0 | controller->SetFailed("Method Echo2() not implemented."); |
582 | 0 | done->Run(); |
583 | 0 | } |
584 | | |
585 | | void EchoService::Echo3(::PROTOBUF_NAMESPACE_ID::RpcController* controller, |
586 | | const ::v1::EchoRequest*, |
587 | | ::v1::EchoResponse*, |
588 | 0 | ::google::protobuf::Closure* done) { |
589 | 0 | controller->SetFailed("Method Echo3() not implemented."); |
590 | 0 | done->Run(); |
591 | 0 | } |
592 | | |
593 | | void EchoService::Echo4(::PROTOBUF_NAMESPACE_ID::RpcController* controller, |
594 | | const ::v1::EchoRequest*, |
595 | | ::v1::EchoResponse*, |
596 | 0 | ::google::protobuf::Closure* done) { |
597 | 0 | controller->SetFailed("Method Echo4() not implemented."); |
598 | 0 | done->Run(); |
599 | 0 | } |
600 | | |
601 | | void EchoService::Echo5(::PROTOBUF_NAMESPACE_ID::RpcController* controller, |
602 | | const ::v1::EchoRequest*, |
603 | | ::v1::EchoResponse*, |
604 | 0 | ::google::protobuf::Closure* done) { |
605 | 0 | controller->SetFailed("Method Echo5() not implemented."); |
606 | 0 | done->Run(); |
607 | 0 | } |
608 | | |
609 | | void EchoService::CallMethod(const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method, |
610 | | ::PROTOBUF_NAMESPACE_ID::RpcController* controller, |
611 | | const ::PROTOBUF_NAMESPACE_ID::Message* request, |
612 | | ::PROTOBUF_NAMESPACE_ID::Message* response, |
613 | 0 | ::google::protobuf::Closure* done) { |
614 | 0 | GOOGLE_DCHECK_EQ(method->service(), file_level_service_descriptors_v1_2eproto[0]); |
615 | 0 | switch(method->index()) { |
616 | 0 | case 0: |
617 | 0 | Echo(controller, |
618 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::DownCast<const ::v1::EchoRequest*>( |
619 | 0 | request), |
620 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::DownCast<::v1::EchoResponse*>( |
621 | 0 | response), |
622 | 0 | done); |
623 | 0 | break; |
624 | 0 | case 1: |
625 | 0 | Echo2(controller, |
626 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::DownCast<const ::v1::EchoRequest*>( |
627 | 0 | request), |
628 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::DownCast<::v1::EchoResponse*>( |
629 | 0 | response), |
630 | 0 | done); |
631 | 0 | break; |
632 | 0 | case 2: |
633 | 0 | Echo3(controller, |
634 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::DownCast<const ::v1::EchoRequest*>( |
635 | 0 | request), |
636 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::DownCast<::v1::EchoResponse*>( |
637 | 0 | response), |
638 | 0 | done); |
639 | 0 | break; |
640 | 0 | case 3: |
641 | 0 | Echo4(controller, |
642 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::DownCast<const ::v1::EchoRequest*>( |
643 | 0 | request), |
644 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::DownCast<::v1::EchoResponse*>( |
645 | 0 | response), |
646 | 0 | done); |
647 | 0 | break; |
648 | 0 | case 4: |
649 | 0 | Echo5(controller, |
650 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::DownCast<const ::v1::EchoRequest*>( |
651 | 0 | request), |
652 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::DownCast<::v1::EchoResponse*>( |
653 | 0 | response), |
654 | 0 | done); |
655 | 0 | break; |
656 | 0 | default: |
657 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
658 | 0 | break; |
659 | 0 | } |
660 | 0 | } |
661 | | |
662 | | const ::PROTOBUF_NAMESPACE_ID::Message& EchoService::GetRequestPrototype( |
663 | 0 | const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method) const { |
664 | 0 | GOOGLE_DCHECK_EQ(method->service(), descriptor()); |
665 | 0 | switch(method->index()) { |
666 | 0 | case 0: |
667 | 0 | return ::v1::EchoRequest::default_instance(); |
668 | 0 | case 1: |
669 | 0 | return ::v1::EchoRequest::default_instance(); |
670 | 0 | case 2: |
671 | 0 | return ::v1::EchoRequest::default_instance(); |
672 | 0 | case 3: |
673 | 0 | return ::v1::EchoRequest::default_instance(); |
674 | 0 | case 4: |
675 | 0 | return ::v1::EchoRequest::default_instance(); |
676 | 0 | default: |
677 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
678 | 0 | return *::PROTOBUF_NAMESPACE_ID::MessageFactory::generated_factory() |
679 | 0 | ->GetPrototype(method->input_type()); |
680 | 0 | } |
681 | 0 | } |
682 | | |
683 | | const ::PROTOBUF_NAMESPACE_ID::Message& EchoService::GetResponsePrototype( |
684 | 0 | const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method) const { |
685 | 0 | GOOGLE_DCHECK_EQ(method->service(), descriptor()); |
686 | 0 | switch(method->index()) { |
687 | 0 | case 0: |
688 | 0 | return ::v1::EchoResponse::default_instance(); |
689 | 0 | case 1: |
690 | 0 | return ::v1::EchoResponse::default_instance(); |
691 | 0 | case 2: |
692 | 0 | return ::v1::EchoResponse::default_instance(); |
693 | 0 | case 3: |
694 | 0 | return ::v1::EchoResponse::default_instance(); |
695 | 0 | case 4: |
696 | 0 | return ::v1::EchoResponse::default_instance(); |
697 | 0 | default: |
698 | 0 | GOOGLE_LOG(FATAL) << "Bad method index; this should never happen."; |
699 | 0 | return *::PROTOBUF_NAMESPACE_ID::MessageFactory::generated_factory() |
700 | 0 | ->GetPrototype(method->output_type()); |
701 | 0 | } |
702 | 0 | } |
703 | | |
704 | | EchoService_Stub::EchoService_Stub(::PROTOBUF_NAMESPACE_ID::RpcChannel* channel) |
705 | 0 | : channel_(channel), owns_channel_(false) {} |
706 | | EchoService_Stub::EchoService_Stub( |
707 | | ::PROTOBUF_NAMESPACE_ID::RpcChannel* channel, |
708 | | ::PROTOBUF_NAMESPACE_ID::Service::ChannelOwnership ownership) |
709 | 0 | : channel_(channel), |
710 | 0 | owns_channel_(ownership == ::PROTOBUF_NAMESPACE_ID::Service::STUB_OWNS_CHANNEL) {} |
711 | 0 | EchoService_Stub::~EchoService_Stub() { |
712 | 0 | if (owns_channel_) delete channel_; |
713 | 0 | } |
714 | | |
715 | | void EchoService_Stub::Echo(::PROTOBUF_NAMESPACE_ID::RpcController* controller, |
716 | | const ::v1::EchoRequest* request, |
717 | | ::v1::EchoResponse* response, |
718 | 0 | ::google::protobuf::Closure* done) { |
719 | 0 | channel_->CallMethod(descriptor()->method(0), |
720 | 0 | controller, request, response, done); |
721 | 0 | } |
722 | | void EchoService_Stub::Echo2(::PROTOBUF_NAMESPACE_ID::RpcController* controller, |
723 | | const ::v1::EchoRequest* request, |
724 | | ::v1::EchoResponse* response, |
725 | 0 | ::google::protobuf::Closure* done) { |
726 | 0 | channel_->CallMethod(descriptor()->method(1), |
727 | 0 | controller, request, response, done); |
728 | 0 | } |
729 | | void EchoService_Stub::Echo3(::PROTOBUF_NAMESPACE_ID::RpcController* controller, |
730 | | const ::v1::EchoRequest* request, |
731 | | ::v1::EchoResponse* response, |
732 | 0 | ::google::protobuf::Closure* done) { |
733 | 0 | channel_->CallMethod(descriptor()->method(2), |
734 | 0 | controller, request, response, done); |
735 | 0 | } |
736 | | void EchoService_Stub::Echo4(::PROTOBUF_NAMESPACE_ID::RpcController* controller, |
737 | | const ::v1::EchoRequest* request, |
738 | | ::v1::EchoResponse* response, |
739 | 0 | ::google::protobuf::Closure* done) { |
740 | 0 | channel_->CallMethod(descriptor()->method(3), |
741 | 0 | controller, request, response, done); |
742 | 0 | } |
743 | | void EchoService_Stub::Echo5(::PROTOBUF_NAMESPACE_ID::RpcController* controller, |
744 | | const ::v1::EchoRequest* request, |
745 | | ::v1::EchoResponse* response, |
746 | 0 | ::google::protobuf::Closure* done) { |
747 | 0 | channel_->CallMethod(descriptor()->method(4), |
748 | 0 | controller, request, response, done); |
749 | 0 | } |
750 | | |
751 | | // @@protoc_insertion_point(namespace_scope) |
752 | | } // namespace v1 |
753 | | PROTOBUF_NAMESPACE_OPEN |
754 | | template<> PROTOBUF_NOINLINE ::v1::EchoRequest* |
755 | 0 | Arena::CreateMaybeMessage< ::v1::EchoRequest >(Arena* arena) { |
756 | 0 | return Arena::CreateMessageInternal< ::v1::EchoRequest >(arena); |
757 | 0 | } |
758 | | template<> PROTOBUF_NOINLINE ::v1::EchoResponse* |
759 | 0 | Arena::CreateMaybeMessage< ::v1::EchoResponse >(Arena* arena) { |
760 | 0 | return Arena::CreateMessageInternal< ::v1::EchoResponse >(arena); |
761 | 0 | } |
762 | | PROTOBUF_NAMESPACE_CLOSE |
763 | | |
764 | | // @@protoc_insertion_point(global_scope) |
765 | | #include <google/protobuf/port_undef.inc> |