// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.11
// 	protoc        v3.20.3
// source: raft.proto

package raftpb

import (
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"

	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

type EntryType int32

const (
	EntryType_EntryNormal       EntryType = 0
	EntryType_EntryConfChange   EntryType = 1 // corresponds to pb.ConfChange
	EntryType_EntryConfChangeV2 EntryType = 2 // corresponds to pb.ConfChangeV2
)

// Enum value maps for EntryType.
var (
	EntryType_name = map[int32]string{
		0: "EntryNormal",
		1: "EntryConfChange",
		2: "EntryConfChangeV2",
	}
	EntryType_value = map[string]int32{
		"EntryNormal":       0,
		"EntryConfChange":   1,
		"EntryConfChangeV2": 2,
	}
)

func (x EntryType) Enum() *EntryType {
	p := new(EntryType)
	*p = x
	return p
}

func (x EntryType) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (EntryType) Descriptor() protoreflect.EnumDescriptor {
	return file_raft_proto_enumTypes[0].Descriptor()
}

func (EntryType) Type() protoreflect.EnumType {
	return &file_raft_proto_enumTypes[0]
}

func (x EntryType) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Do not use.
func (x *EntryType) UnmarshalJSON(b []byte) error {
	num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
	if err != nil {
		return err
	}
	*x = EntryType(num)
	return nil
}

// Deprecated: Use EntryType.Descriptor instead.
func (EntryType) EnumDescriptor() ([]byte, []int) {
	return file_raft_proto_rawDescGZIP(), []int{0}
}

// For description of different message types, see:
// https://pkg.go.dev/go.etcd.io/raft/v3#hdr-MessageType
type MessageType int32

const (
	MessageType_MsgHup               MessageType = 0
	MessageType_MsgBeat              MessageType = 1
	MessageType_MsgProp              MessageType = 2
	MessageType_MsgApp               MessageType = 3
	MessageType_MsgAppResp           MessageType = 4
	MessageType_MsgVote              MessageType = 5
	MessageType_MsgVoteResp          MessageType = 6
	MessageType_MsgSnap              MessageType = 7
	MessageType_MsgHeartbeat         MessageType = 8
	MessageType_MsgHeartbeatResp     MessageType = 9
	MessageType_MsgUnreachable       MessageType = 10
	MessageType_MsgSnapStatus        MessageType = 11
	MessageType_MsgCheckQuorum       MessageType = 12
	MessageType_MsgTransferLeader    MessageType = 13
	MessageType_MsgTimeoutNow        MessageType = 14
	MessageType_MsgReadIndex         MessageType = 15
	MessageType_MsgReadIndexResp     MessageType = 16
	MessageType_MsgPreVote           MessageType = 17
	MessageType_MsgPreVoteResp       MessageType = 18
	MessageType_MsgStorageAppend     MessageType = 19
	MessageType_MsgStorageAppendResp MessageType = 20
	MessageType_MsgStorageApply      MessageType = 21
	MessageType_MsgStorageApplyResp  MessageType = 22
	MessageType_MsgForgetLeader      MessageType = 23
)

// Enum value maps for MessageType.
var (
	MessageType_name = map[int32]string{
		0:  "MsgHup",
		1:  "MsgBeat",
		2:  "MsgProp",
		3:  "MsgApp",
		4:  "MsgAppResp",
		5:  "MsgVote",
		6:  "MsgVoteResp",
		7:  "MsgSnap",
		8:  "MsgHeartbeat",
		9:  "MsgHeartbeatResp",
		10: "MsgUnreachable",
		11: "MsgSnapStatus",
		12: "MsgCheckQuorum",
		13: "MsgTransferLeader",
		14: "MsgTimeoutNow",
		15: "MsgReadIndex",
		16: "MsgReadIndexResp",
		17: "MsgPreVote",
		18: "MsgPreVoteResp",
		19: "MsgStorageAppend",
		20: "MsgStorageAppendResp",
		21: "MsgStorageApply",
		22: "MsgStorageApplyResp",
		23: "MsgForgetLeader",
	}
	MessageType_value = map[string]int32{
		"MsgHup":               0,
		"MsgBeat":              1,
		"MsgProp":              2,
		"MsgApp":               3,
		"MsgAppResp":           4,
		"MsgVote":              5,
		"MsgVoteResp":          6,
		"MsgSnap":              7,
		"MsgHeartbeat":         8,
		"MsgHeartbeatResp":     9,
		"MsgUnreachable":       10,
		"MsgSnapStatus":        11,
		"MsgCheckQuorum":       12,
		"MsgTransferLeader":    13,
		"MsgTimeoutNow":        14,
		"MsgReadIndex":         15,
		"MsgReadIndexResp":     16,
		"MsgPreVote":           17,
		"MsgPreVoteResp":       18,
		"MsgStorageAppend":     19,
		"MsgStorageAppendResp": 20,
		"MsgStorageApply":      21,
		"MsgStorageApplyResp":  22,
		"MsgForgetLeader":      23,
	}
)

func (x MessageType) Enum() *MessageType {
	p := new(MessageType)
	*p = x
	return p
}

func (x MessageType) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (MessageType) Descriptor() protoreflect.EnumDescriptor {
	return file_raft_proto_enumTypes[1].Descriptor()
}

func (MessageType) Type() protoreflect.EnumType {
	return &file_raft_proto_enumTypes[1]
}

func (x MessageType) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Do not use.
func (x *MessageType) UnmarshalJSON(b []byte) error {
	num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
	if err != nil {
		return err
	}
	*x = MessageType(num)
	return nil
}

// Deprecated: Use MessageType.Descriptor instead.
func (MessageType) EnumDescriptor() ([]byte, []int) {
	return file_raft_proto_rawDescGZIP(), []int{1}
}

// ConfChangeTransition specifies the behavior of a configuration change with
// respect to joint consensus.
type ConfChangeTransition int32

const (
	// Automatically use the simple protocol if possible, otherwise fall back
	// to ConfChangeJointImplicit. Most applications will want to use this.
	ConfChangeTransition_ConfChangeTransitionAuto ConfChangeTransition = 0
	// Use joint consensus unconditionally, and transition out of them
	// automatically (by proposing a zero configuration change).
	//
	// This option is suitable for applications that want to minimize the time
	// spent in the joint configuration and do not store the joint configuration
	// in the state machine (outside of InitialState).
	ConfChangeTransition_ConfChangeTransitionJointImplicit ConfChangeTransition = 1
	// Use joint consensus and remain in the joint configuration until the
	// application proposes a no-op configuration change. This is suitable for
	// applications that want to explicitly control the transitions, for example
	// to use a custom payload (via the Context field).
	ConfChangeTransition_ConfChangeTransitionJointExplicit ConfChangeTransition = 2
)

// Enum value maps for ConfChangeTransition.
var (
	ConfChangeTransition_name = map[int32]string{
		0: "ConfChangeTransitionAuto",
		1: "ConfChangeTransitionJointImplicit",
		2: "ConfChangeTransitionJointExplicit",
	}
	ConfChangeTransition_value = map[string]int32{
		"ConfChangeTransitionAuto":          0,
		"ConfChangeTransitionJointImplicit": 1,
		"ConfChangeTransitionJointExplicit": 2,
	}
)

func (x ConfChangeTransition) Enum() *ConfChangeTransition {
	p := new(ConfChangeTransition)
	*p = x
	return p
}

func (x ConfChangeTransition) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (ConfChangeTransition) Descriptor() protoreflect.EnumDescriptor {
	return file_raft_proto_enumTypes[2].Descriptor()
}

func (ConfChangeTransition) Type() protoreflect.EnumType {
	return &file_raft_proto_enumTypes[2]
}

func (x ConfChangeTransition) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Do not use.
func (x *ConfChangeTransition) UnmarshalJSON(b []byte) error {
	num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
	if err != nil {
		return err
	}
	*x = ConfChangeTransition(num)
	return nil
}

// Deprecated: Use ConfChangeTransition.Descriptor instead.
func (ConfChangeTransition) EnumDescriptor() ([]byte, []int) {
	return file_raft_proto_rawDescGZIP(), []int{2}
}

type ConfChangeType int32

const (
	ConfChangeType_ConfChangeAddNode        ConfChangeType = 0
	ConfChangeType_ConfChangeRemoveNode     ConfChangeType = 1
	ConfChangeType_ConfChangeUpdateNode     ConfChangeType = 2
	ConfChangeType_ConfChangeAddLearnerNode ConfChangeType = 3
)

// Enum value maps for ConfChangeType.
var (
	ConfChangeType_name = map[int32]string{
		0: "ConfChangeAddNode",
		1: "ConfChangeRemoveNode",
		2: "ConfChangeUpdateNode",
		3: "ConfChangeAddLearnerNode",
	}
	ConfChangeType_value = map[string]int32{
		"ConfChangeAddNode":        0,
		"ConfChangeRemoveNode":     1,
		"ConfChangeUpdateNode":     2,
		"ConfChangeAddLearnerNode": 3,
	}
)

func (x ConfChangeType) Enum() *ConfChangeType {
	p := new(ConfChangeType)
	*p = x
	return p
}

func (x ConfChangeType) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (ConfChangeType) Descriptor() protoreflect.EnumDescriptor {
	return file_raft_proto_enumTypes[3].Descriptor()
}

func (ConfChangeType) Type() protoreflect.EnumType {
	return &file_raft_proto_enumTypes[3]
}

func (x ConfChangeType) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Do not use.
func (x *ConfChangeType) UnmarshalJSON(b []byte) error {
	num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
	if err != nil {
		return err
	}
	*x = ConfChangeType(num)
	return nil
}

// Deprecated: Use ConfChangeType.Descriptor instead.
func (ConfChangeType) EnumDescriptor() ([]byte, []int) {
	return file_raft_proto_rawDescGZIP(), []int{3}
}

type Entry struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Term          *uint64                `protobuf:"varint,2,opt,name=Term" json:"Term,omitempty"`
	Index         *uint64                `protobuf:"varint,3,opt,name=Index" json:"Index,omitempty"`
	Type          *EntryType             `protobuf:"varint,1,opt,name=Type,enum=raftpb.EntryType" json:"Type,omitempty"`
	Data          []byte                 `protobuf:"bytes,4,opt,name=Data" json:"Data,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Entry) Reset() {
	*x = Entry{}
	mi := &file_raft_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *Entry) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*Entry) ProtoMessage() {}

func (x *Entry) ProtoReflect() protoreflect.Message {
	mi := &file_raft_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use Entry.ProtoReflect.Descriptor instead.
func (*Entry) Descriptor() ([]byte, []int) {
	return file_raft_proto_rawDescGZIP(), []int{0}
}

func (x *Entry) GetTerm() uint64 {
	if x != nil && x.Term != nil {
		return *x.Term
	}
	return 0
}

func (x *Entry) GetIndex() uint64 {
	if x != nil && x.Index != nil {
		return *x.Index
	}
	return 0
}

func (x *Entry) GetType() EntryType {
	if x != nil && x.Type != nil {
		return *x.Type
	}
	return EntryType_EntryNormal
}

func (x *Entry) GetData() []byte {
	if x != nil {
		return x.Data
	}
	return nil
}

type SnapshotMetadata struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	ConfState     *ConfState             `protobuf:"bytes,1,opt,name=conf_state,json=confState" json:"conf_state,omitempty"`
	Index         *uint64                `protobuf:"varint,2,opt,name=index" json:"index,omitempty"`
	Term          *uint64                `protobuf:"varint,3,opt,name=term" json:"term,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *SnapshotMetadata) Reset() {
	*x = SnapshotMetadata{}
	mi := &file_raft_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *SnapshotMetadata) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*SnapshotMetadata) ProtoMessage() {}

