/src/brpc/build/brpc/nshead_meta.pb.cc
Line | Count | Source |
1 | | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | | // source: brpc/nshead_meta.proto |
3 | | |
4 | | #include "brpc/nshead_meta.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 brpc { |
23 | | class NsheadMetaDefaultTypeInternal { |
24 | | public: |
25 | | ::google::protobuf::internal::ExplicitlyConstructed<NsheadMeta> |
26 | | _instance; |
27 | | } _NsheadMeta_default_instance_; |
28 | | } // namespace brpc |
29 | | namespace protobuf_brpc_2fnshead_5fmeta_2eproto { |
30 | 12 | static void InitDefaultsNsheadMeta() { |
31 | 12 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
32 | | |
33 | 12 | { |
34 | 12 | void* ptr = &::brpc::_NsheadMeta_default_instance_; |
35 | 12 | new (ptr) ::brpc::NsheadMeta(); |
36 | 12 | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
37 | 12 | } |
38 | 12 | ::brpc::NsheadMeta::InitAsDefaultInstance(); |
39 | 12 | } |
40 | | |
41 | | ::google::protobuf::internal::SCCInfo<0> scc_info_NsheadMeta = |
42 | | {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsNsheadMeta}, {}}; |
43 | | |
44 | 12 | void InitDefaults() { |
45 | 12 | ::google::protobuf::internal::InitSCC(&scc_info_NsheadMeta.base); |
46 | 12 | } |
47 | | |
48 | | ::google::protobuf::Metadata file_level_metadata[1]; |
49 | | |
50 | | const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { |
51 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::NsheadMeta, _has_bits_), |
52 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::NsheadMeta, _internal_metadata_), |
53 | | ~0u, // no _extensions_ |
54 | | ~0u, // no _oneof_case_ |
55 | | ~0u, // no _weak_field_map_ |
56 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::NsheadMeta, full_method_name_), |
57 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::NsheadMeta, correlation_id_), |
58 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::NsheadMeta, log_id_), |
59 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::NsheadMeta, attachment_size_), |
60 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::NsheadMeta, compress_type_), |
61 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::NsheadMeta, trace_id_), |
62 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::NsheadMeta, span_id_), |
63 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::NsheadMeta, parent_span_id_), |
64 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::NsheadMeta, user_string_), |
65 | | 0, |
66 | | 2, |
67 | | 3, |
68 | | 4, |
69 | | 5, |
70 | | 6, |
71 | | 7, |
72 | | 8, |
73 | | 1, |
74 | | }; |
75 | | static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { |
76 | | { 0, 14, sizeof(::brpc::NsheadMeta)}, |
77 | | }; |
78 | | |
79 | | static ::google::protobuf::Message const * const file_default_instances[] = { |
80 | | reinterpret_cast<const ::google::protobuf::Message*>(&::brpc::_NsheadMeta_default_instance_), |
81 | | }; |
82 | | |
83 | 0 | void protobuf_AssignDescriptors() { |
84 | 0 | AddDescriptors(); |
85 | 0 | AssignDescriptors( |
86 | 0 | "brpc/nshead_meta.proto", schemas, file_default_instances, TableStruct::offsets, |
87 | 0 | file_level_metadata, NULL, NULL); |
88 | 0 | } |
89 | | |
90 | 0 | void protobuf_AssignDescriptorsOnce() { |
91 | 0 | static ::google::protobuf::internal::once_flag once; |
92 | 0 | ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors); |
93 | 0 | } |
94 | | |
95 | | void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD; |
96 | 0 | void protobuf_RegisterTypes(const ::std::string&) { |
97 | 0 | protobuf_AssignDescriptorsOnce(); |
98 | 0 | ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); |
99 | 0 | } |
100 | | |
101 | 12 | void AddDescriptorsImpl() { |
102 | 12 | InitDefaults(); |
103 | 12 | static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { |
104 | 12 | "\n\026brpc/nshead_meta.proto\022\004brpc\032\022brpc/opt" |
105 | 12 | "ions.proto\"\342\001\n\nNsheadMeta\022\030\n\020full_method" |
106 | 12 | "_name\030\001 \002(\t\022\026\n\016correlation_id\030\002 \001(\003\022\016\n\006l" |
107 | 12 | "og_id\030\003 \001(\003\022\027\n\017attachment_size\030\004 \001(\005\022)\n\r" |
108 | 12 | "compress_type\030\005 \001(\0162\022.brpc.CompressType\022" |
109 | 12 | "\020\n\010trace_id\030\006 \001(\003\022\017\n\007span_id\030\007 \001(\003\022\026\n\016pa" |
110 | 12 | "rent_span_id\030\010 \001(\003\022\023\n\013user_string\030\t \001(\014B" |
111 | 12 | "\027\n\010com.brpcB\013NsheadProto" |
112 | 12 | }; |
113 | 12 | ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( |
114 | 12 | descriptor, 304); |
115 | 12 | ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( |
116 | 12 | "brpc/nshead_meta.proto", &protobuf_RegisterTypes); |
117 | 12 | ::protobuf_brpc_2foptions_2eproto::AddDescriptors(); |
118 | 12 | } |
119 | | |
120 | 12 | void AddDescriptors() { |
121 | 12 | static ::google::protobuf::internal::once_flag once; |
122 | 12 | ::google::protobuf::internal::call_once(once, AddDescriptorsImpl); |
123 | 12 | } |
124 | | // Force AddDescriptors() to be called at dynamic initialization time. |
125 | | struct StaticDescriptorInitializer { |
126 | 12 | StaticDescriptorInitializer() { |
127 | 12 | AddDescriptors(); |
128 | 12 | } |
129 | | } static_descriptor_initializer; |
130 | | } // namespace protobuf_brpc_2fnshead_5fmeta_2eproto |
131 | | namespace brpc { |
132 | | |
133 | | // =================================================================== |
134 | | |
135 | 12 | void NsheadMeta::InitAsDefaultInstance() { |
136 | 12 | } |
137 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
138 | | const int NsheadMeta::kFullMethodNameFieldNumber; |
139 | | const int NsheadMeta::kCorrelationIdFieldNumber; |
140 | | const int NsheadMeta::kLogIdFieldNumber; |
141 | | const int NsheadMeta::kAttachmentSizeFieldNumber; |
142 | | const int NsheadMeta::kCompressTypeFieldNumber; |
143 | | const int NsheadMeta::kTraceIdFieldNumber; |
144 | | const int NsheadMeta::kSpanIdFieldNumber; |
145 | | const int NsheadMeta::kParentSpanIdFieldNumber; |
146 | | const int NsheadMeta::kUserStringFieldNumber; |
147 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
148 | | |
149 | | NsheadMeta::NsheadMeta() |
150 | 12 | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
151 | 12 | ::google::protobuf::internal::InitSCC( |
152 | 12 | &protobuf_brpc_2fnshead_5fmeta_2eproto::scc_info_NsheadMeta.base); |
153 | 12 | SharedCtor(); |
154 | | // @@protoc_insertion_point(constructor:brpc.NsheadMeta) |
155 | 12 | } |
156 | | NsheadMeta::NsheadMeta(const NsheadMeta& from) |
157 | 0 | : ::google::protobuf::Message(), |
158 | 0 | _internal_metadata_(NULL), |
159 | 0 | _has_bits_(from._has_bits_) { |
160 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
161 | 0 | full_method_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
162 | 0 | if (from.has_full_method_name()) { |
163 | 0 | full_method_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.full_method_name_); |
164 | 0 | } |
165 | 0 | user_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
166 | 0 | if (from.has_user_string()) { |
167 | 0 | user_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.user_string_); |
168 | 0 | } |
169 | 0 | ::memcpy(&correlation_id_, &from.correlation_id_, |
170 | 0 | static_cast<size_t>(reinterpret_cast<char*>(&parent_span_id_) - |
171 | 0 | reinterpret_cast<char*>(&correlation_id_)) + sizeof(parent_span_id_)); |
172 | | // @@protoc_insertion_point(copy_constructor:brpc.NsheadMeta) |
173 | 0 | } |
174 | | |
175 | 12 | void NsheadMeta::SharedCtor() { |
176 | 12 | full_method_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
177 | 12 | user_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
178 | 12 | ::memset(&correlation_id_, 0, static_cast<size_t>( |
179 | 12 | reinterpret_cast<char*>(&parent_span_id_) - |
180 | 12 | reinterpret_cast<char*>(&correlation_id_)) + sizeof(parent_span_id_)); |
181 | 12 | } |
182 | | |
183 | 0 | NsheadMeta::~NsheadMeta() { |
184 | | // @@protoc_insertion_point(destructor:brpc.NsheadMeta) |
185 | 0 | SharedDtor(); |
186 | 0 | } |
187 | | |
188 | 0 | void NsheadMeta::SharedDtor() { |
189 | 0 | full_method_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
190 | 0 | user_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
191 | 0 | } |
192 | | |
193 | 0 | void NsheadMeta::SetCachedSize(int size) const { |
194 | 0 | _cached_size_.Set(size); |
195 | 0 | } |
196 | 0 | const ::google::protobuf::Descriptor* NsheadMeta::descriptor() { |
197 | 0 | ::protobuf_brpc_2fnshead_5fmeta_2eproto::protobuf_AssignDescriptorsOnce(); |
198 | 0 | return ::protobuf_brpc_2fnshead_5fmeta_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
199 | 0 | } |
200 | | |
201 | 0 | const NsheadMeta& NsheadMeta::default_instance() { |
202 | 0 | ::google::protobuf::internal::InitSCC(&protobuf_brpc_2fnshead_5fmeta_2eproto::scc_info_NsheadMeta.base); |
203 | 0 | return *internal_default_instance(); |
204 | 0 | } |
205 | | |
206 | | |
207 | 0 | void NsheadMeta::Clear() { |
208 | | // @@protoc_insertion_point(message_clear_start:brpc.NsheadMeta) |
209 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
210 | | // Prevent compiler warnings about cached_has_bits being unused |
211 | 0 | (void) cached_has_bits; |
212 | |
|
213 | 0 | cached_has_bits = _has_bits_[0]; |
214 | 0 | if (cached_has_bits & 3u) { |
215 | 0 | if (cached_has_bits & 0x00000001u) { |
216 | 0 | full_method_name_.ClearNonDefaultToEmptyNoArena(); |
217 | 0 | } |
218 | 0 | if (cached_has_bits & 0x00000002u) { |
219 | 0 | user_string_.ClearNonDefaultToEmptyNoArena(); |
220 | 0 | } |
221 | 0 | } |
222 | 0 | if (cached_has_bits & 252u) { |
223 | 0 | ::memset(&correlation_id_, 0, static_cast<size_t>( |
224 | 0 | reinterpret_cast<char*>(&span_id_) - |
225 | 0 | reinterpret_cast<char*>(&correlation_id_)) + sizeof(span_id_)); |
226 | 0 | } |
227 | 0 | parent_span_id_ = GOOGLE_LONGLONG(0); |
228 | 0 | _has_bits_.Clear(); |
229 | 0 | _internal_metadata_.Clear(); |
230 | 0 | } |
231 | | |
232 | | bool NsheadMeta::MergePartialFromCodedStream( |
233 | 0 | ::google::protobuf::io::CodedInputStream* input) { |
234 | 0 | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
235 | 0 | ::google::protobuf::uint32 tag; |
236 | | // @@protoc_insertion_point(parse_start:brpc.NsheadMeta) |
237 | 0 | for (;;) { |
238 | 0 | ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
239 | 0 | tag = p.first; |
240 | 0 | if (!p.second) goto handle_unusual; |
241 | 0 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
242 | | // required string full_method_name = 1; |
243 | 0 | case 1: { |
244 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
245 | 0 | static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { |
246 | 0 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
247 | 0 | input, this->mutable_full_method_name())); |
248 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
249 | 0 | this->full_method_name().data(), static_cast<int>(this->full_method_name().length()), |
250 | 0 | ::google::protobuf::internal::WireFormat::PARSE, |
251 | 0 | "brpc.NsheadMeta.full_method_name"); |
252 | 0 | } else { |
253 | 0 | goto handle_unusual; |
254 | 0 | } |
255 | 0 | break; |
256 | 0 | } |
257 | | |
258 | | // optional int64 correlation_id = 2; |
259 | 0 | case 2: { |
260 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
261 | 0 | static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { |
262 | 0 | set_has_correlation_id(); |
263 | 0 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
264 | 0 | ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( |
265 | 0 | input, &correlation_id_))); |
266 | 0 | } else { |
267 | 0 | goto handle_unusual; |
268 | 0 | } |
269 | 0 | break; |
270 | 0 | } |
271 | | |
272 | | // optional int64 log_id = 3; |
273 | 0 | case 3: { |
274 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
275 | 0 | static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { |
276 | 0 | set_has_log_id(); |
277 | 0 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
278 | 0 | ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( |
279 | 0 | input, &log_id_))); |
280 | 0 | } else { |
281 | 0 | goto handle_unusual; |
282 | 0 | } |
283 | 0 | break; |
284 | 0 | } |
285 | | |
286 | | // optional int32 attachment_size = 4; |
287 | 0 | case 4: { |
288 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
289 | 0 | static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { |
290 | 0 | set_has_attachment_size(); |
291 | 0 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
292 | 0 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
293 | 0 | input, &attachment_size_))); |
294 | 0 | } else { |
295 | 0 | goto handle_unusual; |
296 | 0 | } |
297 | 0 | break; |
298 | 0 | } |
299 | | |
300 | | // optional .brpc.CompressType compress_type = 5; |
301 | 0 | case 5: { |
302 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
303 | 0 | static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) { |
304 | 0 | int value; |
305 | 0 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
306 | 0 | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
307 | 0 | input, &value))); |
308 | 0 | if (::brpc::CompressType_IsValid(value)) { |
309 | 0 | set_compress_type(static_cast< ::brpc::CompressType >(value)); |
310 | 0 | } else { |
311 | 0 | mutable_unknown_fields()->AddVarint( |
312 | 0 | 5, static_cast< ::google::protobuf::uint64>(value)); |
313 | 0 | } |
314 | 0 | } else { |
315 | 0 | goto handle_unusual; |
316 | 0 | } |
317 | 0 | break; |
318 | 0 | } |
319 | | |
320 | | // optional int64 trace_id = 6; |
321 | 0 | case 6: { |
322 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
323 | 0 | static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) { |
324 | 0 | set_has_trace_id(); |
325 | 0 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
326 | 0 | ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( |
327 | 0 | input, &trace_id_))); |
328 | 0 | } else { |
329 | 0 | goto handle_unusual; |
330 | 0 | } |
331 | 0 | break; |
332 | 0 | } |
333 | | |
334 | | // optional int64 span_id = 7; |
335 | 0 | case 7: { |
336 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
337 | 0 | static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) { |
338 | 0 | set_has_span_id(); |
339 | 0 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
340 | 0 | ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( |
341 | 0 | input, &span_id_))); |
342 | 0 | } else { |
343 | 0 | goto handle_unusual; |
344 | 0 | } |
345 | 0 | break; |
346 | 0 | } |
347 | | |
348 | | // optional int64 parent_span_id = 8; |
349 | 0 | case 8: { |
350 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
351 | 0 | static_cast< ::google::protobuf::uint8>(64u /* 64 & 0xFF */)) { |
352 | 0 | set_has_parent_span_id(); |
353 | 0 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
354 | 0 | ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( |
355 | 0 | input, &parent_span_id_))); |
356 | 0 | } else { |
357 | 0 | goto handle_unusual; |
358 | 0 | } |
359 | 0 | break; |
360 | 0 | } |
361 | | |
362 | | // optional bytes user_string = 9; |
363 | 0 | case 9: { |
364 | 0 | if (static_cast< ::google::protobuf::uint8>(tag) == |
365 | 0 | static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) { |
366 | 0 | DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( |
367 | 0 | input, this->mutable_user_string())); |
368 | 0 | } else { |
369 | 0 | goto handle_unusual; |
370 | 0 | } |
371 | 0 | break; |
372 | 0 | } |
373 | | |
374 | 0 | default: { |
375 | 0 | handle_unusual: |
376 | 0 | if (tag == 0) { |
377 | 0 | goto success; |
378 | 0 | } |
379 | 0 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
380 | 0 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
381 | 0 | break; |
382 | 0 | } |
383 | 0 | } |
384 | 0 | } |
385 | 0 | success: |
386 | | // @@protoc_insertion_point(parse_success:brpc.NsheadMeta) |
387 | 0 | return true; |
388 | 0 | failure: |
389 | | // @@protoc_insertion_point(parse_failure:brpc.NsheadMeta) |
390 | 0 | return false; |
391 | 0 | #undef DO_ |
392 | 0 | } |
393 | | |
394 | | void NsheadMeta::SerializeWithCachedSizes( |
395 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
396 | | // @@protoc_insertion_point(serialize_start:brpc.NsheadMeta) |
397 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
398 | 0 | (void) cached_has_bits; |
399 | |
|
400 | 0 | cached_has_bits = _has_bits_[0]; |
401 | | // required string full_method_name = 1; |
402 | 0 | if (cached_has_bits & 0x00000001u) { |
403 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
404 | 0 | this->full_method_name().data(), static_cast<int>(this->full_method_name().length()), |
405 | 0 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
406 | 0 | "brpc.NsheadMeta.full_method_name"); |
407 | 0 | ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
408 | 0 | 1, this->full_method_name(), output); |
409 | 0 | } |
410 | | |
411 | | // optional int64 correlation_id = 2; |
412 | 0 | if (cached_has_bits & 0x00000004u) { |
413 | 0 | ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->correlation_id(), output); |
414 | 0 | } |
415 | | |
416 | | // optional int64 log_id = 3; |
417 | 0 | if (cached_has_bits & 0x00000008u) { |
418 | 0 | ::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->log_id(), output); |
419 | 0 | } |
420 | | |
421 | | // optional int32 attachment_size = 4; |
422 | 0 | if (cached_has_bits & 0x00000010u) { |
423 | 0 | ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->attachment_size(), output); |
424 | 0 | } |
425 | | |
426 | | // optional .brpc.CompressType compress_type = 5; |
427 | 0 | if (cached_has_bits & 0x00000020u) { |
428 | 0 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
429 | 0 | 5, this->compress_type(), output); |
430 | 0 | } |
431 | | |
432 | | // optional int64 trace_id = 6; |
433 | 0 | if (cached_has_bits & 0x00000040u) { |
434 | 0 | ::google::protobuf::internal::WireFormatLite::WriteInt64(6, this->trace_id(), output); |
435 | 0 | } |
436 | | |
437 | | // optional int64 span_id = 7; |
438 | 0 | if (cached_has_bits & 0x00000080u) { |
439 | 0 | ::google::protobuf::internal::WireFormatLite::WriteInt64(7, this->span_id(), output); |
440 | 0 | } |
441 | | |
442 | | // optional int64 parent_span_id = 8; |
443 | 0 | if (cached_has_bits & 0x00000100u) { |
444 | 0 | ::google::protobuf::internal::WireFormatLite::WriteInt64(8, this->parent_span_id(), output); |
445 | 0 | } |
446 | | |
447 | | // optional bytes user_string = 9; |
448 | 0 | if (cached_has_bits & 0x00000002u) { |
449 | 0 | ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( |
450 | 0 | 9, this->user_string(), output); |
451 | 0 | } |
452 | |
|
453 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
454 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
455 | 0 | _internal_metadata_.unknown_fields(), output); |
456 | 0 | } |
457 | | // @@protoc_insertion_point(serialize_end:brpc.NsheadMeta) |
458 | 0 | } |
459 | | |
460 | | ::google::protobuf::uint8* NsheadMeta::InternalSerializeWithCachedSizesToArray( |
461 | 0 | bool deterministic, ::google::protobuf::uint8* target) const { |
462 | 0 | (void)deterministic; // Unused |
463 | | // @@protoc_insertion_point(serialize_to_array_start:brpc.NsheadMeta) |
464 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
465 | 0 | (void) cached_has_bits; |
466 | |
|
467 | 0 | cached_has_bits = _has_bits_[0]; |
468 | | // required string full_method_name = 1; |
469 | 0 | if (cached_has_bits & 0x00000001u) { |
470 | 0 | ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( |
471 | 0 | this->full_method_name().data(), static_cast<int>(this->full_method_name().length()), |
472 | 0 | ::google::protobuf::internal::WireFormat::SERIALIZE, |
473 | 0 | "brpc.NsheadMeta.full_method_name"); |
474 | 0 | target = |
475 | 0 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
476 | 0 | 1, this->full_method_name(), target); |
477 | 0 | } |
478 | | |
479 | | // optional int64 correlation_id = 2; |
480 | 0 | if (cached_has_bits & 0x00000004u) { |
481 | 0 | target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->correlation_id(), target); |
482 | 0 | } |
483 | | |
484 | | // optional int64 log_id = 3; |
485 | 0 | if (cached_has_bits & 0x00000008u) { |
486 | 0 | target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(3, this->log_id(), target); |
487 | 0 | } |
488 | | |
489 | | // optional int32 attachment_size = 4; |
490 | 0 | if (cached_has_bits & 0x00000010u) { |
491 | 0 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->attachment_size(), target); |
492 | 0 | } |
493 | | |
494 | | // optional .brpc.CompressType compress_type = 5; |
495 | 0 | if (cached_has_bits & 0x00000020u) { |
496 | 0 | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
497 | 0 | 5, this->compress_type(), target); |
498 | 0 | } |
499 | | |
500 | | // optional int64 trace_id = 6; |
501 | 0 | if (cached_has_bits & 0x00000040u) { |
502 | 0 | target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(6, this->trace_id(), target); |
503 | 0 | } |
504 | | |
505 | | // optional int64 span_id = 7; |
506 | 0 | if (cached_has_bits & 0x00000080u) { |
507 | 0 | target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(7, this->span_id(), target); |
508 | 0 | } |
509 | | |
510 | | // optional int64 parent_span_id = 8; |
511 | 0 | if (cached_has_bits & 0x00000100u) { |
512 | 0 | target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(8, this->parent_span_id(), target); |
513 | 0 | } |
514 | | |
515 | | // optional bytes user_string = 9; |
516 | 0 | if (cached_has_bits & 0x00000002u) { |
517 | 0 | target = |
518 | 0 | ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( |
519 | 0 | 9, this->user_string(), target); |
520 | 0 | } |
521 | |
|
522 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
523 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
524 | 0 | _internal_metadata_.unknown_fields(), target); |
525 | 0 | } |
526 | | // @@protoc_insertion_point(serialize_to_array_end:brpc.NsheadMeta) |
527 | 0 | return target; |
528 | 0 | } |
529 | | |
530 | 0 | size_t NsheadMeta::ByteSizeLong() const { |
531 | | // @@protoc_insertion_point(message_byte_size_start:brpc.NsheadMeta) |
532 | 0 | size_t total_size = 0; |
533 | |
|
534 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
535 | 0 | total_size += |
536 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
537 | 0 | _internal_metadata_.unknown_fields()); |
538 | 0 | } |
539 | | // required string full_method_name = 1; |
540 | 0 | if (has_full_method_name()) { |
541 | 0 | total_size += 1 + |
542 | 0 | ::google::protobuf::internal::WireFormatLite::StringSize( |
543 | 0 | this->full_method_name()); |
544 | 0 | } |
545 | 0 | if (_has_bits_[0 / 32] & 254u) { |
546 | | // optional bytes user_string = 9; |
547 | 0 | if (has_user_string()) { |
548 | 0 | total_size += 1 + |
549 | 0 | ::google::protobuf::internal::WireFormatLite::BytesSize( |
550 | 0 | this->user_string()); |
551 | 0 | } |
552 | | |
553 | | // optional int64 correlation_id = 2; |
554 | 0 | if (has_correlation_id()) { |
555 | 0 | total_size += 1 + |
556 | 0 | ::google::protobuf::internal::WireFormatLite::Int64Size( |
557 | 0 | this->correlation_id()); |
558 | 0 | } |
559 | | |
560 | | // optional int64 log_id = 3; |
561 | 0 | if (has_log_id()) { |
562 | 0 | total_size += 1 + |
563 | 0 | ::google::protobuf::internal::WireFormatLite::Int64Size( |
564 | 0 | this->log_id()); |
565 | 0 | } |
566 | | |
567 | | // optional int32 attachment_size = 4; |
568 | 0 | if (has_attachment_size()) { |
569 | 0 | total_size += 1 + |
570 | 0 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
571 | 0 | this->attachment_size()); |
572 | 0 | } |
573 | | |
574 | | // optional .brpc.CompressType compress_type = 5; |
575 | 0 | if (has_compress_type()) { |
576 | 0 | total_size += 1 + |
577 | 0 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->compress_type()); |
578 | 0 | } |
579 | | |
580 | | // optional int64 trace_id = 6; |
581 | 0 | if (has_trace_id()) { |
582 | 0 | total_size += 1 + |
583 | 0 | ::google::protobuf::internal::WireFormatLite::Int64Size( |
584 | 0 | this->trace_id()); |
585 | 0 | } |
586 | | |
587 | | // optional int64 span_id = 7; |
588 | 0 | if (has_span_id()) { |
589 | 0 | total_size += 1 + |
590 | 0 | ::google::protobuf::internal::WireFormatLite::Int64Size( |
591 | 0 | this->span_id()); |
592 | 0 | } |
593 | |
|
594 | 0 | } |
595 | | // optional int64 parent_span_id = 8; |
596 | 0 | if (has_parent_span_id()) { |
597 | 0 | total_size += 1 + |
598 | 0 | ::google::protobuf::internal::WireFormatLite::Int64Size( |
599 | 0 | this->parent_span_id()); |
600 | 0 | } |
601 | |
|
602 | 0 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
603 | 0 | SetCachedSize(cached_size); |
604 | 0 | return total_size; |
605 | 0 | } |
606 | | |
607 | 0 | void NsheadMeta::MergeFrom(const ::google::protobuf::Message& from) { |
608 | | // @@protoc_insertion_point(generalized_merge_from_start:brpc.NsheadMeta) |
609 | 0 | GOOGLE_DCHECK_NE(&from, this); |
610 | 0 | const NsheadMeta* source = |
611 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const NsheadMeta>( |
612 | 0 | &from); |
613 | 0 | if (source == NULL) { |
614 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:brpc.NsheadMeta) |
615 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
616 | 0 | } else { |
617 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:brpc.NsheadMeta) |
618 | 0 | MergeFrom(*source); |
619 | 0 | } |
620 | 0 | } |
621 | | |
622 | 0 | void NsheadMeta::MergeFrom(const NsheadMeta& from) { |
623 | | // @@protoc_insertion_point(class_specific_merge_from_start:brpc.NsheadMeta) |
624 | 0 | GOOGLE_DCHECK_NE(&from, this); |
625 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
626 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
627 | 0 | (void) cached_has_bits; |
628 | |
|
629 | 0 | cached_has_bits = from._has_bits_[0]; |
630 | 0 | if (cached_has_bits & 255u) { |
631 | 0 | if (cached_has_bits & 0x00000001u) { |
632 | 0 | set_has_full_method_name(); |
633 | 0 | full_method_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.full_method_name_); |
634 | 0 | } |
635 | 0 | if (cached_has_bits & 0x00000002u) { |
636 | 0 | set_has_user_string(); |
637 | 0 | user_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.user_string_); |
638 | 0 | } |
639 | 0 | if (cached_has_bits & 0x00000004u) { |
640 | 0 | correlation_id_ = from.correlation_id_; |
641 | 0 | } |
642 | 0 | if (cached_has_bits & 0x00000008u) { |
643 | 0 | log_id_ = from.log_id_; |
644 | 0 | } |
645 | 0 | if (cached_has_bits & 0x00000010u) { |
646 | 0 | attachment_size_ = from.attachment_size_; |
647 | 0 | } |
648 | 0 | if (cached_has_bits & 0x00000020u) { |
649 | 0 | compress_type_ = from.compress_type_; |
650 | 0 | } |
651 | 0 | if (cached_has_bits & 0x00000040u) { |
652 | 0 | trace_id_ = from.trace_id_; |
653 | 0 | } |
654 | 0 | if (cached_has_bits & 0x00000080u) { |
655 | 0 | span_id_ = from.span_id_; |
656 | 0 | } |
657 | 0 | _has_bits_[0] |= cached_has_bits; |
658 | 0 | } |
659 | 0 | if (cached_has_bits & 0x00000100u) { |
660 | 0 | set_parent_span_id(from.parent_span_id()); |
661 | 0 | } |
662 | 0 | } |
663 | | |
664 | 0 | void NsheadMeta::CopyFrom(const ::google::protobuf::Message& from) { |
665 | | // @@protoc_insertion_point(generalized_copy_from_start:brpc.NsheadMeta) |
666 | 0 | if (&from == this) return; |
667 | 0 | Clear(); |
668 | 0 | MergeFrom(from); |
669 | 0 | } |
670 | | |
671 | 0 | void NsheadMeta::CopyFrom(const NsheadMeta& from) { |
672 | | // @@protoc_insertion_point(class_specific_copy_from_start:brpc.NsheadMeta) |
673 | 0 | if (&from == this) return; |
674 | 0 | Clear(); |
675 | 0 | MergeFrom(from); |
676 | 0 | } |
677 | | |
678 | 0 | bool NsheadMeta::IsInitialized() const { |
679 | 0 | if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; |
680 | 0 | return true; |
681 | 0 | } |
682 | | |
683 | 0 | void NsheadMeta::Swap(NsheadMeta* other) { |
684 | 0 | if (other == this) return; |
685 | 0 | InternalSwap(other); |
686 | 0 | } |
687 | 0 | void NsheadMeta::InternalSwap(NsheadMeta* other) { |
688 | 0 | using std::swap; |
689 | 0 | full_method_name_.Swap(&other->full_method_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
690 | 0 | GetArenaNoVirtual()); |
691 | 0 | user_string_.Swap(&other->user_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
692 | 0 | GetArenaNoVirtual()); |
693 | 0 | swap(correlation_id_, other->correlation_id_); |
694 | 0 | swap(log_id_, other->log_id_); |
695 | 0 | swap(attachment_size_, other->attachment_size_); |
696 | 0 | swap(compress_type_, other->compress_type_); |
697 | 0 | swap(trace_id_, other->trace_id_); |
698 | 0 | swap(span_id_, other->span_id_); |
699 | 0 | swap(parent_span_id_, other->parent_span_id_); |
700 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
701 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
702 | 0 | } |
703 | | |
704 | 0 | ::google::protobuf::Metadata NsheadMeta::GetMetadata() const { |
705 | 0 | protobuf_brpc_2fnshead_5fmeta_2eproto::protobuf_AssignDescriptorsOnce(); |
706 | 0 | return ::protobuf_brpc_2fnshead_5fmeta_2eproto::file_level_metadata[kIndexInFileMessages]; |
707 | 0 | } |
708 | | |
709 | | |
710 | | // @@protoc_insertion_point(namespace_scope) |
711 | | } // namespace brpc |
712 | | namespace google { |
713 | | namespace protobuf { |
714 | 0 | template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::brpc::NsheadMeta* Arena::CreateMaybeMessage< ::brpc::NsheadMeta >(Arena* arena) { |
715 | 0 | return Arena::CreateInternal< ::brpc::NsheadMeta >(arena); |
716 | 0 | } |
717 | | } // namespace protobuf |
718 | | } // namespace google |
719 | | |
720 | | // @@protoc_insertion_point(global_scope) |