// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        v3.21.12
// source: consensus/consensusproto/protos/consensus.proto

package consensusproto

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

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 ErrCodes int32

const (
	ErrCodes_Unexpected     ErrCodes = 0
	ErrCodes_LogExists      ErrCodes = 1
	ErrCodes_LogNotFound    ErrCodes = 2
	ErrCodes_RecordConflict ErrCodes = 3
	ErrCodes_Forbidden      ErrCodes = 4
	ErrCodes_InvalidPayload ErrCodes = 5
	ErrCodes_ErrorOffset    ErrCodes = 500
)

// Enum value maps for ErrCodes.
var (
	ErrCodes_name = map[int32]string{
		0:   "Unexpected",
		1:   "LogExists",
		2:   "LogNotFound",
		3:   "RecordConflict",
		4:   "Forbidden",
		5:   "InvalidPayload",
		500: "ErrorOffset",
	}
	ErrCodes_value = map[string]int32{
		"Unexpected":     0,
		"LogExists":      1,
		"LogNotFound":    2,
		"RecordConflict": 3,
		"Forbidden":      4,
		"InvalidPayload": 5,
		"ErrorOffset":    500,
	}
)

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

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

func (ErrCodes) Descriptor() protoreflect.EnumDescriptor {
	return file_consensus_consensusproto_protos_consensus_proto_enumTypes[0].Descriptor()
}

func (ErrCodes) Type() protoreflect.EnumType {
	return &file_consensus_consensusproto_protos_consensus_proto_enumTypes[0]
}

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

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

type Log struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Id            string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Records       []*RawRecordWithId     `protobuf:"bytes,3,rep,name=records,proto3" json:"records,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Log) ProtoMessage() {}

func (x *Log) ProtoReflect() protoreflect.Message {
	mi := &file_consensus_consensusproto_protos_consensus_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 Log.ProtoReflect.Descriptor instead.
func (*Log) Descriptor() ([]byte, []int) {
	return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{0}
}

func (x *Log) GetId() string {
	if x != nil {
		return x.Id
	}
	return ""
}

func (x *Log) GetRecords() []*RawRecordWithId {
	if x != nil {
		return x.Records
	}
	return nil
}

// RawRecord is a proto message containing the payload in bytes, signature of the account who added it and signature of the acceptor
type RawRecord struct {
	state             protoimpl.MessageState `protogen:"open.v1"`
	Payload           []byte                 `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	Signature         []byte                 `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	AcceptorIdentity  []byte                 `protobuf:"bytes,3,opt,name=acceptorIdentity,proto3" json:"acceptorIdentity,omitempty"`
	AcceptorSignature []byte                 `protobuf:"bytes,4,opt,name=acceptorSignature,proto3" json:"acceptorSignature,omitempty"`
	AcceptorTimestamp int64                  `protobuf:"varint,5,opt,name=acceptorTimestamp,proto3" json:"acceptorTimestamp,omitempty"`
	unknownFields     protoimpl.UnknownFields
	sizeCache         protoimpl.SizeCache
}

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

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

func (*RawRecord) ProtoMessage() {}

func (x *RawRecord) ProtoReflect() protoreflect.Message {
	mi := &file_consensus_consensusproto_protos_consensus_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 RawRecord.ProtoReflect.Descriptor instead.
func (*RawRecord) Descriptor() ([]byte, []int) {
	return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{1}
}

func (x *RawRecord) GetPayload() []byte {
	if x != nil {
		return x.Payload
	}
	return nil
}

func (x *RawRecord) GetSignature() []byte {
	if x != nil {
		return x.Signature
	}
	return nil
}

func (x *RawRecord) GetAcceptorIdentity() []byte {
	if x != nil {
		return x.AcceptorIdentity
	}
	return nil
}

func (x *RawRecord) GetAcceptorSignature() []byte {
	if x != nil {
		return x.AcceptorSignature
	}
	return nil
}

func (x *RawRecord) GetAcceptorTimestamp() int64 {
	if x != nil {
		return x.AcceptorTimestamp
	}
	return 0
}

// RawRecordWithId is a raw record and the id for convenience
type RawRecordWithId struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Payload       []byte                 `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	Id            string                 `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*RawRecordWithId) ProtoMessage() {}

func (x *RawRecordWithId) ProtoReflect() protoreflect.Message {
	mi := &file_consensus_consensusproto_protos_consensus_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 RawRecordWithId.ProtoReflect.Descriptor instead.
func (*RawRecordWithId) Descriptor() ([]byte, []int) {
	return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{2}
}

func (x *RawRecordWithId) GetPayload() []byte {
	if x != nil {
		return x.Payload
	}
	return nil
}

func (x *RawRecordWithId) GetId() string {
	if x != nil {
		return x.Id
	}
	return ""
}

// Record is a record containing a data
type Record struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	PrevId        string                 `protobuf:"bytes,1,opt,name=prevId,proto3" json:"prevId,omitempty"`
	Identity      []byte                 `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"`
	Data          []byte                 `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	Timestamp     int64                  `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Record) ProtoMessage() {}

