/Users/deen/code/yugabyte-db/build/debugcov-clang-dynamic-arm64-ninja/src/yb/consensus/consensus_types.pb.cc
Line | Count | Source (jump to first uncovered line) |
1 | | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | | // source: yb/consensus/consensus_types.proto |
3 | | |
4 | | #include "yb/consensus/consensus_types.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/stubs/once.h> |
11 | | #include <google/protobuf/io/coded_stream.h> |
12 | | #include <google/protobuf/wire_format_lite_inl.h> |
13 | | #include <google/protobuf/descriptor.h> |
14 | | #include <google/protobuf/generated_message_reflection.h> |
15 | | #include <google/protobuf/reflection_ops.h> |
16 | | #include <google/protobuf/wire_format.h> |
17 | | // This is a temporary google only hack |
18 | | #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
19 | | #include "third_party/protobuf/version.h" |
20 | | #endif |
21 | | #include "yb/util/protobuf-annotations.h" |
22 | | // @@protoc_insertion_point(includes) |
23 | | namespace yb { |
24 | | namespace consensus { |
25 | | class ConsensusErrorPBDefaultTypeInternal { |
26 | | public: |
27 | | ::google::protobuf::internal::ExplicitlyConstructed<ConsensusErrorPB> |
28 | | _instance; |
29 | | } _ConsensusErrorPB_default_instance_; |
30 | | } // namespace consensus |
31 | | } // namespace yb |
32 | | namespace protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto { |
33 | 26.8k | void InitDefaultsConsensusErrorPBImpl() { |
34 | 26.8k | GOOGLE_PROTOBUF_VERIFY_VERSION; |
35 | | |
36 | | #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
37 | | ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); |
38 | | #else |
39 | 26.8k | ::google::protobuf::internal::InitProtobufDefaults(); |
40 | 26.8k | #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
41 | 26.8k | protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::InitDefaultsAppStatusPB(); |
42 | 26.8k | { |
43 | 26.8k | void* ptr = &::yb::consensus::_ConsensusErrorPB_default_instance_; |
44 | 26.8k | new (ptr) ::yb::consensus::ConsensusErrorPB(); |
45 | 26.8k | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
46 | 26.8k | } |
47 | 26.8k | ::yb::consensus::ConsensusErrorPB::InitAsDefaultInstance(); |
48 | 26.8k | } |
49 | | |
50 | 758k | void InitDefaultsConsensusErrorPB() { |
51 | 758k | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
52 | 758k | ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsConsensusErrorPBImpl); |
53 | 758k | } |
54 | | |
55 | | ::google::protobuf::Metadata file_level_metadata[1]; |
56 | | const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[5]; |
57 | | |
58 | | const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { |
59 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::consensus::ConsensusErrorPB, _has_bits_), |
60 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::consensus::ConsensusErrorPB, _internal_metadata_), |
61 | | ~0u, // no _extensions_ |
62 | | ~0u, // no _oneof_case_ |
63 | | ~0u, // no _weak_field_map_ |
64 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::consensus::ConsensusErrorPB, code_), |
65 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::consensus::ConsensusErrorPB, status_), |
66 | | 1, |
67 | | 0, |
68 | | }; |
69 | | static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { |
70 | | { 0, 7, sizeof(::yb::consensus::ConsensusErrorPB)}, |
71 | | }; |
72 | | |
73 | | static ::google::protobuf::Message const * const file_default_instances[] = { |
74 | | reinterpret_cast<const ::google::protobuf::Message*>(&::yb::consensus::_ConsensusErrorPB_default_instance_), |
75 | | }; |
76 | | |
77 | 13.5k | void protobuf_AssignDescriptors() { |
78 | 13.5k | AddDescriptors(); |
79 | 13.5k | ::google::protobuf::MessageFactory* factory = NULL; |
80 | 13.5k | AssignDescriptors( |
81 | 13.5k | "yb/consensus/consensus_types.proto", schemas, file_default_instances, TableStruct::offsets, factory, |
82 | 13.5k | file_level_metadata, file_level_enum_descriptors, NULL); |
83 | 13.5k | } |
84 | | |
85 | 3.36M | void protobuf_AssignDescriptorsOnce() { |
86 | 3.36M | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
87 | 3.36M | ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); |
88 | 3.36M | } |
89 | | |
90 | | void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD; |
91 | 0 | void protobuf_RegisterTypes(const ::std::string&) { |
92 | 0 | protobuf_AssignDescriptorsOnce(); |
93 | 0 | ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); |
94 | 0 | } |
95 | | |
96 | 26.8k | void AddDescriptorsImpl() { |
97 | 26.8k | InitDefaults(); |
98 | 26.8k | static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { |
99 | 26.8k | "\n\"yb/consensus/consensus_types.proto\022\014yb" |
100 | 26.8k | ".consensus\032\035yb/common/wire_protocol.prot" |
101 | 26.8k | "o\"\273\002\n\020ConsensusErrorPB\0221\n\004code\030\001 \002(\0162#.y" |
102 | 26.8k | "b.consensus.ConsensusErrorPB.Code\022\037\n\006sta" |
103 | 26.8k | "tus\030\002 \002(\0132\017.yb.AppStatusPB\"\322\001\n\004Code\022\013\n\007U" |
104 | 26.8k | "NKNOWN\020\000\022\020\n\014INVALID_TERM\020\002\022\025\n\021LAST_OPID_" |
105 | 26.8k | "TOO_OLD\020\003\022\021\n\rALREADY_VOTED\020\004\022\021\n\rNOT_IN_Q" |
106 | 26.8k | "UORUM\020\005\022\037\n\033PRECEDING_ENTRY_DIDNT_MATCH\020\006" |
107 | 26.8k | "\022\023\n\017LEADER_IS_ALIVE\020\007\022\022\n\016CONSENSUS_BUSY\020" |
108 | 26.8k | "\010\022\022\n\016CANNOT_PREPARE\020\t\022\020\n\014TABLET_SPLIT\020\n*" |
109 | 26.8k | "Z\n\020ChangeConfigType\022\022\n\016UNKNOWN_CHANGE\020\000\022" |
110 | 26.8k | "\016\n\nADD_SERVER\020\001\022\021\n\rREMOVE_SERVER\020\002\022\017\n\013CH" |
111 | 26.8k | "ANGE_ROLE\020\003*H\n\010OpIdType\022\025\n\021UNKNOWN_OPID_" |
112 | 26.8k | "TYPE\020\000\022\021\n\rRECEIVED_OPID\020\001\022\022\n\016COMMITTED_O" |
113 | 26.8k | "PID\020\002*c\n\021LeaderLeaseStatus\022\r\n\tHAS_LEASE\020" |
114 | 26.8k | "\000\022\035\n\031OLD_LEADER_MAY_HAVE_LEASE\020\001\022 \n\034NO_M" |
115 | 26.8k | "AJORITY_REPLICATED_LEASE\020\002*\310\001\n\rOperation" |
116 | 26.8k | "Type\022\016\n\nUNKNOWN_OP\020\000\022\t\n\005NO_OP\020\001\022\014\n\010WRITE" |
117 | 26.8k | "_OP\020\003\022\026\n\022CHANGE_METADATA_OP\020\004\022\024\n\020CHANGE_" |
118 | 26.8k | "CONFIG_OP\020\005\022\031\n\025UPDATE_TRANSACTION_OP\020\006\022\017" |
119 | 26.8k | "\n\013SNAPSHOT_OP\020\007\022\017\n\013TRUNCATE_OP\020\010\022\025\n\021HIST" |
120 | 26.8k | "ORY_CUTOFF_OP\020\t\022\014\n\010SPLIT_OP\020\nB\022\n\020org.yb." |
121 | 26.8k | "consensus" |
122 | 26.8k | }; |
123 | 26.8k | ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( |
124 | 26.8k | descriptor, 889); |
125 | 26.8k | ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( |
126 | 26.8k | "yb/consensus/consensus_types.proto", &protobuf_RegisterTypes); |
127 | 26.8k | ::protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::AddDescriptors(); |
128 | 26.8k | } |
129 | | |
130 | 67.3k | void AddDescriptors() { |
131 | 67.3k | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
132 | 67.3k | ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); |
133 | 67.3k | } |
134 | | // Force AddDescriptors() to be called at dynamic initialization time. |
135 | | struct StaticDescriptorInitializer { |
136 | 26.8k | StaticDescriptorInitializer() { |
137 | 26.8k | AddDescriptors(); |
138 | 26.8k | } |
139 | | } static_descriptor_initializer; |
140 | | } // namespace protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto |
141 | | namespace yb { |
142 | | namespace consensus { |
143 | 23 | const ::google::protobuf::EnumDescriptor* ConsensusErrorPB_Code_descriptor() { |
144 | 23 | protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto::protobuf_AssignDescriptorsOnce(); |
145 | 23 | return protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto::file_level_enum_descriptors[0]; |
146 | 23 | } |
147 | 1.01M | bool ConsensusErrorPB_Code_IsValid(int value) { |
148 | 1.01M | switch (value) { |
149 | 0 | case 0: |
150 | 607k | case 2: |
151 | 609k | case 3: |
152 | 612k | case 4: |
153 | 612k | case 5: |
154 | 973k | case 6: |
155 | 998k | case 7: |
156 | 1.01M | case 8: |
157 | 1.01M | case 9: |
158 | 1.01M | case 10: |
159 | 1.01M | return true; |
160 | 0 | default: |
161 | 0 | return false; |
162 | 1.01M | } |
163 | 1.01M | } |
164 | | |
165 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
166 | | const ConsensusErrorPB_Code ConsensusErrorPB::UNKNOWN; |
167 | | const ConsensusErrorPB_Code ConsensusErrorPB::INVALID_TERM; |
168 | | const ConsensusErrorPB_Code ConsensusErrorPB::LAST_OPID_TOO_OLD; |
169 | | const ConsensusErrorPB_Code ConsensusErrorPB::ALREADY_VOTED; |
170 | | const ConsensusErrorPB_Code ConsensusErrorPB::NOT_IN_QUORUM; |
171 | | const ConsensusErrorPB_Code ConsensusErrorPB::PRECEDING_ENTRY_DIDNT_MATCH; |
172 | | const ConsensusErrorPB_Code ConsensusErrorPB::LEADER_IS_ALIVE; |
173 | | const ConsensusErrorPB_Code ConsensusErrorPB::CONSENSUS_BUSY; |
174 | | const ConsensusErrorPB_Code ConsensusErrorPB::CANNOT_PREPARE; |
175 | | const ConsensusErrorPB_Code ConsensusErrorPB::TABLET_SPLIT; |
176 | | const ConsensusErrorPB_Code ConsensusErrorPB::Code_MIN; |
177 | | const ConsensusErrorPB_Code ConsensusErrorPB::Code_MAX; |
178 | | const int ConsensusErrorPB::Code_ARRAYSIZE; |
179 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
180 | 2.91M | const ::google::protobuf::EnumDescriptor* ChangeConfigType_descriptor() { |
181 | 2.91M | protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto::protobuf_AssignDescriptorsOnce(); |
182 | 2.91M | return protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto::file_level_enum_descriptors[1]; |
183 | 2.91M | } |
184 | 2.92M | bool ChangeConfigType_IsValid(int value) { |
185 | 2.92M | switch (value) { |
186 | 0 | case 0: |
187 | 7.70k | case 1: |
188 | 16.0k | case 2: |
189 | 2.92M | case 3: |
190 | 2.92M | return true; |
191 | 0 | default: |
192 | 0 | return false; |
193 | 2.92M | } |
194 | 2.92M | } |
195 | | |
196 | 0 | const ::google::protobuf::EnumDescriptor* OpIdType_descriptor() { |
197 | 0 | protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto::protobuf_AssignDescriptorsOnce(); |
198 | 0 | return protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto::file_level_enum_descriptors[2]; |
199 | 0 | } |
200 | 1.75k | bool OpIdType_IsValid(int value) { |
201 | 1.75k | switch (value) { |
202 | 0 | case 0: |
203 | 1.05k | case 1: |
204 | 1.75k | case 2: |
205 | 1.75k | return true; |
206 | 0 | default: |
207 | 0 | return false; |
208 | 1.75k | } |
209 | 1.75k | } |
210 | | |
211 | 0 | const ::google::protobuf::EnumDescriptor* LeaderLeaseStatus_descriptor() { |
212 | 0 | protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto::protobuf_AssignDescriptorsOnce(); |
213 | 0 | return protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto::file_level_enum_descriptors[3]; |
214 | 0 | } |
215 | 11.6k | bool LeaderLeaseStatus_IsValid(int value) { |
216 | 11.6k | switch (value) { |
217 | 3.76k | case 0: |
218 | 4.24k | case 1: |
219 | 11.6k | case 2: |
220 | 11.6k | return true; |
221 | 0 | default: |
222 | 0 | return false; |
223 | 11.6k | } |
224 | 11.6k | } |
225 | | |
226 | 200k | const ::google::protobuf::EnumDescriptor* OperationType_descriptor() { |
227 | 200k | protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto::protobuf_AssignDescriptorsOnce(); |
228 | 200k | return protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto::file_level_enum_descriptors[4]; |
229 | 200k | } |
230 | 29.0M | bool OperationType_IsValid(int value) { |
231 | 29.0M | switch (value) { |
232 | 0 | case 0: |
233 | 546k | case 1: |
234 | 19.2M | case 3: |
235 | 21.0M | case 4: |
236 | 21.0M | case 5: |
237 | 28.7M | case 6: |
238 | 28.7M | case 7: |
239 | 29.0M | case 8: |
240 | 29.0M | case 9: |
241 | 29.0M | case 10: |
242 | 29.0M | return true; |
243 | 0 | default: |
244 | 0 | return false; |
245 | 29.0M | } |
246 | 29.0M | } |
247 | | |
248 | | |
249 | | // =================================================================== |
250 | | |
251 | 26.8k | void ConsensusErrorPB::InitAsDefaultInstance() { |
252 | 26.8k | ::yb::consensus::_ConsensusErrorPB_default_instance_._instance.get_mutable()->status_ = const_cast< ::yb::AppStatusPB*>( |
253 | 26.8k | ::yb::AppStatusPB::internal_default_instance()); |
254 | 26.8k | } |
255 | 0 | void ConsensusErrorPB::clear_status() { |
256 | 0 | if (status_ != NULL) status_->Clear(); |
257 | 0 | clear_has_status(); |
258 | 0 | } |
259 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
260 | | const int ConsensusErrorPB::kCodeFieldNumber; |
261 | | const int ConsensusErrorPB::kStatusFieldNumber; |
262 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
263 | | |
264 | | ConsensusErrorPB::ConsensusErrorPB() |
265 | 707k | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
266 | 707k | if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { |
267 | 676k | ::protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto::InitDefaultsConsensusErrorPB(); |
268 | 676k | } |
269 | 707k | SharedCtor(); |
270 | | // @@protoc_insertion_point(constructor:yb.consensus.ConsensusErrorPB) |
271 | 707k | } |
272 | | ConsensusErrorPB::ConsensusErrorPB(const ConsensusErrorPB& from) |
273 | | : ::google::protobuf::Message(), |
274 | | _internal_metadata_(NULL), |
275 | | _has_bits_(from._has_bits_), |
276 | 0 | _cached_size_(0) { |
277 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
278 | 0 | if (from.has_status()) { |
279 | 0 | status_ = new ::yb::AppStatusPB(*from.status_); |
280 | 0 | } else { |
281 | 0 | status_ = NULL; |
282 | 0 | } |
283 | 0 | code_ = from.code_; |
284 | | // @@protoc_insertion_point(copy_constructor:yb.consensus.ConsensusErrorPB) |
285 | 0 | } |
286 | | |
287 | 707k | void ConsensusErrorPB::SharedCtor() { |
288 | 707k | _cached_size_ = 0; |
289 | 707k | ::memset(&status_, 0, static_cast<size_t>( |
290 | 707k | reinterpret_cast<char*>(&code_) - |
291 | 707k | reinterpret_cast<char*>(&status_)) + sizeof(code_)); |
292 | 707k | } |
293 | | |
294 | 633k | ConsensusErrorPB::~ConsensusErrorPB() { |
295 | | // @@protoc_insertion_point(destructor:yb.consensus.ConsensusErrorPB) |
296 | 633k | SharedDtor(); |
297 | 633k | } |
298 | | |
299 | 633k | void ConsensusErrorPB::SharedDtor() { |
300 | 633k | if (this != internal_default_instance()) delete status_632k ; |
301 | 633k | } |
302 | | |
303 | 0 | void ConsensusErrorPB::SetCachedSize(int size) const { |
304 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
305 | 0 | _cached_size_ = size; |
306 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
307 | 0 | } |
308 | 0 | const ::google::protobuf::Descriptor* ConsensusErrorPB::descriptor() { |
309 | 0 | ::protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto::protobuf_AssignDescriptorsOnce(); |
310 | 0 | return ::protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
311 | 0 | } |
312 | | |
313 | 0 | const ConsensusErrorPB& ConsensusErrorPB::default_instance() { |
314 | 0 | ::protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto::InitDefaultsConsensusErrorPB(); |
315 | 0 | return *internal_default_instance(); |
316 | 0 | } |
317 | | |
318 | 0 | ConsensusErrorPB* ConsensusErrorPB::New(::google::protobuf::Arena* arena) const { |
319 | 0 | ConsensusErrorPB* n = new ConsensusErrorPB; |
320 | 0 | if (arena != NULL) { |
321 | 0 | arena->Own(n); |
322 | 0 | } |
323 | 0 | return n; |
324 | 0 | } |
325 | | |
326 | 120k | void ConsensusErrorPB::Clear() { |
327 | | // @@protoc_insertion_point(message_clear_start:yb.consensus.ConsensusErrorPB) |
328 | 120k | ::google::protobuf::uint32 cached_has_bits = 0; |
329 | | // Prevent compiler warnings about cached_has_bits being unused |
330 | 120k | (void) cached_has_bits; |
331 | | |
332 | 120k | cached_has_bits = _has_bits_[0]; |
333 | 120k | if (cached_has_bits & 0x00000001u) { |
334 | 120k | GOOGLE_DCHECK(status_ != NULL); |
335 | 120k | status_->Clear(); |
336 | 120k | } |
337 | 120k | code_ = 0; |
338 | 120k | _has_bits_.Clear(); |
339 | 120k | _internal_metadata_.Clear(); |
340 | 120k | } |
341 | | |
342 | | bool ConsensusErrorPB::MergePartialFromCodedStream( |
343 | 338k | ::google::protobuf::io::CodedInputStream* input) { |
344 | 671k | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure0 |
345 | 338k | ::google::protobuf::uint32 tag; |
346 | | // @@protoc_insertion_point(parse_start:yb.consensus.ConsensusErrorPB) |
347 | 1.01M | for (;;) { |
348 | 1.01M | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
349 | 1.01M | tag = p.first; |
350 | 1.01M | if (!p.second) goto handle_unusual336k ; |
351 | 674k | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
352 | | // required .yb.consensus.ConsensusErrorPB.Code code = 1; |
353 | 334k | case 1: { |
354 | 334k | if (static_cast< ::google::protobuf::uint8>(tag) == |
355 | 334k | static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { |
356 | 334k | int value; |
357 | 334k | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
358 | 334k | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
359 | 334k | input, &value))); |
360 | 335k | if (334k ::yb::consensus::ConsensusErrorPB_Code_IsValid(value)334k ) { |
361 | 335k | set_code(static_cast< ::yb::consensus::ConsensusErrorPB_Code >(value)); |
362 | 18.4E | } else { |
363 | 18.4E | mutable_unknown_fields()->AddVarint( |
364 | 18.4E | 1, static_cast< ::google::protobuf::uint64>(value)); |
365 | 18.4E | } |
366 | 18.4E | } else { |
367 | 18.4E | goto handle_unusual; |
368 | 18.4E | } |
369 | 334k | break; |
370 | 334k | } |
371 | | |
372 | | // required .yb.AppStatusPB status = 2; |
373 | 336k | case 2: { |
374 | 336k | if (static_cast< ::google::protobuf::uint8>(tag) == |
375 | 336k | static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { |
376 | 336k | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
377 | 336k | input, mutable_status())); |
378 | 18.4E | } else { |
379 | 18.4E | goto handle_unusual; |
380 | 18.4E | } |
381 | 336k | break; |
382 | 336k | } |
383 | | |
384 | 336k | default: { |
385 | 337k | handle_unusual: |
386 | 337k | if (tag == 0337k ) { |
387 | 337k | goto success; |
388 | 337k | } |
389 | 18.4E | DO_(::google::protobuf::internal::WireFormat::SkipField( |
390 | 18.4E | input, tag, _internal_metadata_.mutable_unknown_fields())); |
391 | 18.4E | break; |
392 | 18.4E | } |
393 | 674k | } |
394 | 674k | } |
395 | 337k | success: |
396 | | // @@protoc_insertion_point(parse_success:yb.consensus.ConsensusErrorPB) |
397 | 337k | return true; |
398 | 0 | failure: |
399 | | // @@protoc_insertion_point(parse_failure:yb.consensus.ConsensusErrorPB) |
400 | 0 | return false; |
401 | 338k | #undef DO_ |
402 | 338k | } |
403 | | |
404 | | void ConsensusErrorPB::SerializeWithCachedSizes( |
405 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
406 | | // @@protoc_insertion_point(serialize_start:yb.consensus.ConsensusErrorPB) |
407 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
408 | 0 | (void) cached_has_bits; |
409 | |
|
410 | 0 | cached_has_bits = _has_bits_[0]; |
411 | | // required .yb.consensus.ConsensusErrorPB.Code code = 1; |
412 | 0 | if (cached_has_bits & 0x00000002u) { |
413 | 0 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
414 | 0 | 1, this->code(), output); |
415 | 0 | } |
416 | | |
417 | | // required .yb.AppStatusPB status = 2; |
418 | 0 | if (cached_has_bits & 0x00000001u) { |
419 | 0 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
420 | 0 | 2, *this->status_, output); |
421 | 0 | } |
422 | |
|
423 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
424 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
425 | 0 | _internal_metadata_.unknown_fields(), output); |
426 | 0 | } |
427 | | // @@protoc_insertion_point(serialize_end:yb.consensus.ConsensusErrorPB) |
428 | 0 | } |
429 | | |
430 | | ::google::protobuf::uint8* ConsensusErrorPB::InternalSerializeWithCachedSizesToArray( |
431 | 343k | bool deterministic, ::google::protobuf::uint8* target) const { |
432 | 343k | (void)deterministic; // Unused |
433 | | // @@protoc_insertion_point(serialize_to_array_start:yb.consensus.ConsensusErrorPB) |
434 | 343k | ::google::protobuf::uint32 cached_has_bits = 0; |
435 | 343k | (void) cached_has_bits; |
436 | | |
437 | 343k | cached_has_bits = _has_bits_[0]; |
438 | | // required .yb.consensus.ConsensusErrorPB.Code code = 1; |
439 | 343k | if (cached_has_bits & 0x00000002u343k ) { |
440 | 343k | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
441 | 343k | 1, this->code(), target); |
442 | 343k | } |
443 | | |
444 | | // required .yb.AppStatusPB status = 2; |
445 | 343k | if (cached_has_bits & 0x00000001u) { |
446 | 343k | target = ::google::protobuf::internal::WireFormatLite:: |
447 | 343k | InternalWriteMessageToArray( |
448 | 343k | 2, *this->status_, deterministic, target); |
449 | 343k | } |
450 | | |
451 | 343k | if (_internal_metadata_.have_unknown_fields()) { |
452 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
453 | 0 | _internal_metadata_.unknown_fields(), target); |
454 | 0 | } |
455 | | // @@protoc_insertion_point(serialize_to_array_end:yb.consensus.ConsensusErrorPB) |
456 | 343k | return target; |
457 | 343k | } |
458 | | |
459 | 0 | size_t ConsensusErrorPB::RequiredFieldsByteSizeFallback() const { |
460 | | // @@protoc_insertion_point(required_fields_byte_size_fallback_start:yb.consensus.ConsensusErrorPB) |
461 | 0 | size_t total_size = 0; |
462 | |
|
463 | 0 | if (has_status()) { |
464 | | // required .yb.AppStatusPB status = 2; |
465 | 0 | total_size += 1 + |
466 | 0 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
467 | 0 | *this->status_); |
468 | 0 | } |
469 | |
|
470 | 0 | if (has_code()) { |
471 | | // required .yb.consensus.ConsensusErrorPB.Code code = 1; |
472 | 0 | total_size += 1 + |
473 | 0 | ::google::protobuf::internal::WireFormatLite::EnumSize(this->code()); |
474 | 0 | } |
475 | |
|
476 | 0 | return total_size; |
477 | 0 | } |
478 | 687k | size_t ConsensusErrorPB::ByteSizeLong() const { |
479 | | // @@protoc_insertion_point(message_byte_size_start:yb.consensus.ConsensusErrorPB) |
480 | 687k | size_t total_size = 0; |
481 | | |
482 | 687k | if (_internal_metadata_.have_unknown_fields()) { |
483 | 0 | total_size += |
484 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
485 | 0 | _internal_metadata_.unknown_fields()); |
486 | 0 | } |
487 | 687k | if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0687k ) { // All required fields are present. |
488 | | // required .yb.AppStatusPB status = 2; |
489 | 687k | total_size += 1 + |
490 | 687k | ::google::protobuf::internal::WireFormatLite::MessageSize( |
491 | 687k | *this->status_); |
492 | | |
493 | | // required .yb.consensus.ConsensusErrorPB.Code code = 1; |
494 | 687k | total_size += 1 + |
495 | 687k | ::google::protobuf::internal::WireFormatLite::EnumSize(this->code()); |
496 | | |
497 | 18.4E | } else { |
498 | 18.4E | total_size += RequiredFieldsByteSizeFallback(); |
499 | 18.4E | } |
500 | 687k | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
501 | 687k | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
502 | 687k | _cached_size_ = cached_size; |
503 | 687k | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
504 | 687k | return total_size; |
505 | 687k | } |
506 | | |
507 | 0 | void ConsensusErrorPB::MergeFrom(const ::google::protobuf::Message& from) { |
508 | | // @@protoc_insertion_point(generalized_merge_from_start:yb.consensus.ConsensusErrorPB) |
509 | 0 | GOOGLE_DCHECK_NE(&from, this); |
510 | 0 | const ConsensusErrorPB* source = |
511 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const ConsensusErrorPB>( |
512 | 0 | &from); |
513 | 0 | if (source == NULL) { |
514 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:yb.consensus.ConsensusErrorPB) |
515 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
516 | 0 | } else { |
517 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:yb.consensus.ConsensusErrorPB) |
518 | 0 | MergeFrom(*source); |
519 | 0 | } |
520 | 0 | } |
521 | | |
522 | 170 | void ConsensusErrorPB::MergeFrom(const ConsensusErrorPB& from) { |
523 | | // @@protoc_insertion_point(class_specific_merge_from_start:yb.consensus.ConsensusErrorPB) |
524 | 170 | GOOGLE_DCHECK_NE(&from, this); |
525 | 170 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
526 | 170 | ::google::protobuf::uint32 cached_has_bits = 0; |
527 | 170 | (void) cached_has_bits; |
528 | | |
529 | 170 | cached_has_bits = from._has_bits_[0]; |
530 | 170 | if (cached_has_bits & 3u) { |
531 | 170 | if (cached_has_bits & 0x00000001u) { |
532 | 170 | mutable_status()->::yb::AppStatusPB::MergeFrom(from.status()); |
533 | 170 | } |
534 | 170 | if (cached_has_bits & 0x00000002u) { |
535 | 170 | code_ = from.code_; |
536 | 170 | } |
537 | 170 | _has_bits_[0] |= cached_has_bits; |
538 | 170 | } |
539 | 170 | } |
540 | | |
541 | 0 | void ConsensusErrorPB::CopyFrom(const ::google::protobuf::Message& from) { |
542 | | // @@protoc_insertion_point(generalized_copy_from_start:yb.consensus.ConsensusErrorPB) |
543 | 0 | if (&from == this) return; |
544 | 0 | Clear(); |
545 | 0 | MergeFrom(from); |
546 | 0 | } |
547 | | |
548 | 0 | void ConsensusErrorPB::CopyFrom(const ConsensusErrorPB& from) { |
549 | | // @@protoc_insertion_point(class_specific_copy_from_start:yb.consensus.ConsensusErrorPB) |
550 | 0 | if (&from == this) return; |
551 | 0 | Clear(); |
552 | 0 | MergeFrom(from); |
553 | 0 | } |
554 | | |
555 | 922k | bool ConsensusErrorPB::IsInitialized() const { |
556 | 922k | if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false0 ; |
557 | 922k | if (has_status()) { |
558 | 921k | if (!this->status_->IsInitialized()) return false0 ; |
559 | 921k | } |
560 | 922k | return true; |
561 | 922k | } |
562 | | |
563 | 0 | void ConsensusErrorPB::Swap(ConsensusErrorPB* other) { |
564 | 0 | if (other == this) return; |
565 | 0 | InternalSwap(other); |
566 | 0 | } |
567 | 0 | void ConsensusErrorPB::InternalSwap(ConsensusErrorPB* other) { |
568 | 0 | using std::swap; |
569 | 0 | swap(status_, other->status_); |
570 | 0 | swap(code_, other->code_); |
571 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
572 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
573 | 0 | swap(_cached_size_, other->_cached_size_); |
574 | 0 | } |
575 | | |
576 | 244k | ::google::protobuf::Metadata ConsensusErrorPB::GetMetadata() const { |
577 | 244k | protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto::protobuf_AssignDescriptorsOnce(); |
578 | 244k | return ::protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto::file_level_metadata[kIndexInFileMessages]; |
579 | 244k | } |
580 | | |
581 | | |
582 | | // @@protoc_insertion_point(namespace_scope) |
583 | | } // namespace consensus |
584 | | } // namespace yb |
585 | | |
586 | | // @@protoc_insertion_point(global_scope) |