YugabyteDB (2.13.0.0-b42, bfc6a6643e7399ac8a0e81d06a3ee6d6571b33ab)

Coverage Report

Created: 2022-03-09 17:30

/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
15.8k
void InitDefaultsConsensusErrorPBImpl() {
34
15.8k
  GOOGLE_PROTOBUF_VERIFY_VERSION;
35
36
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
37
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
38
#else
39
15.8k
  ::google::protobuf::internal::InitProtobufDefaults();
40
15.8k
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
41
15.8k
  protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::InitDefaultsAppStatusPB();
42
15.8k
  {
43
15.8k
    void* ptr = &::yb::consensus::_ConsensusErrorPB_default_instance_;
44
15.8k
    new (ptr) ::yb::consensus::ConsensusErrorPB();
45
15.8k
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
46
15.8k
  }
47
15.8k
  ::yb::consensus::ConsensusErrorPB::InitAsDefaultInstance();
48
15.8k
}
49
50
189k
void InitDefaultsConsensusErrorPB() {
51
189k
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
52
189k
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsConsensusErrorPBImpl);
53
189k
}
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
9.19k
void protobuf_AssignDescriptors() {
78
9.19k
  AddDescriptors();
79
9.19k
  ::google::protobuf::MessageFactory* factory = NULL;
80
9.19k
  AssignDescriptors(
81
9.19k
      "yb/consensus/consensus_types.proto", schemas, file_default_instances, TableStruct::offsets, factory,
82
9.19k
      file_level_metadata, file_level_enum_descriptors, NULL);
83
9.19k
}
84
85
3.29M
void protobuf_AssignDescriptorsOnce() {
86
3.29M
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
87
3.29M
  ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
88
3.29M
}
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
15.8k
void AddDescriptorsImpl() {
97
15.8k
  InitDefaults();
98
15.8k
  static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
99
15.8k
      "\n\"yb/consensus/consensus_types.proto\022\014yb"
100
15.8k
      ".consensus\032\035yb/common/wire_protocol.prot"
101
15.8k
      "o\"\273\002\n\020ConsensusErrorPB\0221\n\004code\030\001 \002(\0162#.y"
102
15.8k
      "b.consensus.ConsensusErrorPB.Code\022\037\n\006sta"
103
15.8k
      "tus\030\002 \002(\0132\017.yb.AppStatusPB\"\322\001\n\004Code\022\013\n\007U"
104
15.8k
      "NKNOWN\020\000\022\020\n\014INVALID_TERM\020\002\022\025\n\021LAST_OPID_"
105
15.8k
      "TOO_OLD\020\003\022\021\n\rALREADY_VOTED\020\004\022\021\n\rNOT_IN_Q"
106
15.8k
      "UORUM\020\005\022\037\n\033PRECEDING_ENTRY_DIDNT_MATCH\020\006"
107
15.8k
      "\022\023\n\017LEADER_IS_ALIVE\020\007\022\022\n\016CONSENSUS_BUSY\020"
108
15.8k
      "\010\022\022\n\016CANNOT_PREPARE\020\t\022\020\n\014TABLET_SPLIT\020\n*"
109
15.8k
      "Z\n\020ChangeConfigType\022\022\n\016UNKNOWN_CHANGE\020\000\022"
110
15.8k
      "\016\n\nADD_SERVER\020\001\022\021\n\rREMOVE_SERVER\020\002\022\017\n\013CH"
111
15.8k
      "ANGE_ROLE\020\003*H\n\010OpIdType\022\025\n\021UNKNOWN_OPID_"
112
15.8k
      "TYPE\020\000\022\021\n\rRECEIVED_OPID\020\001\022\022\n\016COMMITTED_O"
113
15.8k
      "PID\020\002*c\n\021LeaderLeaseStatus\022\r\n\tHAS_LEASE\020"
114
15.8k
      "\000\022\035\n\031OLD_LEADER_MAY_HAVE_LEASE\020\001\022 \n\034NO_M"
115
15.8k
      "AJORITY_REPLICATED_LEASE\020\002*\310\001\n\rOperation"
116
15.8k
      "Type\022\016\n\nUNKNOWN_OP\020\000\022\t\n\005NO_OP\020\001\022\014\n\010WRITE"
117
15.8k
      "_OP\020\003\022\026\n\022CHANGE_METADATA_OP\020\004\022\024\n\020CHANGE_"
118
15.8k
      "CONFIG_OP\020\005\022\031\n\025UPDATE_TRANSACTION_OP\020\006\022\017"
119
15.8k
      "\n\013SNAPSHOT_OP\020\007\022\017\n\013TRUNCATE_OP\020\010\022\025\n\021HIST"
120
15.8k
      "ORY_CUTOFF_OP\020\t\022\014\n\010SPLIT_OP\020\nB\022\n\020org.yb."
121
15.8k
      "consensus"
122
15.8k
  };