func (x *Record) ProtoReflect() protoreflect.Message {
	mi := &file_consensus_consensusproto_protos_consensus_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 Record.ProtoReflect.Descriptor instead.
func (*Record) Descriptor() ([]byte, []int) {
	return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{3}
}

func (x *Record) GetPrevId() string {
	if x != nil {
		return x.PrevId
	}
	return ""
}

func (x *Record) GetIdentity() []byte {
	if x != nil {
		return x.Identity
	}
	return nil
}

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

func (x *Record) GetTimestamp() int64 {
	if x != nil {
		return x.Timestamp
	}
	return 0
}

type Ok struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Ok) ProtoMessage() {}

func (x *Ok) ProtoReflect() protoreflect.Message {
	mi := &file_consensus_consensusproto_protos_consensus_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 Ok.ProtoReflect.Descriptor instead.
func (*Ok) Descriptor() ([]byte, []int) {
	return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{4}
}

type LogAddRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	LogId string                 `protobuf:"bytes,1,opt,name=logId,proto3" json:"logId,omitempty"`
	// first record in the log, consensus node not sign it
	Record        *RawRecordWithId `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*LogAddRequest) ProtoMessage() {}

func (x *LogAddRequest) ProtoReflect() protoreflect.Message {
	mi := &file_consensus_consensusproto_protos_consensus_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 LogAddRequest.ProtoReflect.Descriptor instead.
func (*LogAddRequest) Descriptor() ([]byte, []int) {
	return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{5}
}

func (x *LogAddRequest) GetLogId() string {
	if x != nil {
		return x.LogId
	}
	return ""
}

func (x *LogAddRequest) GetRecord() *RawRecordWithId {
	if x != nil {
		return x.Record
	}
	return nil
}

type RecordAddRequest struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	LogId         string                 `protobuf:"bytes,1,opt,name=logId,proto3" json:"logId,omitempty"`
	Record        *RawRecord             `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*RecordAddRequest) ProtoMessage() {}

func (x *RecordAddRequest) ProtoReflect() protoreflect.Message {
	mi := &file_consensus_consensusproto_protos_consensus_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 RecordAddRequest.ProtoReflect.Descriptor instead.
func (*RecordAddRequest) Descriptor() ([]byte, []int) {
	return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{6}
}

func (x *RecordAddRequest) GetLogId() string {
	if x != nil {
		return x.LogId
	}
	return ""
}

func (x *RecordAddRequest) GetRecord() *RawRecord {
	if x != nil {
		return x.Record
	}
	return nil
}

type LogWatchRequest struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	WatchIds      []string               `protobuf:"bytes,1,rep,name=watchIds,proto3" json:"watchIds,omitempty"`
	UnwatchIds    []string               `protobuf:"bytes,2,rep,name=unwatchIds,proto3" json:"unwatchIds,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*LogWatchRequest) ProtoMessage() {}

func (x *LogWatchRequest) ProtoReflect() protoreflect.Message {
	mi := &file_consensus_consensusproto_protos_consensus_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 LogWatchRequest.ProtoReflect.Descriptor instead.
func (*LogWatchRequest) Descriptor() ([]byte, []int) {
	return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{7}
}

func (x *LogWatchRequest) GetWatchIds() []string {
	if x != nil {
		return x.WatchIds
	}
	return nil
}

func (x *LogWatchRequest) GetUnwatchIds() []string {
	if x != nil {
		return x.UnwatchIds
	}
	return nil
}

type LogWatchEvent struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	LogId         string                 `protobuf:"bytes,1,opt,name=logId,proto3" json:"logId,omitempty"`
	Records       []*RawRecordWithId     `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"`
	Error         *Err                   `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*LogWatchEvent) ProtoMessage() {}

func (x *LogWatchEvent) ProtoReflect() protoreflect.Message {
	mi := &file_consensus_consensusproto_protos_consensus_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 LogWatchEvent.ProtoReflect.Descriptor instead.
func (*LogWatchEvent) Descriptor() ([]byte, []int) {
	return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{8}
}

func (x *LogWatchEvent) GetLogId() string {
	if x != nil {
		return x.LogId
	}
	return ""
}

func (x *LogWatchEvent) GetRecords() []*RawRecordWithId {
	if x != nil {
		return x.Records
	}
	return nil
}

func (x *LogWatchEvent) GetError() *Err {
	if x != nil {
		return x.Error
	}
	return nil
}

type LogDeleteRequest struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	LogId         string                 `protobuf:"bytes,1,opt,name=logId,proto3" json:"logId,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *LogDeleteRequest) Reset() {
	*x = LogDeleteRequest{}
	mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[9]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*LogDeleteRequest) ProtoMessage() {}

