-
Notifications
You must be signed in to change notification settings - Fork 2
/
kvraft.pb.h
1824 lines (1558 loc) · 60.4 KB
/
kvraft.pb.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: kvraft.proto
#ifndef PROTOBUF_kvraft_2eproto_INCLUDED
#define PROTOBUF_kvraft_2eproto_INCLUDED
#include <string>
#include <google/protobuf/stubs/common.h>
#if GOOGLE_PROTOBUF_VERSION < 3005000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3005001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_table_driven.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/metadata.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
#include <google/protobuf/extension_set.h> // IWYU pragma: export
#include <google/protobuf/generated_enum_reflection.h>
#include <google/protobuf/unknown_field_set.h>
#include <google/protobuf/wrappers.pb.h>
// @@protoc_insertion_point(includes)
namespace protobuf_kvraft_2eproto {
// Internal implementation detail -- do not use these members.
struct TableStruct {
static const ::google::protobuf::internal::ParseTableField entries[];
static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
static const ::google::protobuf::internal::ParseTable schema[8];
static const ::google::protobuf::internal::FieldMetadata field_metadata[];
static const ::google::protobuf::internal::SerializationTable serialization_table[];
static const ::google::protobuf::uint32 offsets[];
};
void AddDescriptors();
void InitDefaultsOperationImpl();
void InitDefaultsOperation();
void InitDefaultsKVArgsImpl();
void InitDefaultsKVArgs();
void InitDefaultsKVReplyImpl();
void InitDefaultsKVReply();
void InitDefaultsLogEntryImpl();
void InitDefaultsLogEntry();
void InitDefaultsRequestVoteArgsImpl();
void InitDefaultsRequestVoteArgs();
void InitDefaultsRequestVoteReplyImpl();
void InitDefaultsRequestVoteReply();
void InitDefaultsAppendEntriesArgsImpl();
void InitDefaultsAppendEntriesArgs();
void InitDefaultsAppendEntriesReplyImpl();
void InitDefaultsAppendEntriesReply();
inline void InitDefaults() {
InitDefaultsOperation();
InitDefaultsKVArgs();
InitDefaultsKVReply();
InitDefaultsLogEntry();
InitDefaultsRequestVoteArgs();
InitDefaultsRequestVoteReply();
InitDefaultsAppendEntriesArgs();
InitDefaultsAppendEntriesReply();
}
} // namespace protobuf_kvraft_2eproto
namespace kvraft {
class AppendEntriesArgs;
class AppendEntriesArgsDefaultTypeInternal;
extern AppendEntriesArgsDefaultTypeInternal _AppendEntriesArgs_default_instance_;
class AppendEntriesReply;
class AppendEntriesReplyDefaultTypeInternal;
extern AppendEntriesReplyDefaultTypeInternal _AppendEntriesReply_default_instance_;
class KVArgs;
class KVArgsDefaultTypeInternal;
extern KVArgsDefaultTypeInternal _KVArgs_default_instance_;
class KVReply;
class KVReplyDefaultTypeInternal;
extern KVReplyDefaultTypeInternal _KVReply_default_instance_;
class LogEntry;
class LogEntryDefaultTypeInternal;
extern LogEntryDefaultTypeInternal _LogEntry_default_instance_;
class Operation;
class OperationDefaultTypeInternal;
extern OperationDefaultTypeInternal _Operation_default_instance_;
class RequestVoteArgs;
class RequestVoteArgsDefaultTypeInternal;
extern RequestVoteArgsDefaultTypeInternal _RequestVoteArgs_default_instance_;
class RequestVoteReply;
class RequestVoteReplyDefaultTypeInternal;
extern RequestVoteReplyDefaultTypeInternal _RequestVoteReply_default_instance_;
} // namespace kvraft
namespace google {
namespace protobuf {
template<> ::kvraft::AppendEntriesArgs* Arena::Create< ::kvraft::AppendEntriesArgs>(Arena*);
template<> ::kvraft::AppendEntriesReply* Arena::Create< ::kvraft::AppendEntriesReply>(Arena*);
template<> ::kvraft::KVArgs* Arena::Create< ::kvraft::KVArgs>(Arena*);
template<> ::kvraft::KVReply* Arena::Create< ::kvraft::KVReply>(Arena*);
template<> ::kvraft::LogEntry* Arena::Create< ::kvraft::LogEntry>(Arena*);
template<> ::kvraft::Operation* Arena::Create< ::kvraft::Operation>(Arena*);
template<> ::kvraft::RequestVoteArgs* Arena::Create< ::kvraft::RequestVoteArgs>(Arena*);
template<> ::kvraft::RequestVoteReply* Arena::Create< ::kvraft::RequestVoteReply>(Arena*);
} // namespace protobuf
} // namespace google
namespace kvraft {
enum Operation_OpName {
Operation_OpName_GET = 0,
Operation_OpName_PUT = 1,
Operation_OpName_DEL = 2,
Operation_OpName_Operation_OpName_INT_MIN_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32min,
Operation_OpName_Operation_OpName_INT_MAX_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32max
};
bool Operation_OpName_IsValid(int value);
const Operation_OpName Operation_OpName_OpName_MIN = Operation_OpName_GET;
const Operation_OpName Operation_OpName_OpName_MAX = Operation_OpName_DEL;
const int Operation_OpName_OpName_ARRAYSIZE = Operation_OpName_OpName_MAX + 1;
const ::google::protobuf::EnumDescriptor* Operation_OpName_descriptor();
inline const ::std::string& Operation_OpName_Name(Operation_OpName value) {
return ::google::protobuf::internal::NameOfEnum(
Operation_OpName_descriptor(), value);
}
inline bool Operation_OpName_Parse(
const ::std::string& name, Operation_OpName* value) {
return ::google::protobuf::internal::ParseNamedEnum<Operation_OpName>(
Operation_OpName_descriptor(), name, value);
}
enum KVResult {
OK = 0,
ErrNoKey = 1,
ErrTimeout = 2,
ErrWrongLeader = 3,
KVResult_INT_MIN_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32min,
KVResult_INT_MAX_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32max
};
bool KVResult_IsValid(int value);
const KVResult KVResult_MIN = OK;
const KVResult KVResult_MAX = ErrWrongLeader;
const int KVResult_ARRAYSIZE = KVResult_MAX + 1;
const ::google::protobuf::EnumDescriptor* KVResult_descriptor();
inline const ::std::string& KVResult_Name(KVResult value) {
return ::google::protobuf::internal::NameOfEnum(
KVResult_descriptor(), value);
}
inline bool KVResult_Parse(
const ::std::string& name, KVResult* value) {
return ::google::protobuf::internal::ParseNamedEnum<KVResult>(
KVResult_descriptor(), name, value);
}
// ===================================================================
class Operation : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvraft.Operation) */ {
public:
Operation();
virtual ~Operation();
Operation(const Operation& from);
inline Operation& operator=(const Operation& from) {
CopyFrom(from);
return *this;
}
#if LANG_CXX11
Operation(Operation&& from) noexcept
: Operation() {
*this = ::std::move(from);
}
inline Operation& operator=(Operation&& from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
#endif
static const ::google::protobuf::Descriptor* descriptor();
static const Operation& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const Operation* internal_default_instance() {
return reinterpret_cast<const Operation*>(
&_Operation_default_instance_);
}
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
0;
void Swap(Operation* other);
friend void swap(Operation& a, Operation& b) {
a.Swap(&b);
}
// implements Message ----------------------------------------------
inline Operation* New() const PROTOBUF_FINAL {
return ::google::protobuf::Arena::Create<Operation>(NULL);
}
Operation* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL {
return ::google::protobuf::Arena::Create<Operation>(arena);
}
void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
void CopyFrom(const Operation& from);
void MergeFrom(const Operation& from);
void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL;
size_t ByteSizeLong() const PROTOBUF_FINAL;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const PROTOBUF_FINAL;
void InternalSwap(Operation* other);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return NULL;
}
inline void* MaybeArenaPtr() const {
return NULL;
}
public:
::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
// nested types ----------------------------------------------------
typedef Operation_OpName OpName;
static const OpName GET =
Operation_OpName_GET;
static const OpName PUT =
Operation_OpName_PUT;
static const OpName DEL =
Operation_OpName_DEL;
static inline bool OpName_IsValid(int value) {
return Operation_OpName_IsValid(value);
}
static const OpName OpName_MIN =
Operation_OpName_OpName_MIN;
static const OpName OpName_MAX =
Operation_OpName_OpName_MAX;
static const int OpName_ARRAYSIZE =
Operation_OpName_OpName_ARRAYSIZE;
static inline const ::google::protobuf::EnumDescriptor*
OpName_descriptor() {
return Operation_OpName_descriptor();
}
static inline const ::std::string& OpName_Name(OpName value) {
return Operation_OpName_Name(value);
}
static inline bool OpName_Parse(const ::std::string& name,
OpName* value) {
return Operation_OpName_Parse(name, value);
}
// accessors -------------------------------------------------------
// string key = 3;
void clear_key();
static const int kKeyFieldNumber = 3;
const ::std::string& key() const;
void set_key(const ::std::string& value);
#if LANG_CXX11
void set_key(::std::string&& value);
#endif
void set_key(const char* value);
void set_key(const char* value, size_t size);
::std::string* mutable_key();
::std::string* release_key();
void set_allocated_key(::std::string* key);
// string value = 4;
void clear_value();
static const int kValueFieldNumber = 4;
const ::std::string& value() const;
void set_value(const ::std::string& value);
#if LANG_CXX11
void set_value(::std::string&& value);
#endif
void set_value(const char* value);
void set_value(const char* value, size_t size);
::std::string* mutable_value();
::std::string* release_value();
void set_allocated_value(::std::string* value);
// int32 index = 1;
void clear_index();
static const int kIndexFieldNumber = 1;
::google::protobuf::int32 index() const;
void set_index(::google::protobuf::int32 value);
// .kvraft.Operation.OpName op = 2;
void clear_op();
static const int kOpFieldNumber = 2;
::kvraft::Operation_OpName op() const;
void set_op(::kvraft::Operation_OpName value);
// @@protoc_insertion_point(class_scope:kvraft.Operation)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::internal::ArenaStringPtr key_;
::google::protobuf::internal::ArenaStringPtr value_;
::google::protobuf::int32 index_;
int op_;
mutable int _cached_size_;
friend struct ::protobuf_kvraft_2eproto::TableStruct;
friend void ::protobuf_kvraft_2eproto::InitDefaultsOperationImpl();
};
// -------------------------------------------------------------------
class KVArgs : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvraft.KVArgs) */ {
public:
KVArgs();
virtual ~KVArgs();
KVArgs(const KVArgs& from);
inline KVArgs& operator=(const KVArgs& from) {
CopyFrom(from);
return *this;
}
#if LANG_CXX11
KVArgs(KVArgs&& from) noexcept
: KVArgs() {
*this = ::std::move(from);
}
inline KVArgs& operator=(KVArgs&& from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
#endif
static const ::google::protobuf::Descriptor* descriptor();
static const KVArgs& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const KVArgs* internal_default_instance() {
return reinterpret_cast<const KVArgs*>(
&_KVArgs_default_instance_);
}
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
1;
void Swap(KVArgs* other);
friend void swap(KVArgs& a, KVArgs& b) {
a.Swap(&b);
}
// implements Message ----------------------------------------------
inline KVArgs* New() const PROTOBUF_FINAL {
return ::google::protobuf::Arena::Create<KVArgs>(NULL);
}
KVArgs* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL {
return ::google::protobuf::Arena::Create<KVArgs>(arena);
}
void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
void CopyFrom(const KVArgs& from);
void MergeFrom(const KVArgs& from);
void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL;
size_t ByteSizeLong() const PROTOBUF_FINAL;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const PROTOBUF_FINAL;
void InternalSwap(KVArgs* other);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return NULL;
}
inline void* MaybeArenaPtr() const {
return NULL;
}
public:
::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// .kvraft.Operation command = 1;
bool has_command() const;
void clear_command();
static const int kCommandFieldNumber = 1;
const ::kvraft::Operation& command() const;
::kvraft::Operation* release_command();
::kvraft::Operation* mutable_command();
void set_allocated_command(::kvraft::Operation* command);
// int32 clientid = 2;
void clear_clientid();
static const int kClientidFieldNumber = 2;
::google::protobuf::int32 clientid() const;
void set_clientid(::google::protobuf::int32 value);
// int32 seq = 3;
void clear_seq();
static const int kSeqFieldNumber = 3;
::google::protobuf::int32 seq() const;
void set_seq(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:kvraft.KVArgs)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::kvraft::Operation* command_;
::google::protobuf::int32 clientid_;
::google::protobuf::int32 seq_;
mutable int _cached_size_;
friend struct ::protobuf_kvraft_2eproto::TableStruct;
friend void ::protobuf_kvraft_2eproto::InitDefaultsKVArgsImpl();
};
// -------------------------------------------------------------------
class KVReply : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvraft.KVReply) */ {
public:
KVReply();
virtual ~KVReply();
KVReply(const KVReply& from);
inline KVReply& operator=(const KVReply& from) {
CopyFrom(from);
return *this;
}
#if LANG_CXX11
KVReply(KVReply&& from) noexcept
: KVReply() {
*this = ::std::move(from);
}
inline KVReply& operator=(KVReply&& from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
#endif
static const ::google::protobuf::Descriptor* descriptor();
static const KVReply& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const KVReply* internal_default_instance() {
return reinterpret_cast<const KVReply*>(
&_KVReply_default_instance_);
}
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
2;
void Swap(KVReply* other);
friend void swap(KVReply& a, KVReply& b) {
a.Swap(&b);
}
// implements Message ----------------------------------------------
inline KVReply* New() const PROTOBUF_FINAL {
return ::google::protobuf::Arena::Create<KVReply>(NULL);
}
KVReply* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL {
return ::google::protobuf::Arena::Create<KVReply>(arena);
}
void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
void CopyFrom(const KVReply& from);
void MergeFrom(const KVReply& from);
void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL;
size_t ByteSizeLong() const PROTOBUF_FINAL;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const PROTOBUF_FINAL;
void InternalSwap(KVReply* other);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return NULL;
}
inline void* MaybeArenaPtr() const {
return NULL;
}
public:
::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// string value = 2;
void clear_value();
static const int kValueFieldNumber = 2;
const ::std::string& value() const;
void set_value(const ::std::string& value);
#if LANG_CXX11
void set_value(::std::string&& value);
#endif
void set_value(const char* value);
void set_value(const char* value, size_t size);
::std::string* mutable_value();
::std::string* release_value();
void set_allocated_value(::std::string* value);
// .kvraft.KVResult res = 1;
void clear_res();
static const int kResFieldNumber = 1;
::kvraft::KVResult res() const;
void set_res(::kvraft::KVResult value);
// @@protoc_insertion_point(class_scope:kvraft.KVReply)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::internal::ArenaStringPtr value_;
int res_;
mutable int _cached_size_;
friend struct ::protobuf_kvraft_2eproto::TableStruct;
friend void ::protobuf_kvraft_2eproto::InitDefaultsKVReplyImpl();
};
// -------------------------------------------------------------------
class LogEntry : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvraft.LogEntry) */ {
public:
LogEntry();
virtual ~LogEntry();
LogEntry(const LogEntry& from);
inline LogEntry& operator=(const LogEntry& from) {
CopyFrom(from);
return *this;
}
#if LANG_CXX11
LogEntry(LogEntry&& from) noexcept
: LogEntry() {
*this = ::std::move(from);
}
inline LogEntry& operator=(LogEntry&& from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
#endif
static const ::google::protobuf::Descriptor* descriptor();
static const LogEntry& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const LogEntry* internal_default_instance() {
return reinterpret_cast<const LogEntry*>(
&_LogEntry_default_instance_);
}
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
3;
void Swap(LogEntry* other);
friend void swap(LogEntry& a, LogEntry& b) {
a.Swap(&b);
}
// implements Message ----------------------------------------------
inline LogEntry* New() const PROTOBUF_FINAL {
return ::google::protobuf::Arena::Create<LogEntry>(NULL);
}
LogEntry* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL {
return ::google::protobuf::Arena::Create<LogEntry>(arena);
}
void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
void CopyFrom(const LogEntry& from);
void MergeFrom(const LogEntry& from);
void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL;
size_t ByteSizeLong() const PROTOBUF_FINAL;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const PROTOBUF_FINAL;
void InternalSwap(LogEntry* other);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return NULL;
}
inline void* MaybeArenaPtr() const {
return NULL;
}
public:
::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// .kvraft.Operation command = 1;
bool has_command() const;
void clear_command();
static const int kCommandFieldNumber = 1;
const ::kvraft::Operation& command() const;
::kvraft::Operation* release_command();
::kvraft::Operation* mutable_command();
void set_allocated_command(::kvraft::Operation* command);
// int32 term = 2;
void clear_term();
static const int kTermFieldNumber = 2;
::google::protobuf::int32 term() const;
void set_term(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:kvraft.LogEntry)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::kvraft::Operation* command_;
::google::protobuf::int32 term_;
mutable int _cached_size_;
friend struct ::protobuf_kvraft_2eproto::TableStruct;
friend void ::protobuf_kvraft_2eproto::InitDefaultsLogEntryImpl();
};
// -------------------------------------------------------------------
class RequestVoteArgs : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvraft.RequestVoteArgs) */ {
public:
RequestVoteArgs();
virtual ~RequestVoteArgs();
RequestVoteArgs(const RequestVoteArgs& from);
inline RequestVoteArgs& operator=(const RequestVoteArgs& from) {
CopyFrom(from);
return *this;
}
#if LANG_CXX11
RequestVoteArgs(RequestVoteArgs&& from) noexcept
: RequestVoteArgs() {
*this = ::std::move(from);
}
inline RequestVoteArgs& operator=(RequestVoteArgs&& from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
#endif
static const ::google::protobuf::Descriptor* descriptor();
static const RequestVoteArgs& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const RequestVoteArgs* internal_default_instance() {
return reinterpret_cast<const RequestVoteArgs*>(
&_RequestVoteArgs_default_instance_);
}
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
4;
void Swap(RequestVoteArgs* other);
friend void swap(RequestVoteArgs& a, RequestVoteArgs& b) {
a.Swap(&b);
}
// implements Message ----------------------------------------------
inline RequestVoteArgs* New() const PROTOBUF_FINAL {
return ::google::protobuf::Arena::Create<RequestVoteArgs>(NULL);
}
RequestVoteArgs* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL {
return ::google::protobuf::Arena::Create<RequestVoteArgs>(arena);
}
void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
void CopyFrom(const RequestVoteArgs& from);
void MergeFrom(const RequestVoteArgs& from);
void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL;
size_t ByteSizeLong() const PROTOBUF_FINAL;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const PROTOBUF_FINAL;
void InternalSwap(RequestVoteArgs* other);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return NULL;
}
inline void* MaybeArenaPtr() const {
return NULL;
}
public:
::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// int32 term = 1;
void clear_term();
static const int kTermFieldNumber = 1;
::google::protobuf::int32 term() const;
void set_term(::google::protobuf::int32 value);
// int32 candidateid = 2;
void clear_candidateid();
static const int kCandidateidFieldNumber = 2;
::google::protobuf::int32 candidateid() const;
void set_candidateid(::google::protobuf::int32 value);
// int32 lastlogindex = 3;
void clear_lastlogindex();
static const int kLastlogindexFieldNumber = 3;
::google::protobuf::int32 lastlogindex() const;
void set_lastlogindex(::google::protobuf::int32 value);
// int32 lastlogterm = 4;
void clear_lastlogterm();
static const int kLastlogtermFieldNumber = 4;
::google::protobuf::int32 lastlogterm() const;
void set_lastlogterm(::google::protobuf::int32 value);
// @@protoc_insertion_point(class_scope:kvraft.RequestVoteArgs)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::int32 term_;
::google::protobuf::int32 candidateid_;
::google::protobuf::int32 lastlogindex_;
::google::protobuf::int32 lastlogterm_;
mutable int _cached_size_;
friend struct ::protobuf_kvraft_2eproto::TableStruct;
friend void ::protobuf_kvraft_2eproto::InitDefaultsRequestVoteArgsImpl();
};
// -------------------------------------------------------------------
class RequestVoteReply : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvraft.RequestVoteReply) */ {
public:
RequestVoteReply();
virtual ~RequestVoteReply();
RequestVoteReply(const RequestVoteReply& from);
inline RequestVoteReply& operator=(const RequestVoteReply& from) {
CopyFrom(from);
return *this;
}
#if LANG_CXX11
RequestVoteReply(RequestVoteReply&& from) noexcept
: RequestVoteReply() {
*this = ::std::move(from);
}
inline RequestVoteReply& operator=(RequestVoteReply&& from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
#endif
static const ::google::protobuf::Descriptor* descriptor();
static const RequestVoteReply& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const RequestVoteReply* internal_default_instance() {
return reinterpret_cast<const RequestVoteReply*>(
&_RequestVoteReply_default_instance_);
}
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
5;
void Swap(RequestVoteReply* other);
friend void swap(RequestVoteReply& a, RequestVoteReply& b) {
a.Swap(&b);
}
// implements Message ----------------------------------------------
inline RequestVoteReply* New() const PROTOBUF_FINAL {
return ::google::protobuf::Arena::Create<RequestVoteReply>(NULL);
}
RequestVoteReply* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL {
return ::google::protobuf::Arena::Create<RequestVoteReply>(arena);
}
void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
void CopyFrom(const RequestVoteReply& from);
void MergeFrom(const RequestVoteReply& from);
void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL;
size_t ByteSizeLong() const PROTOBUF_FINAL;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const PROTOBUF_FINAL;
void InternalSwap(RequestVoteReply* other);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return NULL;
}
inline void* MaybeArenaPtr() const {
return NULL;
}
public:
::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// int32 term = 1;
void clear_term();
static const int kTermFieldNumber = 1;
::google::protobuf::int32 term() const;
void set_term(::google::protobuf::int32 value);
// bool votegranted = 2;
void clear_votegranted();
static const int kVotegrantedFieldNumber = 2;
bool votegranted() const;
void set_votegranted(bool value);
// @@protoc_insertion_point(class_scope:kvraft.RequestVoteReply)
private:
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::int32 term_;
bool votegranted_;
mutable int _cached_size_;
friend struct ::protobuf_kvraft_2eproto::TableStruct;
friend void ::protobuf_kvraft_2eproto::InitDefaultsRequestVoteReplyImpl();
};
// -------------------------------------------------------------------
class AppendEntriesArgs : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:kvraft.AppendEntriesArgs) */ {
public:
AppendEntriesArgs();
virtual ~AppendEntriesArgs();
AppendEntriesArgs(const AppendEntriesArgs& from);
inline AppendEntriesArgs& operator=(const AppendEntriesArgs& from) {
CopyFrom(from);
return *this;
}
#if LANG_CXX11
AppendEntriesArgs(AppendEntriesArgs&& from) noexcept
: AppendEntriesArgs() {
*this = ::std::move(from);
}
inline AppendEntriesArgs& operator=(AppendEntriesArgs&& from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
#endif
static const ::google::protobuf::Descriptor* descriptor();
static const AppendEntriesArgs& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const AppendEntriesArgs* internal_default_instance() {
return reinterpret_cast<const AppendEntriesArgs*>(
&_AppendEntriesArgs_default_instance_);
}
static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
6;
void Swap(AppendEntriesArgs* other);
friend void swap(AppendEntriesArgs& a, AppendEntriesArgs& b) {
a.Swap(&b);
}
// implements Message ----------------------------------------------
inline AppendEntriesArgs* New() const PROTOBUF_FINAL {
return ::google::protobuf::Arena::Create<AppendEntriesArgs>(NULL);
}
AppendEntriesArgs* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL {
return ::google::protobuf::Arena::Create<AppendEntriesArgs>(arena);
}
void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
void CopyFrom(const AppendEntriesArgs& from);
void MergeFrom(const AppendEntriesArgs& from);
void Clear() PROTOBUF_FINAL;
bool IsInitialized() const PROTOBUF_FINAL;
size_t ByteSizeLong() const PROTOBUF_FINAL;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const PROTOBUF_FINAL;
void InternalSwap(AppendEntriesArgs* other);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return NULL;
}
inline void* MaybeArenaPtr() const {
return NULL;
}
public:
::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
// repeated .kvraft.LogEntry entries = 6;