123
15.8k
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
124
15.8k
      descriptor, 889);
125
15.8k
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
126
15.8k
    "yb/consensus/consensus_types.proto", &protobuf_RegisterTypes);
127
15.8k
  ::protobuf_yb_2fcommon_2fwire_5fprotocol_2eproto::AddDescriptors();
128
15.8k
}
129
130
40.8k
void AddDescriptors() {
131
40.8k
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
132
40.8k
  ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
133
40.8k
}
134
// Force AddDescriptors() to be called at dynamic initialization time.
135
struct StaticDescriptorInitializer {
136
15.8k
  StaticDescriptorInitializer() {
137
15.8k
    AddDescriptors();
138
15.8k
  }
139
} static_descriptor_initializer;
140
}  // namespace protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto
141
namespace yb {
142
namespace consensus {
143
12
const ::google::protobuf::EnumDescriptor* ConsensusErrorPB_Code_descriptor() {
144
12
  protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto::protobuf_AssignDescriptorsOnce();
145
12
  return protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto::file_level_enum_descriptors[0];
146
12
}
147
212k
bool ConsensusErrorPB_Code_IsValid(int value) {
148
212k
  switch (value) {
149
0
    case 0:
150
528
    case 2:
151
1.02k
    case 3:
152
1.59k
    case 4:
153
1.59k
    case 5:
154
205k
    case 6:
155
206k
    case 7:
156
212k
    case 8:
157
212k
    case 9:
158
212k
    case 10:
159
212k
      return true;
160
0
    default:
161
0
      return false;
162
212k
  }
163
212k
}
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
3.04M
const ::google::protobuf::EnumDescriptor* ChangeConfigType_descriptor() {
181
3.04M
  protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto::protobuf_AssignDescriptorsOnce();
182
3.04M
  return protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto::file_level_enum_descriptors[1];
183
3.04M
}
184
3.05M
bool ChangeConfigType_IsValid(int value) {
185
3.05M
  switch (value) {
186
0
    case 0:
187
3.62k
    case 1:
188
7.56k
    case 2:
189
3.05M
    case 3:
190
3.05M
      return true;
191
0
    default:
192
0
      return false;
193
3.05M
  }
194
3.05M
}
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.77k
bool OpIdType_IsValid(int value) {
201
1.77k
  switch (value) {
202
0
    case 0:
203
1.06k
    case 1:
204
1.77k
    case 2:
205
1.77k
      return true;
206
0
    default:
207
0
      return false;
208
1.77k
  }
209
1.77k
}
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
10.9k
bool LeaderLeaseStatus_IsValid(int value) {
216
10.9k
  switch (value) {
217
3.54k
    case 0:
218
4.02k
    case 1:
219
10.9k
    case 2:
220
10.9k
      return true;
221
0
    default:
222
0
      return false;
223
10.9k
  }
224
10.9k
}
225
226
113k
const ::google::protobuf::EnumDescriptor* OperationType_descriptor() {
227
113k
  protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto::protobuf_AssignDescriptorsOnce();
228
113k
  return protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto::file_level_enum_descriptors[4];
229
113k
}
230
16.8M
bool OperationType_IsValid(int value) {
231
16.8M
  switch (value) {
232
0
    case 0:
233
413k
    case 1:
234
11.1M
    case 3:
235
12.0M
    case 4:
236
12.0M
    case 5:
237
16.5M
    case 6:
238
16.5M
    case 7:
239
16.8M
    case 8:
240
16.8M
    case 9:
241
16.8M
    case 10:
242
16.8M
      return true;
243
0
    default:
244
0
      return false;
245
16.8M
  }
246
16.8M
}
247
248
249
// ===================================================================
250
251
15.8k
void ConsensusErrorPB::InitAsDefaultInstance() {
252
15.8k
  ::yb::consensus::_ConsensusErrorPB_default_instance_._instance.get_mutable()->status_ = const_cast< ::yb::AppStatusPB*>(
253
15.8k
      ::yb::AppStatusPB::internal_default_instance());
254
15.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
157k
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
266
141k
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
267
141k
    ::protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto::InitDefaultsConsensusErrorPB();
268
141k
  }
269
157k
  SharedCtor();
270
  // @@protoc_insertion_point(constructor:yb.consensus.ConsensusErrorPB)
271
157k
}
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
157k
void ConsensusErrorPB::SharedCtor() {
288
157k
  _cached_size_ = 0;
289
157k
  ::memset(&status_, 0, static_cast<size_t>(
290
157k
      reinterpret_cast<char*>(&code_) -
291
157k
      reinterpret_cast<char*>(&status_)) + sizeof(code_));
292
157k
}
293
294
115k
ConsensusErrorPB::~ConsensusErrorPB() {
295
  // @@protoc_insertion_point(destructor:yb.consensus.ConsensusErrorPB)
296
115k
  SharedDtor();
297
115k
}
298
299
115k
void ConsensusErrorPB::SharedDtor() {
300
115k
  if (this != internal_default_instance()) delete status_;
301
115k
}
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
68.3k
void ConsensusErrorPB::Clear() {
327
// @@protoc_insertion_point(message_clear_start:yb.consensus.ConsensusErrorPB)
328
68.3k
  ::google::protobuf::uint32 cached_has_bits = 0;
329
  // Prevent compiler warnings about cached_has_bits being unused
330
68.3k
  (void) cached_has_bits;
331
332
68.3k
  cached_has_bits = _has_bits_[0];
333
68.3k
  if (cached_has_bits & 0x00000001u) {
334
68.3k
    GOOGLE_DCHECK(status_ != NULL);
335
68.3k
    status_->Clear();
336
68.3k
  }
337
68.3k
  code_ = 0;
338
68.3k
  _has_bits_.Clear();
339
68.3k
  _internal_metadata_.Clear();
340
68.3k
}
341
342
bool ConsensusErrorPB::MergePartialFromCodedStream(
343
70.8k
    ::google::protobuf::io::CodedInputStream* input) {
344
140k
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
345
70.8k
  ::google::protobuf::uint32 tag;
346
  // @@protoc_insertion_point(parse_start:yb.consensus.ConsensusErrorPB)
347
211k
  for (;;) {
348
211k
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
349
211k
    tag = p.first;
350
211k
    if (!p.second) goto handle_unusual;
351
141k
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
352
      // required .yb.consensus.ConsensusErrorPB.Code code = 1;
353
70.3k
      case 1: {
354
70.3k
        if (static_cast< ::google::protobuf::uint8>(tag) ==
355
70.3k
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
356
70.3k
          int value;
357
70.3k
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
358
70.3k
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
359
70.3k
                 input, &value)));
360
70.5k
          if (::yb::consensus::ConsensusErrorPB_Code_IsValid(value)) {
361
70.5k
            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
70.3k
        break;
370
70.3k
      }
371
372
      // required .yb.AppStatusPB status = 2;
373
70.6k
      case 2: {
374
70.6k
        if (static_cast< ::google::protobuf::uint8>(tag) ==
375
70.6k
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
376
70.6k
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
377
70.6k
               input, mutable_status()));
378
18.4E
        } else {
379
18.4E
          goto handle_unusual;
380
18.4E
        }
381
70.6k
        break;
382
70.3k
      }