func (x *SnapshotMetadata) ProtoReflect() protoreflect.Message {
	mi := &file_raft_proto_msgTypes[1]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use SnapshotMetadata.ProtoReflect.Descriptor instead.
func (*SnapshotMetadata) Descriptor() ([]byte, []int) {
	return file_raft_proto_rawDescGZIP(), []int{1}
}

func (x *SnapshotMetadata) GetConfState() *ConfState {
	if x != nil {
		return x.ConfState
	}
	return nil
}

func (x *SnapshotMetadata) GetIndex() uint64 {
	if x != nil && x.Index != nil {
		return *x.Index
	}
	return 0
}

func (x *SnapshotMetadata) GetTerm() uint64 {
	if x != nil && x.Term != nil {
		return *x.Term
	}
	return 0
}

type Snapshot struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Data          []byte                 `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
	Metadata      *SnapshotMetadata      `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Snapshot) Reset() {
	*x = Snapshot{}
	mi := &file_raft_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *Snapshot) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*Snapshot) ProtoMessage() {}

func (x *Snapshot) ProtoReflect() protoreflect.Message {
	mi := &file_raft_proto_msgTypes[2]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use Snapshot.ProtoReflect.Descriptor instead.
func (*Snapshot) Descriptor() ([]byte, []int) {
	return file_raft_proto_rawDescGZIP(), []int{2}
}

func (x *Snapshot) GetData() []byte {
	if x != nil {
		return x.Data
	}
	return nil
}

func (x *Snapshot) GetMetadata() *SnapshotMetadata {
	if x != nil {
		return x.Metadata
	}
	return nil
}

type Message struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	Type  *MessageType           `protobuf:"varint,1,opt,name=type,enum=raftpb.MessageType" json:"type,omitempty"`
	To    *uint64                `protobuf:"varint,2,opt,name=to" json:"to,omitempty"`
	From  *uint64                `protobuf:"varint,3,opt,name=from" json:"from,omitempty"`
	Term  *uint64                `protobuf:"varint,4,opt,name=term" json:"term,omitempty"`
	// logTerm is generally used for appending Raft logs to followers. For example,
	// (type=MsgApp,index=100,logTerm=5) means the leader appends entries starting
	// at index=101, and the term of the entry at index 100 is 5.
	// (type=MsgAppResp,reject=true,index=100,logTerm=5) means follower rejects some
	// entries from its leader as it already has an entry with term 5 at index 100.
	// (type=MsgStorageAppendResp,index=100,logTerm=5) means the local node wrote
	// entries up to index=100 in stable storage, and the term of the entry at index
	// 100 was 5. This doesn't always mean that the corresponding MsgStorageAppend
	// message was the one that carried these entries, just that those entries were
	// stable at the time of processing the corresponding MsgStorageAppend.
	LogTerm *uint64  `protobuf:"varint,5,opt,name=logTerm" json:"logTerm,omitempty"`
	Index   *uint64  `protobuf:"varint,6,opt,name=index" json:"index,omitempty"`
	Entries []*Entry `protobuf:"bytes,7,rep,name=entries" json:"entries,omitempty"`
	Commit  *uint64  `protobuf:"varint,8,opt,name=commit" json:"commit,omitempty"`
	// (type=MsgStorageAppend,vote=5,term=10) means the local node is voting for
	// peer 5 in term 10. For MsgStorageAppends, the term, vote, and commit fields
	// will either all be set (to facilitate the construction of a HardState) if
	// any of the fields have changed or will all be unset if none of the fields
	// have changed.
	Vote *uint64 `protobuf:"varint,13,opt,name=vote" json:"vote,omitempty"`
	// snapshot is non-nil and non-empty for MsgSnap messages and nil for all other
	// message types. However, peer nodes running older binary versions may send a
	// non-nil, empty value for the snapshot field of non-MsgSnap messages. Code
	// should be prepared to handle such messages.
	Snapshot   *Snapshot `protobuf:"bytes,9,opt,name=snapshot" json:"snapshot,omitempty"`
	Reject     *bool     `protobuf:"varint,10,opt,name=reject" json:"reject,omitempty"`
	RejectHint *uint64   `protobuf:"varint,11,opt,name=rejectHint" json:"rejectHint,omitempty"`
	Context    []byte    `protobuf:"bytes,12,opt,name=context" json:"context,omitempty"`
	// responses are populated by a raft node to instruct storage threads on how
	// to respond and who to respond to when the work associated with a message
	// is complete. Populated for MsgStorageAppend and MsgStorageApply messages.
	Responses     []*Message `protobuf:"bytes,14,rep,name=responses" json:"responses,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Message) Reset() {
	*x = Message{}
	mi := &file_raft_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *Message) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*Message) ProtoMessage() {}

func (x *Message) ProtoReflect() protoreflect.Message {
	mi := &file_raft_proto_msgTypes[3]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use Message.ProtoReflect.Descriptor instead.
func (*Message) Descriptor() ([]byte, []int) {
	return file_raft_proto_rawDescGZIP(), []int{3}
}

func (x *Message) GetType() MessageType {
	if x != nil && x.Type != nil {
		return *x.Type
	}
	return MessageType_MsgHup
}

func (x *Message) GetTo() uint64 {
	if x != nil && x.To != nil {
		return *x.To
	}
	return 0
}

func (x *Message) GetFrom() uint64 {
	if x != nil && x.From != nil {
		return *x.From
	}
	return 0
}

func (x *Message) GetTerm() uint64 {
	if x != nil && x.Term != nil {
		return *x.Term
	}
	return 0
}

func (x *Message) GetLogTerm() uint64 {
	if x != nil && x.LogTerm != nil {
		return *x.LogTerm
	}
	return 0
}

func (x *Message) GetIndex() uint64 {
	if x != nil && x.Index != nil {
		return *x.Index
	}
	return 0
}

func (x *Message) GetEntries() []*Entry {
	if x != nil {
		return x.Entries
	}
	return nil
}

func (x *Message) GetCommit() uint64 {
	if x != nil && x.Commit != nil {
		return *x.Commit
	}
	return 0
}

func (x *Message) GetVote() uint64 {
	if x != nil && x.Vote != nil {
		return *x.Vote
	}
	return 0
}

func (x *Message) GetSnapshot() *Snapshot {
	if x != nil {
		return x.Snapshot
	}
	return nil
}

func (x *Message) GetReject() bool {
	if x != nil && x.Reject != nil {
		return *x.Reject
	}
	return false
}

func (x *Message) GetRejectHint() uint64 {
	if x != nil && x.RejectHint != nil {
		return *x.RejectHint
	}
	return 0
}

func (x *Message) GetContext() []byte {
	if x != nil {
		return x.Context
	}
	return nil
}

func (x *Message) GetResponses() []*Message {
	if x != nil {
		return x.Responses
	}
	return nil
}

type HardState struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Term          *uint64                `protobuf:"varint,1,opt,name=term" json:"term,omitempty"`
	Vote          *uint64                `protobuf:"varint,2,opt,name=vote" json:"vote,omitempty"`
	Commit        *uint64                `protobuf:"varint,3,opt,name=commit" json:"commit,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *HardState) Reset() {
	*x = HardState{}
	mi := &file_raft_proto_msgTypes[4]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *HardState) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*HardState) ProtoMessage() {}