func (x *LogDeleteRequest) ProtoReflect() protoreflect.Message {
	mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[9]
	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 LogDeleteRequest.ProtoReflect.Descriptor instead.
func (*LogDeleteRequest) Descriptor() ([]byte, []int) {
	return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{9}
}

func (x *LogDeleteRequest) GetLogId() string {
	if x != nil {
		return x.LogId
	}
	return ""
}

type Err struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Error         ErrCodes               `protobuf:"varint,1,opt,name=error,proto3,enum=consensusProto.ErrCodes" json:"error,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Err) Reset() {
	*x = Err{}
	mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[10]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*Err) ProtoMessage() {}

func (x *Err) ProtoReflect() protoreflect.Message {
	mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[10]
	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 Err.ProtoReflect.Descriptor instead.
func (*Err) Descriptor() ([]byte, []int) {
	return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{10}
}

func (x *Err) GetError() ErrCodes {
	if x != nil {
		return x.Error
	}
	return ErrCodes_Unexpected
}

// LogSyncContentValue provides different types for log sync
type LogSyncContentValue struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to Value:
	//
	//	*LogSyncContentValue_HeadUpdate
	//	*LogSyncContentValue_FullSyncRequest
	//	*LogSyncContentValue_FullSyncResponse
	Value         isLogSyncContentValue_Value `protobuf_oneof:"value"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *LogSyncContentValue) Reset() {
	*x = LogSyncContentValue{}
	mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[11]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*LogSyncContentValue) ProtoMessage() {}

func (x *LogSyncContentValue) ProtoReflect() protoreflect.Message {
	mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[11]
	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 LogSyncContentValue.ProtoReflect.Descriptor instead.
func (*LogSyncContentValue) Descriptor() ([]byte, []int) {
	return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{11}
}

func (x *LogSyncContentValue) GetValue() isLogSyncContentValue_Value {
	if x != nil {
		return x.Value
	}
	return nil
}

func (x *LogSyncContentValue) GetHeadUpdate() *LogHeadUpdate {
	if x != nil {
		if x, ok := x.Value.(*LogSyncContentValue_HeadUpdate); ok {
			return x.HeadUpdate
		}
	}
	return nil
}

func (x *LogSyncContentValue) GetFullSyncRequest() *LogFullSyncRequest {
	if x != nil {
		if x, ok := x.Value.(*LogSyncContentValue_FullSyncRequest); ok {
			return x.FullSyncRequest
		}
	}
	return nil
}

func (x *LogSyncContentValue) GetFullSyncResponse() *LogFullSyncResponse {
	if x != nil {
		if x, ok := x.Value.(*LogSyncContentValue_FullSyncResponse); ok {
			return x.FullSyncResponse
		}
	}
	return nil
}

type isLogSyncContentValue_Value interface {
	isLogSyncContentValue_Value()
}

type LogSyncContentValue_HeadUpdate struct {
	HeadUpdate *LogHeadUpdate `protobuf:"bytes,1,opt,name=headUpdate,proto3,oneof"`
}

type LogSyncContentValue_FullSyncRequest struct {
	FullSyncRequest *LogFullSyncRequest `protobuf:"bytes,2,opt,name=fullSyncRequest,proto3,oneof"`
}

type LogSyncContentValue_FullSyncResponse struct {
	FullSyncResponse *LogFullSyncResponse `protobuf:"bytes,3,opt,name=fullSyncResponse,proto3,oneof"`
}

func (*LogSyncContentValue_HeadUpdate) isLogSyncContentValue_Value() {}

func (*LogSyncContentValue_FullSyncRequest) isLogSyncContentValue_Value() {}

func (*LogSyncContentValue_FullSyncResponse) isLogSyncContentValue_Value() {}

// LogSyncMessage is a message sent when we are syncing logs
type LogSyncMessage struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Id            string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Payload       []byte                 `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	Content       *LogSyncContentValue   `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *LogSyncMessage) Reset() {
	*x = LogSyncMessage{}
	mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[12]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*LogSyncMessage) ProtoMessage() {}