383
384
0
      default: {
385
70.3k
      handle_unusual:
386
70.4k
        if (tag == 0) {
387
70.4k
          goto success;
388
70.4k
        }
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
141k
    }
394
141k
  }
395
70.4k
success:
396
  // @@protoc_insertion_point(parse_success:yb.consensus.ConsensusErrorPB)
397
70.4k
  return true;
398
0
failure:
399
  // @@protoc_insertion_point(parse_failure:yb.consensus.ConsensusErrorPB)
400
0
  return false;
401
70.8k
#undef DO_
402
70.8k
}
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
71.0k
    bool deterministic, ::google::protobuf::uint8* target) const {
432
71.0k
  (void)deterministic; // Unused
433
  // @@protoc_insertion_point(serialize_to_array_start:yb.consensus.ConsensusErrorPB)
434
71.0k
  ::google::protobuf::uint32 cached_has_bits = 0;
435
71.0k
  (void) cached_has_bits;
436
437
71.0k
  cached_has_bits = _has_bits_[0];
438
  // required .yb.consensus.ConsensusErrorPB.Code code = 1;
439
71.0k
  if (cached_has_bits & 0x00000002u) {
440
71.0k
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
441
71.0k
      1, this->code(), target);
442
71.0k
  }
443
444
  // required .yb.AppStatusPB status = 2;