func (x *HardState) ProtoReflect() protoreflect.Message {
	mi := &file_raft_proto_msgTypes[4]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use HardState.ProtoReflect.Descriptor instead.
func (*HardState) Descriptor() ([]byte, []int) {
	return file_raft_proto_rawDescGZIP(), []int{4}
}

func (x *HardState) GetTerm() uint64 {
	if x != nil && x.Term != nil {
		return *x.Term
	}
	return 0
}

func (x *HardState) GetVote() uint64 {
	if x != nil && x.Vote != nil {
		return *x.Vote
	}
	return 0
}

func (x *HardState) GetCommit() uint64 {
	if x != nil && x.Commit != nil {
		return *x.Commit
	}
	return 0
}

type ConfState struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The voters in the incoming config. (If the configuration is not joint,
	// then the outgoing config is empty).
	Voters []uint64 `protobuf:"varint,1,rep,name=voters" json:"voters,omitempty"`
	// The learners in the incoming config.
	Learners []uint64 `protobuf:"varint,2,rep,name=learners" json:"learners,omitempty"`
	// The voters in the outgoing config.
	VotersOutgoing []uint64 `protobuf:"varint,3,rep,name=voters_outgoing,json=votersOutgoing" json:"voters_outgoing,omitempty"`
	// The nodes that will become learners when the outgoing config is removed.
	// These nodes are necessarily currently in nodes_joint (or they would have
	// been added to the incoming config right away).
	LearnersNext []uint64 `protobuf:"varint,4,rep,name=learners_next,json=learnersNext" json:"learners_next,omitempty"`
	// If set, the config is joint and Raft will automatically transition into
	// the final config (i.e. remove the outgoing config) when this is safe.
	AutoLeave     *bool `protobuf:"varint,5,opt,name=auto_leave,json=autoLeave" json:"auto_leave,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *ConfState) Reset() {
	*x = ConfState{}
	mi := &file_raft_proto_msgTypes[5]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *ConfState) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*ConfState) ProtoMessage() {}

func (x *ConfState) ProtoReflect() protoreflect.Message {
	mi := &file_raft_proto_msgTypes[5]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use ConfState.ProtoReflect.Descriptor instead.
func (*ConfState) Descriptor() ([]byte, []int) {
	return file_raft_proto_rawDescGZIP(), []int{5}
}

func (x *ConfState) GetVoters() []uint64 {
	if x != nil {
		return x.Voters
	}
	return nil
}

func (x *ConfState) GetLearners() []uint64 {
	if x != nil {
		return x.Learners
	}
	return nil
}

func (x *ConfState) GetVotersOutgoing() []uint64 {
	if x != nil {
		return x.VotersOutgoing
	}
	return nil
}

func (x *ConfState) GetLearnersNext() []uint64 {
	if x != nil {
		return x.LearnersNext
	}
	return nil
}

func (x *ConfState) GetAutoLeave() bool {
	if x != nil && x.AutoLeave != nil {
		return *x.AutoLeave
	}
	return false
}

type ConfChange struct {
	state   protoimpl.MessageState `protogen:"open.v1"`
	Type    *ConfChangeType        `protobuf:"varint,2,opt,name=type,enum=raftpb.ConfChangeType" json:"type,omitempty"`
	NodeId  *uint64                `protobuf:"varint,3,opt,name=node_id,json=nodeId" json:"node_id,omitempty"`
	Context []byte                 `protobuf:"bytes,4,opt,name=context" json:"context,omitempty"`
	// NB: this is used only by etcd to thread through a unique identifier.
	// Ideally it should really use the Context instead. No counterpart to
	// this field exists in ConfChangeV2.
	Id            *uint64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *ConfChange) Reset() {
	*x = ConfChange{}
	mi := &file_raft_proto_msgTypes[6]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *ConfChange) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*ConfChange) ProtoMessage() {}

func (x *ConfChange) ProtoReflect() protoreflect.Message {
	mi := &file_raft_proto_msgTypes[6]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use ConfChange.ProtoReflect.Descriptor instead.
func (*ConfChange) Descriptor() ([]byte, []int) {
	return file_raft_proto_rawDescGZIP(), []int{6}
}

func (x *ConfChange) GetType() ConfChangeType {
	if x != nil && x.Type != nil {
		return *x.Type
	}
	return ConfChangeType_ConfChangeAddNode
}

func (x *ConfChange) GetNodeId() uint64 {
	if x != nil && x.NodeId != nil {
		return *x.NodeId
	}
	return 0
}

func (x *ConfChange) GetContext() []byte {
	if x != nil {
		return x.Context
	}
	return nil
}

func (x *ConfChange) GetId() uint64 {
	if x != nil && x.Id != nil {
		return *x.Id
	}
	return 0
}

// ConfChangeSingle is an individual configuration change operation. Multiple
// such operations can be carried out atomically via a ConfChangeV2.
type ConfChangeSingle struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Type          *ConfChangeType        `protobuf:"varint,1,opt,name=type,enum=raftpb.ConfChangeType" json:"type,omitempty"`
	NodeId        *uint64                `protobuf:"varint,2,opt,name=node_id,json=nodeId" json:"node_id,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *ConfChangeSingle) Reset() {
	*x = ConfChangeSingle{}
	mi := &file_raft_proto_msgTypes[7]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *ConfChangeSingle) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*ConfChangeSingle) ProtoMessage() {}