func (x *LogSyncMessage) ProtoReflect() protoreflect.Message {
	mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[12]
	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 LogSyncMessage.ProtoReflect.Descriptor instead.
func (*LogSyncMessage) Descriptor() ([]byte, []int) {
	return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{12}
}

func (x *LogSyncMessage) GetId() string {
	if x != nil {
		return x.Id
	}
	return ""
}

func (x *LogSyncMessage) GetPayload() []byte {
	if x != nil {
		return x.Payload
	}
	return nil
}

func (x *LogSyncMessage) GetContent() *LogSyncContentValue {
	if x != nil {
		return x.Content
	}
	return nil
}

// LogHeadUpdate is a message sent on consensus log head update
type LogHeadUpdate struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Head          string                 `protobuf:"bytes,1,opt,name=head,proto3" json:"head,omitempty"`
	Records       []*RawRecordWithId     `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *LogHeadUpdate) Reset() {
	*x = LogHeadUpdate{}
	mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[13]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*LogHeadUpdate) ProtoMessage() {}

func (x *LogHeadUpdate) ProtoReflect() protoreflect.Message {
	mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[13]
	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 LogHeadUpdate.ProtoReflect.Descriptor instead.
func (*LogHeadUpdate) Descriptor() ([]byte, []int) {
	return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{13}
}

func (x *LogHeadUpdate) GetHead() string {
	if x != nil {
		return x.Head
	}
	return ""
}

func (x *LogHeadUpdate) GetRecords() []*RawRecordWithId {
	if x != nil {
		return x.Records
	}
	return nil
}

// LogFullSyncRequest is a message sent when consensus log needs full sync
type LogFullSyncRequest struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Head          string                 `protobuf:"bytes,1,opt,name=head,proto3" json:"head,omitempty"`
	Records       []*RawRecordWithId     `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *LogFullSyncRequest) Reset() {
	*x = LogFullSyncRequest{}
	mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[14]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*LogFullSyncRequest) ProtoMessage() {}