445
71.0k
  if (cached_has_bits & 0x00000001u) {
446
71.0k
    target = ::google::protobuf::internal::WireFormatLite::
447
71.0k
      InternalWriteMessageToArray(
448
71.0k
        2, *this->status_, deterministic, target);
449
71.0k
  }
450
451
71.0k
  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
71.0k
  return target;
457
71.0k
}
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
142k
size_t ConsensusErrorPB::ByteSizeLong() const {
479
// @@protoc_insertion_point(message_byte_size_start:yb.consensus.ConsensusErrorPB)
480
142k
  size_t total_size = 0;
481
482
142k
  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
142k
  if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) {  // All required fields are present.
488
    // required .yb.AppStatusPB status = 2;
489
142k
    total_size += 1 +
490
142k
      ::google::protobuf::internal::WireFormatLite::MessageSize(
491
142k
        *this->status_);
492
493
    // required .yb.consensus.ConsensusErrorPB.Code code = 1;
494
142k
    total_size += 1 +
495
142k
      ::google::protobuf::internal::WireFormatLite::EnumSize(this->code());
496
497
43
  } else {
498
43
    total_size += RequiredFieldsByteSizeFallback();
499
43
  }
500
142k
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
501
142k
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
502
142k
  _cached_size_ = cached_size;
503
142k
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
504
142k
  return total_size;
505
142k
}
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
211
void ConsensusErrorPB::MergeFrom(const ConsensusErrorPB& from) {
523
// @@protoc_insertion_point(class_specific_merge_from_start:yb.consensus.ConsensusErrorPB)
524
211
  GOOGLE_DCHECK_NE(&from, this);
525
211
  _internal_metadata_.MergeFrom(from._internal_metadata_);
526
211
  ::google::protobuf::uint32 cached_has_bits = 0;
527
211
  (void) cached_has_bits;
528
529
211
  cached_has_bits = from._has_bits_[0];
530
211
  if (cached_has_bits & 3u) {
531
211
    if (cached_has_bits & 0x00000001u) {
532
211
      mutable_status()->::yb::AppStatusPB::MergeFrom(from.status());
533
211
    }
534
211
    if (cached_has_bits & 0x00000002u) {
535
210
      code_ = from.code_;
536
210
    }
537
211
    _has_bits_[0] |= cached_has_bits;
538
211
  }
539
211
}
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
277k
bool ConsensusErrorPB::IsInitialized() const {
556
277k
  if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
557
278k
  if (has_status()) {
558
278k
    if (!this->status_->IsInitialized()) return false;
559
277k
  }
560
277k
  return true;
561
277k
}
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
136k
::google::protobuf::Metadata ConsensusErrorPB::GetMetadata() const {
577
136k
  protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto::protobuf_AssignDescriptorsOnce();
578
136k
  return ::protobuf_yb_2fconsensus_2fconsensus_5ftypes_2eproto::file_level_metadata[kIndexInFileMessages];
579
136k
}
580
581
582
// @@protoc_insertion_point(namespace_scope)
583
}  // namespace consensus
584
}  // namespace yb
585
586
// @@protoc_insertion_point(global_scope)