func (x *ConfChangeSingle) ProtoReflect() protoreflect.Message {
	mi := &file_raft_proto_msgTypes[7]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use ConfChangeSingle.ProtoReflect.Descriptor instead.
func (*ConfChangeSingle) Descriptor() ([]byte, []int) {
	return file_raft_proto_rawDescGZIP(), []int{7}
}

func (x *ConfChangeSingle) GetType() ConfChangeType {
	if x != nil && x.Type != nil {
		return *x.Type
	}
	return ConfChangeType_ConfChangeAddNode
}

func (x *ConfChangeSingle) GetNodeId() uint64 {
	if x != nil && x.NodeId != nil {
		return *x.NodeId
	}
	return 0
}

// ConfChangeV2 messages initiate configuration changes. They support both the
// simple "one at a time" membership change protocol and full Joint Consensus
// allowing for arbitrary changes in membership.
//
// The supplied context is treated as an opaque payload and can be used to
// attach an action on the state machine to the application of the config change
// proposal. Note that contrary to Joint Consensus as outlined in the Raft
// paper[1], configuration changes become active when they are *applied* to the
// state machine (not when they are appended to the log).
//
// The simple protocol can be used whenever only a single change is made.
//
// Non-simple changes require the use of Joint Consensus, for which two
// configuration changes are run. The first configuration change specifies the
// desired changes and transitions the Raft group into the joint configuration,
// in which quorum requires a majority of both the pre-changes and post-changes
// configuration. Joint Consensus avoids entering fragile intermediate
// configurations that could compromise survivability. For example, without the
// use of Joint Consensus and running across three availability zones with a
// replication factor of three, it is not possible to replace a voter without
// entering an intermediate configuration that does not survive the outage of
// one availability zone.
//
// The provided ConfChangeTransition specifies how (and whether) Joint Consensus
// is used, and assigns the task of leaving the joint configuration either to
// Raft or the application. Leaving the joint configuration is accomplished by
// proposing a ConfChangeV2 with only and optionally the Context field
// populated.
//
// For details on Raft membership changes, see:
//
// [1]: https://github.com/ongardie/dissertation/blob/master/online-trim.pdf
type ConfChangeV2 struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Transition    *ConfChangeTransition  `protobuf:"varint,1,opt,name=transition,enum=raftpb.ConfChangeTransition" json:"transition,omitempty"`
	Changes       []*ConfChangeSingle    `protobuf:"bytes,2,rep,name=changes" json:"changes,omitempty"`
	Context       []byte                 `protobuf:"bytes,3,opt,name=context" json:"context,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *ConfChangeV2) Reset() {
	*x = ConfChangeV2{}
	mi := &file_raft_proto_msgTypes[8]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *ConfChangeV2) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*ConfChangeV2) ProtoMessage() {}

func (x *ConfChangeV2) ProtoReflect() protoreflect.Message {
	mi := &file_raft_proto_msgTypes[8]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use ConfChangeV2.ProtoReflect.Descriptor instead.
func (*ConfChangeV2) Descriptor() ([]byte, []int) {
	return file_raft_proto_rawDescGZIP(), []int{8}
}

func (x *ConfChangeV2) GetTransition() ConfChangeTransition {
	if x != nil && x.Transition != nil {
		return *x.Transition
	}
	return ConfChangeTransition_ConfChangeTransitionAuto
}

func (x *ConfChangeV2) GetChanges() []*ConfChangeSingle {
	if x != nil {
		return x.Changes
	}
	return nil
}

func (x *ConfChangeV2) GetContext() []byte {
	if x != nil {
		return x.Context
	}
	return nil
}

var File_raft_proto protoreflect.FileDescriptor

const file_raft_proto_rawDesc = "" +
	"\n" +
	"\n" +
	"raft.proto\x12\x06raftpb\"l\n" +
	"\x05Entry\x12\x12\n" +
	"\x04Term\x18\x02 \x01(\x04R\x04Term\x12\x14\n" +
	"\x05Index\x18\x03 \x01(\x04R\x05Index\x12%\n" +
	"\x04Type\x18\x01 \x01(\x0e2\x11.raftpb.EntryTypeR\x04Type\x12\x12\n" +
	"\x04Data\x18\x04 \x01(\fR\x04Data\"n\n" +
	"\x10SnapshotMetadata\x120\n" +
	"\n" +
	"conf_state\x18\x01 \x01(\v2\x11.raftpb.ConfStateR\tconfState\x12\x14\n" +
	"\x05index\x18\x02 \x01(\x04R\x05index\x12\x12\n" +
	"\x04term\x18\x03 \x01(\x04R\x04term\"T\n" +
	"\bSnapshot\x12\x12\n" +
	"\x04data\x18\x01 \x01(\fR\x04data\x124\n" +
	"\bmetadata\x18\x02 \x01(\v2\x18.raftpb.SnapshotMetadataR\bmetadata\"\x9e\x03\n" +
	"\aMessage\x12'\n" +
	"\x04type\x18\x01 \x01(\x0e2\x13.raftpb.MessageTypeR\x04type\x12\x0e\n" +
	"\x02to\x18\x02 \x01(\x04R\x02to\x12\x12\n" +
	"\x04from\x18\x03 \x01(\x04R\x04from\x12\x12\n" +
	"\x04term\x18\x04 \x01(\x04R\x04term\x12\x18\n" +
	"\alogTerm\x18\x05 \x01(\x04R\alogTerm\x12\x14\n" +
	"\x05index\x18\x06 \x01(\x04R\x05index\x12'\n" +
	"\aentries\x18\a \x03(\v2\r.raftpb.EntryR\aentries\x12\x16\n" +
	"\x06commit\x18\b \x01(\x04R\x06commit\x12\x12\n" +
	"\x04vote\x18\r \x01(\x04R\x04vote\x12,\n" +
	"\bsnapshot\x18\t \x01(\v2\x10.raftpb.SnapshotR\bsnapshot\x12\x16\n" +
	"\x06reject\x18\n" +
	" \x01(\bR\x06reject\x12\x1e\n" +
	"\n" +
	"rejectHint\x18\v \x01(\x04R\n" +
	"rejectHint\x12\x18\n" +
	"\acontext\x18\f \x01(\fR\acontext\x12-\n" +
	"\tresponses\x18\x0e \x03(\v2\x0f.raftpb.MessageR\tresponses\"K\n" +
	"\tHardState\x12\x12\n" +
	"\x04term\x18\x01 \x01(\x04R\x04term\x12\x12\n" +
	"\x04vote\x18\x02 \x01(\x04R\x04vote\x12\x16\n" +
	"\x06commit\x18\x03 \x01(\x04R\x06commit\"\xac\x01\n" +
	"\tConfState\x12\x16\n" +
	"\x06voters\x18\x01 \x03(\x04R\x06voters\x12\x1a\n" +
	"\blearners\x18\x02 \x03(\x04R\blearners\x12'\n" +
	"\x0fvoters_outgoing\x18\x03 \x03(\x04R\x0evotersOutgoing\x12#\n" +
	"\rlearners_next\x18\x04 \x03(\x04R\flearnersNext\x12\x1d\n" +
	"\n" +
	"auto_leave\x18\x05 \x01(\bR\tautoLeave\"{\n" +
	"\n" +
	"ConfChange\x12*\n" +
	"\x04type\x18\x02 \x01(\x0e2\x16.raftpb.ConfChangeTypeR\x04type\x12\x17\n" +
	"\anode_id\x18\x03 \x01(\x04R\x06nodeId\x12\x18\n" +
	"\acontext\x18\x04 \x01(\fR\acontext\x12\x0e\n" +
	"\x02id\x18\x01 \x01(\x04R\x02id\"W\n" +
	"\x10ConfChangeSingle\x12*\n" +
	"\x04type\x18\x01 \x01(\x0e2\x16.raftpb.ConfChangeTypeR\x04type\x12\x17\n" +
	"\anode_id\x18\x02 \x01(\x04R\x06nodeId\"\x9a\x01\n" +
	"\fConfChangeV2\x12<\n" +
	"\n" +
	"transition\x18\x01 \x01(\x0e2\x1c.raftpb.ConfChangeTransitionR\n" +
	"transition\x122\n" +
	"\achanges\x18\x02 \x03(\v2\x18.raftpb.ConfChangeSingleR\achanges\x12\x18\n" +
	"\acontext\x18\x03 \x01(\fR\acontext*H\n" +
	"\tEntryType\x12\x0f\n" +
	"\vEntryNormal\x10\x00\x12\x13\n" +
	"\x0fEntryConfChange\x10\x01\x12\x15\n" +
	"\x11EntryConfChangeV2\x10\x02*\xc6\x03\n" +
	"\vMessageType\x12\n" +
	"\n" +
	"\x06MsgHup\x10\x00\x12\v\n" +
	"\aMsgBeat\x10\x01\x12\v\n" +
	"\aMsgProp\x10\x02\x12\n" +
	"\n" +
	"\x06MsgApp\x10\x03\x12\x0e\n" +
	"\n" +
	"MsgAppResp\x10\x04\x12\v\n" +
	"\aMsgVote\x10\x05\x12\x0f\n" +
	"\vMsgVoteResp\x10\x06\x12\v\n" +
	"\aMsgSnap\x10\a\x12\x10\n" +
	"\fMsgHeartbeat\x10\b\x12\x14\n" +
	"\x10MsgHeartbeatResp\x10\t\x12\x12\n" +
	"\x0eMsgUnreachable\x10\n" +
	"\x12\x11\n" +
	"\rMsgSnapStatus\x10\v\x12\x12\n" +
	"\x0eMsgCheckQuorum\x10\f\x12\x15\n" +
	"\x11MsgTransferLeader\x10\r\x12\x11\n" +
	"\rMsgTimeoutNow\x10\x0e\x12\x10\n" +
	"\fMsgReadIndex\x10\x0f\x12\x14\n" +
	"\x10MsgReadIndexResp\x10\x10\x12\x0e\n" +
	"\n" +
	"MsgPreVote\x10\x11\x12\x12\n" +
	"\x0eMsgPreVoteResp\x10\x12\x12\x14\n" +
	"\x10MsgStorageAppend\x10\x13\x12\x18\n" +
	"\x14MsgStorageAppendResp\x10\x14\x12\x13\n" +
	"\x0fMsgStorageApply\x10\x15\x12\x17\n" +
	"\x13MsgStorageApplyResp\x10\x16\x12\x13\n" +
	"\x0fMsgForgetLeader\x10\x17*\x82\x01\n" +
	"\x14ConfChangeTransition\x12\x1c\n" +
	"\x18ConfChangeTransitionAuto\x10\x00\x12%\n" +
	"!ConfChangeTransitionJointImplicit\x10\x01\x12%\n" +
	"!ConfChangeTransitionJointExplicit\x10\x02*y\n" +
	"\x0eConfChangeType\x12\x15\n" +
	"\x11ConfChangeAddNode\x10\x00\x12\x18\n" +
	"\x14ConfChangeRemoveNode\x10\x01\x12\x18\n" +
	"\x14ConfChangeUpdateNode\x10\x02\x12\x1c\n" +
	"\x18ConfChangeAddLearnerNode\x10\x03B\x1bZ\x19go.etcd.io/raft/v3/raftpb"

var (
	file_raft_proto_rawDescOnce sync.Once
	file_raft_proto_rawDescData []byte
)

func file_raft_proto_rawDescGZIP() []byte {
	file_raft_proto_rawDescOnce.Do(func() {
		file_raft_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_raft_proto_rawDesc), len(file_raft_proto_rawDesc)))
	})
	return file_raft_proto_rawDescData
}

var file_raft_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
var file_raft_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_raft_proto_goTypes = []any{
	(EntryType)(0),            // 0: raftpb.EntryType
	(MessageType)(0),          // 1: raftpb.MessageType
	(ConfChangeTransition)(0), // 2: raftpb.ConfChangeTransition
	(ConfChangeType)(0),       // 3: raftpb.ConfChangeType
	(*Entry)(nil),             // 4: raftpb.Entry
	(*SnapshotMetadata)(nil),  // 5: raftpb.SnapshotMetadata
	(*Snapshot)(nil),          // 6: raftpb.Snapshot
	(*Message)(nil),           // 7: raftpb.Message
	(*HardState)(nil),         // 8: raftpb.HardState
	(*ConfState)(nil),         // 9: raftpb.ConfState
	(*ConfChange)(nil),        // 10: raftpb.ConfChange
	(*ConfChangeSingle)(nil),  // 11: raftpb.ConfChangeSingle
	(*ConfChangeV2)(nil),      // 12: raftpb.ConfChangeV2
}
var file_raft_proto_depIdxs = []int32{
	0,  // 0: raftpb.Entry.Type:type_name -> raftpb.EntryType
	9,  // 1: raftpb.SnapshotMetadata.conf_state:type_name -> raftpb.ConfState
	5,  // 2: raftpb.Snapshot.metadata:type_name -> raftpb.SnapshotMetadata
	1,  // 3: raftpb.Message.type:type_name -> raftpb.MessageType
	4,  // 4: raftpb.Message.entries:type_name -> raftpb.Entry
	6,  // 5: raftpb.Message.snapshot:type_name -> raftpb.Snapshot
	7,  // 6: raftpb.Message.responses:type_name -> raftpb.Message
	3,  // 7: raftpb.ConfChange.type:type_name -> raftpb.ConfChangeType
	3,  // 8: raftpb.ConfChangeSingle.type:type_name -> raftpb.ConfChangeType
	2,  // 9: raftpb.ConfChangeV2.transition:type_name -> raftpb.ConfChangeTransition
	11, // 10: raftpb.ConfChangeV2.changes:type_name -> raftpb.ConfChangeSingle
	11, // [11:11] is the sub-list for method output_type
	11, // [11:11] is the sub-list for method input_type
	11, // [11:11] is the sub-list for extension type_name
	11, // [11:11] is the sub-list for extension extendee
	0,  // [0:11] is the sub-list for field type_name
}

func init() { file_raft_proto_init() }
func file_raft_proto_init() {
	if File_raft_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_raft_proto_rawDesc), len(file_raft_proto_rawDesc)),
			NumEnums:      4,
			NumMessages:   9,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_raft_proto_goTypes,
		DependencyIndexes: file_raft_proto_depIdxs,
		EnumInfos:         file_raft_proto_enumTypes,
		MessageInfos:      file_raft_proto_msgTypes,
	}.Build()
	File_raft_proto = out.File
	file_raft_proto_goTypes = nil
	file_raft_proto_depIdxs = nil
}