func (x *LogFullSyncRequest) ProtoReflect() protoreflect.Message {
	mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[14]
	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 LogFullSyncRequest.ProtoReflect.Descriptor instead.
func (*LogFullSyncRequest) Descriptor() ([]byte, []int) {
	return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{14}
}

func (x *LogFullSyncRequest) GetHead() string {
	if x != nil {
		return x.Head
	}
	return ""
}

func (x *LogFullSyncRequest) GetRecords() []*RawRecordWithId {
	if x != nil {
		return x.Records
	}
	return nil
}

// LogFullSyncResponse is a message sent as a response for a specific full sync
type LogFullSyncResponse struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Head          string                 `protobuf:"bytes,1,opt,name=head,proto3" json:"head,omitempty"`
	Records       []*RawRecordWithId     `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *LogFullSyncResponse) Reset() {
	*x = LogFullSyncResponse{}
	mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[15]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*LogFullSyncResponse) ProtoMessage() {}

func (x *LogFullSyncResponse) ProtoReflect() protoreflect.Message {
	mi := &file_consensus_consensusproto_protos_consensus_proto_msgTypes[15]
	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 LogFullSyncResponse.ProtoReflect.Descriptor instead.
func (*LogFullSyncResponse) Descriptor() ([]byte, []int) {
	return file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP(), []int{15}
}

func (x *LogFullSyncResponse) GetHead() string {
	if x != nil {
		return x.Head
	}
	return ""
}

func (x *LogFullSyncResponse) GetRecords() []*RawRecordWithId {
	if x != nil {
		return x.Records
	}
	return nil
}

var File_consensus_consensusproto_protos_consensus_proto protoreflect.FileDescriptor

const file_consensus_consensusproto_protos_consensus_proto_rawDesc = "" +
	"\n" +
	"/consensus/consensusproto/protos/consensus.proto\x12\x0econsensusProto\"P\n" +
	"\x03Log\x12\x0e\n" +
	"\x02id\x18\x01 \x01(\tR\x02id\x129\n" +
	"\arecords\x18\x03 \x03(\v2\x1f.consensusProto.RawRecordWithIdR\arecords\"\xcb\x01\n" +
	"\tRawRecord\x12\x18\n" +
	"\apayload\x18\x01 \x01(\fR\apayload\x12\x1c\n" +
	"\tsignature\x18\x02 \x01(\fR\tsignature\x12*\n" +
	"\x10acceptorIdentity\x18\x03 \x01(\fR\x10acceptorIdentity\x12,\n" +
	"\x11acceptorSignature\x18\x04 \x01(\fR\x11acceptorSignature\x12,\n" +
	"\x11acceptorTimestamp\x18\x05 \x01(\x03R\x11acceptorTimestamp\";\n" +
	"\x0fRawRecordWithId\x12\x18\n" +
	"\apayload\x18\x01 \x01(\fR\apayload\x12\x0e\n" +
	"\x02id\x18\x02 \x01(\tR\x02id\"n\n" +
	"\x06Record\x12\x16\n" +
	"\x06prevId\x18\x01 \x01(\tR\x06prevId\x12\x1a\n" +
	"\bidentity\x18\x02 \x01(\fR\bidentity\x12\x12\n" +
	"\x04data\x18\x03 \x01(\fR\x04data\x12\x1c\n" +
	"\ttimestamp\x18\x04 \x01(\x03R\ttimestamp\"\x04\n" +
	"\x02Ok\"^\n" +
	"\rLogAddRequest\x12\x14\n" +
	"\x05logId\x18\x01 \x01(\tR\x05logId\x127\n" +
	"\x06record\x18\x02 \x01(\v2\x1f.consensusProto.RawRecordWithIdR\x06record\"[\n" +
	"\x10RecordAddRequest\x12\x14\n" +
	"\x05logId\x18\x01 \x01(\tR\x05logId\x121\n" +
	"\x06record\x18\x02 \x01(\v2\x19.consensusProto.RawRecordR\x06record\"M\n" +
	"\x0fLogWatchRequest\x12\x1a\n" +
	"\bwatchIds\x18\x01 \x03(\tR\bwatchIds\x12\x1e\n" +
	"\n" +
	"unwatchIds\x18\x02 \x03(\tR\n" +
	"unwatchIds\"\x8b\x01\n" +
	"\rLogWatchEvent\x12\x14\n" +
	"\x05logId\x18\x01 \x01(\tR\x05logId\x129\n" +
	"\arecords\x18\x02 \x03(\v2\x1f.consensusProto.RawRecordWithIdR\arecords\x12)\n" +
	"\x05error\x18\x03 \x01(\v2\x13.consensusProto.ErrR\x05error\"(\n" +
	"\x10LogDeleteRequest\x12\x14\n" +
	"\x05logId\x18\x01 \x01(\tR\x05logId\"5\n" +
	"\x03Err\x12.\n" +
	"\x05error\x18\x01 \x01(\x0e2\x18.consensusProto.ErrCodesR\x05error\"\x82\x02\n" +
	"\x13LogSyncContentValue\x12?\n" +
	"\n" +
	"headUpdate\x18\x01 \x01(\v2\x1d.consensusProto.LogHeadUpdateH\x00R\n" +
	"headUpdate\x12N\n" +
	"\x0ffullSyncRequest\x18\x02 \x01(\v2\".consensusProto.LogFullSyncRequestH\x00R\x0ffullSyncRequest\x12Q\n" +
	"\x10fullSyncResponse\x18\x03 \x01(\v2#.consensusProto.LogFullSyncResponseH\x00R\x10fullSyncResponseB\a\n" +
	"\x05value\"y\n" +
	"\x0eLogSyncMessage\x12\x0e\n" +
	"\x02id\x18\x01 \x01(\tR\x02id\x12\x18\n" +
	"\apayload\x18\x02 \x01(\fR\apayload\x12=\n" +
	"\acontent\x18\x03 \x01(\v2#.consensusProto.LogSyncContentValueR\acontent\"^\n" +
	"\rLogHeadUpdate\x12\x12\n" +
	"\x04head\x18\x01 \x01(\tR\x04head\x129\n" +
	"\arecords\x18\x02 \x03(\v2\x1f.consensusProto.RawRecordWithIdR\arecords\"c\n" +
	"\x12LogFullSyncRequest\x12\x12\n" +
	"\x04head\x18\x01 \x01(\tR\x04head\x129\n" +
	"\arecords\x18\x02 \x03(\v2\x1f.consensusProto.RawRecordWithIdR\arecords\"d\n" +
	"\x13LogFullSyncResponse\x12\x12\n" +
	"\x04head\x18\x01 \x01(\tR\x04head\x129\n" +
	"\arecords\x18\x02 \x03(\v2\x1f.consensusProto.RawRecordWithIdR\arecords*\x83\x01\n" +
	"\bErrCodes\x12\x0e\n" +
	"\n" +
	"Unexpected\x10\x00\x12\r\n" +
	"\tLogExists\x10\x01\x12\x0f\n" +
	"\vLogNotFound\x10\x02\x12\x12\n" +
	"\x0eRecordConflict\x10\x03\x12\r\n" +
	"\tForbidden\x10\x04\x12\x12\n" +
	"\x0eInvalidPayload\x10\x05\x12\x10\n" +
	"\vErrorOffset\x10\xf4\x032\xab\x02\n" +
	"\tConsensus\x12;\n" +
	"\x06LogAdd\x12\x1d.consensusProto.LogAddRequest\x1a\x12.consensusProto.Ok\x12N\n" +
	"\tRecordAdd\x12 .consensusProto.RecordAddRequest\x1a\x1f.consensusProto.RawRecordWithId\x12N\n" +
	"\bLogWatch\x12\x1f.consensusProto.LogWatchRequest\x1a\x1d.consensusProto.LogWatchEvent(\x010\x01\x12A\n" +
	"\tLogDelete\x12 .consensusProto.LogDeleteRequest\x1a\x12.consensusProto.OkB\x1aZ\x18consensus/consensusprotob\x06proto3"

var (
	file_consensus_consensusproto_protos_consensus_proto_rawDescOnce sync.Once
	file_consensus_consensusproto_protos_consensus_proto_rawDescData []byte
)

func file_consensus_consensusproto_protos_consensus_proto_rawDescGZIP() []byte {
	file_consensus_consensusproto_protos_consensus_proto_rawDescOnce.Do(func() {
		file_consensus_consensusproto_protos_consensus_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_consensus_consensusproto_protos_consensus_proto_rawDesc), len(file_consensus_consensusproto_protos_consensus_proto_rawDesc)))
	})
	return file_consensus_consensusproto_protos_consensus_proto_rawDescData
}

var file_consensus_consensusproto_protos_consensus_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_consensus_consensusproto_protos_consensus_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
var file_consensus_consensusproto_protos_consensus_proto_goTypes = []any{
	(ErrCodes)(0),               // 0: consensusProto.ErrCodes
	(*Log)(nil),                 // 1: consensusProto.Log
	(*RawRecord)(nil),           // 2: consensusProto.RawRecord
	(*RawRecordWithId)(nil),     // 3: consensusProto.RawRecordWithId
	(*Record)(nil),              // 4: consensusProto.Record
	(*Ok)(nil),                  // 5: consensusProto.Ok
	(*LogAddRequest)(nil),       // 6: consensusProto.LogAddRequest
	(*RecordAddRequest)(nil),    // 7: consensusProto.RecordAddRequest
	(*LogWatchRequest)(nil),     // 8: consensusProto.LogWatchRequest
	(*LogWatchEvent)(nil),       // 9: consensusProto.LogWatchEvent
	(*LogDeleteRequest)(nil),    // 10: consensusProto.LogDeleteRequest
	(*Err)(nil),                 // 11: consensusProto.Err
	(*LogSyncContentValue)(nil), // 12: consensusProto.LogSyncContentValue
	(*LogSyncMessage)(nil),      // 13: consensusProto.LogSyncMessage
	(*LogHeadUpdate)(nil),       // 14: consensusProto.LogHeadUpdate
	(*LogFullSyncRequest)(nil),  // 15: consensusProto.LogFullSyncRequest
	(*LogFullSyncResponse)(nil), // 16: consensusProto.LogFullSyncResponse
}
var file_consensus_consensusproto_protos_consensus_proto_depIdxs = []int32{
	3,  // 0: consensusProto.Log.records:type_name -> consensusProto.RawRecordWithId
	3,  // 1: consensusProto.LogAddRequest.record:type_name -> consensusProto.RawRecordWithId
	2,  // 2: consensusProto.RecordAddRequest.record:type_name -> consensusProto.RawRecord
	3,  // 3: consensusProto.LogWatchEvent.records:type_name -> consensusProto.RawRecordWithId
	11, // 4: consensusProto.LogWatchEvent.error:type_name -> consensusProto.Err
	0,  // 5: consensusProto.Err.error:type_name -> consensusProto.ErrCodes
	14, // 6: consensusProto.LogSyncContentValue.headUpdate:type_name -> consensusProto.LogHeadUpdate
	15, // 7: consensusProto.LogSyncContentValue.fullSyncRequest:type_name -> consensusProto.LogFullSyncRequest
	16, // 8: consensusProto.LogSyncContentValue.fullSyncResponse:type_name -> consensusProto.LogFullSyncResponse
	12, // 9: consensusProto.LogSyncMessage.content:type_name -> consensusProto.LogSyncContentValue
	3,  // 10: consensusProto.LogHeadUpdate.records:type_name -> consensusProto.RawRecordWithId
	3,  // 11: consensusProto.LogFullSyncRequest.records:type_name -> consensusProto.RawRecordWithId
	3,  // 12: consensusProto.LogFullSyncResponse.records:type_name -> consensusProto.RawRecordWithId
	6,  // 13: consensusProto.Consensus.LogAdd:input_type -> consensusProto.LogAddRequest
	7,  // 14: consensusProto.Consensus.RecordAdd:input_type -> consensusProto.RecordAddRequest
	8,  // 15: consensusProto.Consensus.LogWatch:input_type -> consensusProto.LogWatchRequest
	10, // 16: consensusProto.Consensus.LogDelete:input_type -> consensusProto.LogDeleteRequest
	5,  // 17: consensusProto.Consensus.LogAdd:output_type -> consensusProto.Ok
	3,  // 18: consensusProto.Consensus.RecordAdd:output_type -> consensusProto.RawRecordWithId
	9,  // 19: consensusProto.Consensus.LogWatch:output_type -> consensusProto.LogWatchEvent
	5,  // 20: consensusProto.Consensus.LogDelete:output_type -> consensusProto.Ok
	17, // [17:21] is the sub-list for method output_type
	13, // [13:17] is the sub-list for method input_type
	13, // [13:13] is the sub-list for extension type_name
	13, // [13:13] is the sub-list for extension extendee
	0,  // [0:13] is the sub-list for field type_name
}

func init() { file_consensus_consensusproto_protos_consensus_proto_init() }
func file_consensus_consensusproto_protos_consensus_proto_init() {
	if File_consensus_consensusproto_protos_consensus_proto != nil {
		return
	}
	file_consensus_consensusproto_protos_consensus_proto_msgTypes[11].OneofWrappers = []any{
		(*LogSyncContentValue_HeadUpdate)(nil),
		(*LogSyncContentValue_FullSyncRequest)(nil),
		(*LogSyncContentValue_FullSyncResponse)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_consensus_consensusproto_protos_consensus_proto_rawDesc), len(file_consensus_consensusproto_protos_consensus_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   16,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_consensus_consensusproto_protos_consensus_proto_goTypes,
		DependencyIndexes: file_consensus_consensusproto_protos_consensus_proto_depIdxs,
		EnumInfos:         file_consensus_consensusproto_protos_consensus_proto_enumTypes,
		MessageInfos:      file_consensus_consensusproto_protos_consensus_proto_msgTypes,
	}.Build()
	File_consensus_consensusproto_protos_consensus_proto = out.File
	file_consensus_consensusproto_protos_consensus_proto_goTypes = nil
	file_consensus_consensusproto_protos_consensus_proto_depIdxs = nil
}
