// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: proto.proto

package storage

import (
	fmt "fmt"
	proto "github.com/golang/protobuf/proto"
	io "io"
	math "math"
	math_bits "math/bits"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package

type Op int32

const (
	Op_None    Op = 0
	Op_Modify  Op = 1
	Op_Del     Op = 2
	Op_Discard Op = 3
)

var Op_name = map[int32]string{
	0: "None",
	1: "Modify",
	2: "Del",
	3: "Discard",
}

var Op_value = map[string]int32{
	"None":    0,
	"Modify":  1,
	"Del":     2,
	"Discard": 3,
}

func (x Op) String() string {
	return proto.EnumName(Op_name, int32(x))
}

func (Op) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_2fcc84b9998d60d8, []int{0}
}

type FileHeader struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	FileEnd              int64    `protobuf:"varint,2,opt,name=file_end,json=fileEnd,proto3" json:"file_end,omitempty"`
	LastEntryId          string   `protobuf:"bytes,3,opt,name=last_entry_id,json=lastEntryId,proto3" json:"last_entry_id,omitempty"`
	EntryNum             int64    `protobuf:"varint,4,opt,name=entry_num,json=entryNum,proto3" json:"entry_num,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *FileHeader) Reset()         { *m = FileHeader{} }
func (m *FileHeader) String() string { return proto.CompactTextString(m) }
func (*FileHeader) ProtoMessage()    {}
func (*FileHeader) Descriptor() ([]byte, []int) {
	return fileDescriptor_2fcc84b9998d60d8, []int{0}
}
func (m *FileHeader) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *FileHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_FileHeader.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *FileHeader) XXX_Merge(src proto.Message) {
	xxx_messageInfo_FileHeader.Merge(m, src)
}
func (m *FileHeader) XXX_Size() int {
	return m.Size()
}
func (m *FileHeader) XXX_DiscardUnknown() {
	xxx_messageInfo_FileHeader.DiscardUnknown(m)
}

var xxx_messageInfo_FileHeader proto.InternalMessageInfo

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

func (m *FileHeader) GetFileEnd() int64 {
	if m != nil {
		return m.FileEnd
	}
	return 0
}

func (m *FileHeader) GetLastEntryId() string {
	if m != nil {
		return m.LastEntryId
	}
	return ""
}

func (m *FileHeader) GetEntryNum() int64 {
	if m != nil {
		return m.EntryNum
	}
	return 0
}

type LogOperation struct {
	Op                   int32            `protobuf:"varint,1,opt,name=op,proto3" json:"op,omitempty"`
	Key                  string           `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	Value                string           `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	Gid                  string           `protobuf:"bytes,4,opt,name=gid,proto3" json:"gid,omitempty"`
	PrevGid              string           `protobuf:"bytes,5,opt,name=prev_gid,json=prevGid,proto3" json:"prev_gid,omitempty"`
	PrevValue            string           `protobuf:"bytes,6,opt,name=prev_value,json=prevValue,proto3" json:"prev_value,omitempty"`
	Seq                  uint64           `protobuf:"varint,7,opt,name=seq,proto3" json:"seq,omitempty"`
	MachineId            string           `protobuf:"bytes,8,opt,name=machine_id,json=machineId,proto3" json:"machine_id,omitempty"`
	PrevMachineId        string           `protobuf:"bytes,9,opt,name=prev_machine_id,json=prevMachineId,proto3" json:"prev_machine_id,omitempty"`
	Changes              map[string]int32 `protobuf:"bytes,10,rep,name=changes,proto3" json:"changes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
	Num                  int64            `protobuf:"varint,11,opt,name=num,proto3" json:"num,omitempty"`
	PrevNum              int64            `protobuf:"varint,12,opt,name=prev_num,json=prevNum,proto3" json:"prev_num,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (m *LogOperation) Reset()         { *m = LogOperation{} }
func (m *LogOperation) String() string { return proto.CompactTextString(m) }
func (*LogOperation) ProtoMessage()    {}
func (*LogOperation) Descriptor() ([]byte, []int) {
	return fileDescriptor_2fcc84b9998d60d8, []int{1}
}
func (m *LogOperation) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *LogOperation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_LogOperation.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *LogOperation) XXX_Merge(src proto.Message) {
	xxx_messageInfo_LogOperation.Merge(m, src)
}
func (m *LogOperation) XXX_Size() int {
	return m.Size()
}
func (m *LogOperation) XXX_DiscardUnknown() {
	xxx_messageInfo_LogOperation.DiscardUnknown(m)
}

var xxx_messageInfo_LogOperation proto.InternalMessageInfo

func (m *LogOperation) GetOp() int32 {
	if m != nil {
		return m.Op
	}
	return 0
}

func (m *LogOperation) GetKey() string {
	if m != nil {
		return m.Key
	}
	return ""
}

func (m *LogOperation) GetValue() string {
	if m != nil {
		return m.Value
	}
	return ""
}

func (m *LogOperation) GetGid() string {
	if m != nil {
		return m.Gid
	}
	return ""
}

func (m *LogOperation) GetPrevGid() string {
	if m != nil {
		return m.PrevGid
	}
	return ""
}

func (m *LogOperation) GetPrevValue() string {
	if m != nil {
		return m.PrevValue
	}
	return ""
}

func (m *LogOperation) GetSeq() uint64 {
	if m != nil {
		return m.Seq
	}
	return 0
}

func (m *LogOperation) GetMachineId() string {
	if m != nil {
		return m.MachineId
	}
	return ""
}

func (m *LogOperation) GetPrevMachineId() string {
	if m != nil {
		return m.PrevMachineId
	}
	return ""
}

func (m *LogOperation) GetChanges() map[string]int32 {
	if m != nil {
		return m.Changes
	}
	return nil
}

func (m *LogOperation) GetNum() int64 {
	if m != nil {
		return m.Num
	}
	return 0
}

func (m *LogOperation) GetPrevNum() int64 {
	if m != nil {
		return m.PrevNum
	}
	return 0
}

type LogEntry struct {
	Ops                  []*LogOperation `protobuf:"bytes,1,rep,name=ops,proto3" json:"ops,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (m *LogEntry) Reset()         { *m = LogEntry{} }
func (m *LogEntry) String() string { return proto.CompactTextString(m) }
func (*LogEntry) ProtoMessage()    {}
func (*LogEntry) Descriptor() ([]byte, []int) {
	return fileDescriptor_2fcc84b9998d60d8, []int{2}
}
func (m *LogEntry) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *LogEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_LogEntry.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *LogEntry) XXX_Merge(src proto.Message) {
	xxx_messageInfo_LogEntry.Merge(m, src)
}
func (m *LogEntry) XXX_Size() int {
	return m.Size()
}
func (m *LogEntry) XXX_DiscardUnknown() {
	xxx_messageInfo_LogEntry.DiscardUnknown(m)
}

var xxx_messageInfo_LogEntry proto.InternalMessageInfo

func (m *LogEntry) GetOps() []*LogOperation {
	if m != nil {
		return m.Ops
	}
	return nil
}

func init() {
	proto.RegisterEnum("Op", Op_name, Op_value)
	proto.RegisterType((*FileHeader)(nil), "FileHeader")
	proto.RegisterType((*LogOperation)(nil), "LogOperation")
	proto.RegisterMapType((map[string]int32)(nil), "LogOperation.ChangesEntry")
	proto.RegisterType((*LogEntry)(nil), "LogEntry")
}

func init() { proto.RegisterFile("proto.proto", fileDescriptor_2fcc84b9998d60d8) }

var fileDescriptor_2fcc84b9998d60d8 = []byte{
	// 438 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xcd, 0x6e, 0xd3, 0x40,
	0x10, 0xee, 0xda, 0x49, 0x6c, 0x8f, 0x13, 0xb0, 0x56, 0x1c, 0xdc, 0x22, 0x42, 0x94, 0x03, 0x8a,
	0x40, 0x8a, 0x10, 0x70, 0x40, 0x3d, 0x42, 0x0b, 0x54, 0x6a, 0x53, 0xc9, 0x07, 0x0e, 0x5c, 0x22,
	0x93, 0x9d, 0xba, 0x2b, 0x9c, 0x5d, 0xe3, 0x9f, 0x8a, 0xbc, 0x02, 0x4f, 0xc0, 0x23, 0x71, 0xe4,
	0x11, 0x50, 0x78, 0x11, 0x34, 0xb3, 0x4d, 0x15, 0x24, 0x2e, 0xd6, 0xcc, 0x37, 0xf3, 0x7d, 0x33,
	0xf3, 0x79, 0x21, 0xae, 0x6a, 0xdb, 0xda, 0x39, 0x7f, 0xa7, 0xdf, 0x00, 0xde, 0xe9, 0x12, 0x3f,
	0x60, 0xae, 0xb0, 0x96, 0xf7, 0xc0, 0xd3, 0x2a, 0x15, 0x13, 0x31, 0x8b, 0x32, 0x4f, 0x2b, 0x79,
	0x08, 0xe1, 0x95, 0x2e, 0x71, 0x89, 0x46, 0xa5, 0xde, 0x44, 0xcc, 0xfc, 0x2c, 0xa0, 0xfc, 0xd4,
	0x28, 0x39, 0x85, 0x51, 0x99, 0x37, 0xed, 0x12, 0x4d, 0x5b, 0x6f, 0x96, 0x5a, 0xa5, 0x3e, 0xb3,
	0x62, 0x02, 0x4f, 0x09, 0x3b, 0x53, 0xf2, 0x21, 0x44, 0xae, 0x6c, 0xba, 0x75, 0xda, 0x63, 0x7e,
	0xc8, 0xc0, 0xa2, 0x5b, 0x4f, 0xbf, 0xfb, 0x30, 0x3c, 0xb7, 0xc5, 0x65, 0x85, 0x75, 0xde, 0x6a,
	0x6b, 0x68, 0xb8, 0xad, 0x78, 0x78, 0x3f, 0xf3, 0x6c, 0x25, 0x13, 0xf0, 0xbf, 0xe0, 0x86, 0xe7,
	0x46, 0x19, 0x85, 0xf2, 0x01, 0xf4, 0x6f, 0xf2, 0xb2, 0xc3, 0xdb, 0x59, 0x2e, 0xa1, 0xbe, 0x42,
	0x2b, 0xd6, 0x8f, 0x32, 0x0a, 0x69, 0xed, 0xaa, 0xc6, 0x9b, 0x25, 0xc1, 0x7d, 0x86, 0x03, 0xca,
	0xdf, 0x6b, 0x25, 0x1f, 0x01, 0x70, 0xc9, 0xe9, 0x0c, 0xb8, 0x18, 0x11, 0xf2, 0x71, 0xa7, 0xd5,
	0xe0, 0xd7, 0x34, 0x98, 0x88, 0x59, 0x2f, 0xa3, 0x90, 0x08, 0xeb, 0x7c, 0x75, 0xad, 0x0d, 0xd2,
	0x91, 0xa1, 0x23, 0xdc, 0x22, 0x67, 0x4a, 0x3e, 0x81, 0xfb, 0xac, 0xb7, 0xd7, 0x13, 0x71, 0xcf,
	0x88, 0xe0, 0x8b, 0xbb, 0xbe, 0x57, 0x10, 0xac, 0xae, 0x73, 0x53, 0x60, 0x93, 0xc2, 0xc4, 0x9f,
	0xc5, 0x2f, 0x8e, 0xe6, 0xfb, 0xc7, 0xcf, 0xdf, 0xba, 0x22, 0x3b, 0x97, 0xed, 0x5a, 0x69, 0x1d,
	0xb2, 0x2e, 0x66, 0xeb, 0x28, 0xbc, 0x3b, 0x8d, 0xe0, 0xa1, 0xfb, 0x23, 0x94, 0x2f, 0xba, 0xf5,
	0xd1, 0x31, 0x0c, 0xf7, 0x55, 0x76, 0xfe, 0x89, 0xff, 0xf8, 0xe7, 0xb1, 0xc9, 0x2e, 0x39, 0xf6,
	0x5e, 0x8b, 0xe9, 0x33, 0x08, 0xcf, 0x6d, 0xe1, 0x78, 0x8f, 0xc1, 0xb7, 0x55, 0x93, 0x0a, 0x5e,
	0x73, 0xf4, 0xcf, 0x9a, 0x19, 0x55, 0x9e, 0x3e, 0x07, 0xef, 0xb2, 0x92, 0x21, 0xf4, 0x16, 0xd6,
	0x60, 0x72, 0x20, 0x01, 0x06, 0x17, 0x56, 0xe9, 0xab, 0x4d, 0x22, 0x64, 0x00, 0xfe, 0x09, 0x96,
	0x89, 0x27, 0x63, 0x08, 0x4e, 0x74, 0xb3, 0xca, 0x6b, 0x95, 0xf8, 0x6f, 0x0e, 0x7f, 0x6e, 0xc7,
	0xe2, 0xd7, 0x76, 0x2c, 0x7e, 0x6f, 0xc7, 0xe2, 0xc7, 0x9f, 0xf1, 0xc1, 0xa7, 0xa0, 0x69, 0x6d,
	0x9d, 0x17, 0xf8, 0x79, 0xc0, 0xef, 0xf0, 0xe5, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe6, 0xa6,
	0xa7, 0x61, 0x96, 0x02, 0x00, 0x00,
}

func (m *FileHeader) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *FileHeader) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *FileHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.XXX_unrecognized != nil {
		i -= len(m.XXX_unrecognized)
		copy(dAtA[i:], m.XXX_unrecognized)
	}
	if m.EntryNum != 0 {
		i = encodeVarintProto(dAtA, i, uint64(m.EntryNum))
		i--
		dAtA[i] = 0x20
	}
	if len(m.LastEntryId) > 0 {
		i -= len(m.LastEntryId)
		copy(dAtA[i:], m.LastEntryId)
		i = encodeVarintProto(dAtA, i, uint64(len(m.LastEntryId)))
		i--
		dAtA[i] = 0x1a
	}
	if m.FileEnd != 0 {
		i = encodeVarintProto(dAtA, i, uint64(m.FileEnd))
		i--
		dAtA[i] = 0x10
	}
	if len(m.Id) > 0 {
		i -= len(m.Id)
		copy(dAtA[i:], m.Id)
		i = encodeVarintProto(dAtA, i, uint64(len(m.Id)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *LogOperation) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *LogOperation) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *LogOperation) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.XXX_unrecognized != nil {
		i -= len(m.XXX_unrecognized)
		copy(dAtA[i:], m.XXX_unrecognized)
	}
	if m.PrevNum != 0 {
		i = encodeVarintProto(dAtA, i, uint64(m.PrevNum))
		i--
		dAtA[i] = 0x60
	}
	if m.Num != 0 {
		i = encodeVarintProto(dAtA, i, uint64(m.Num))
		i--
		dAtA[i] = 0x58
	}
	if len(m.Changes) > 0 {
		for k := range m.Changes {
			v := m.Changes[k]
			baseI := i
			i = encodeVarintProto(dAtA, i, uint64(v))
			i--
			dAtA[i] = 0x10
			i -= len(k)
			copy(dAtA[i:], k)
			i = encodeVarintProto(dAtA, i, uint64(len(k)))
			i--
			dAtA[i] = 0xa
			i = encodeVarintProto(dAtA, i, uint64(baseI-i))
			i--
			dAtA[i] = 0x52
		}
	}
	if len(m.PrevMachineId) > 0 {
		i -= len(m.PrevMachineId)
		copy(dAtA[i:], m.PrevMachineId)
		i = encodeVarintProto(dAtA, i, uint64(len(m.PrevMachineId)))
		i--
		dAtA[i] = 0x4a
	}
	if len(m.MachineId) > 0 {
		i -= len(m.MachineId)
		copy(dAtA[i:], m.MachineId)
		i = encodeVarintProto(dAtA, i, uint64(len(m.MachineId)))
		i--
		dAtA[i] = 0x42
	}
	if m.Seq != 0 {
		i = encodeVarintProto(dAtA, i, uint64(m.Seq))
		i--
		dAtA[i] = 0x38
	}
	if len(m.PrevValue) > 0 {
		i -= len(m.PrevValue)
		copy(dAtA[i:], m.PrevValue)
		i = encodeVarintProto(dAtA, i, uint64(len(m.PrevValue)))
		i--
		dAtA[i] = 0x32
	}
	if len(m.PrevGid) > 0 {
		i -= len(m.PrevGid)
		copy(dAtA[i:], m.PrevGid)
		i = encodeVarintProto(dAtA, i, uint64(len(m.PrevGid)))
		i--
		dAtA[i] = 0x2a
	}
	if len(m.Gid) > 0 {
		i -= len(m.Gid)
		copy(dAtA[i:], m.Gid)
		i = encodeVarintProto(dAtA, i, uint64(len(m.Gid)))
		i--
		dAtA[i] = 0x22
	}
	if len(m.Value) > 0 {
		i -= len(m.Value)
		copy(dAtA[i:], m.Value)
		i = encodeVarintProto(dAtA, i, uint64(len(m.Value)))
		i--
		dAtA[i] = 0x1a
	}
	if len(m.Key) > 0 {
		i -= len(m.Key)
		copy(dAtA[i:], m.Key)
		i = encodeVarintProto(dAtA, i, uint64(len(m.Key)))
		i--
		dAtA[i] = 0x12
	}
	if m.Op != 0 {
		i = encodeVarintProto(dAtA, i, uint64(m.Op))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

func (m *LogEntry) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *LogEntry) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *LogEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.XXX_unrecognized != nil {
		i -= len(m.XXX_unrecognized)
		copy(dAtA[i:], m.XXX_unrecognized)
	}
	if len(m.Ops) > 0 {
		for iNdEx := len(m.Ops) - 1; iNdEx >= 0; iNdEx-- {
			{
				size, err := m.Ops[iNdEx].MarshalToSizedBuffer(dAtA[:i])
				if err != nil {
					return 0, err
				}
				i -= size
				i = encodeVarintProto(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0xa
		}
	}
	return len(dAtA) - i, nil
}

func encodeVarintProto(dAtA []byte, offset int, v uint64) int {
	offset -= sovProto(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *FileHeader) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Id)
	if l > 0 {
		n += 1 + l + sovProto(uint64(l))
	}
	if m.FileEnd != 0 {
		n += 1 + sovProto(uint64(m.FileEnd))
	}
	l = len(m.LastEntryId)
	if l > 0 {
		n += 1 + l + sovProto(uint64(l))
	}
	if m.EntryNum != 0 {
		n += 1 + sovProto(uint64(m.EntryNum))
	}
	if m.XXX_unrecognized != nil {
		n += len(m.XXX_unrecognized)
	}
	return n
}

func (m *LogOperation) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Op != 0 {
		n += 1 + sovProto(uint64(m.Op))
	}
	l = len(m.Key)
	if l > 0 {
		n += 1 + l + sovProto(uint64(l))
	}
	l = len(m.Value)
	if l > 0 {
		n += 1 + l + sovProto(uint64(l))
	}
	l = len(m.Gid)
	if l > 0 {
		n += 1 + l + sovProto(uint64(l))
	}
	l = len(m.PrevGid)
	if l > 0 {
		n += 1 + l + sovProto(uint64(l))
	}
	l = len(m.PrevValue)
	if l > 0 {
		n += 1 + l + sovProto(uint64(l))
	}
	if m.Seq != 0 {
		n += 1 + sovProto(uint64(m.Seq))
	}
	l = len(m.MachineId)
	if l > 0 {
		n += 1 + l + sovProto(uint64(l))
	}
	l = len(m.PrevMachineId)
	if l > 0 {
		n += 1 + l + sovProto(uint64(l))
	}
	if len(m.Changes) > 0 {
		for k, v := range m.Changes {
			_ = k
			_ = v
			mapEntrySize := 1 + len(k) + sovProto(uint64(len(k))) + 1 + sovProto(uint64(v))
			n += mapEntrySize + 1 + sovProto(uint64(mapEntrySize))
		}
	}
	if m.Num != 0 {
		n += 1 + sovProto(uint64(m.Num))
	}
	if m.PrevNum != 0 {
		n += 1 + sovProto(uint64(m.PrevNum))
	}
	if m.XXX_unrecognized != nil {
		n += len(m.XXX_unrecognized)
	}
	return n
}

func (m *LogEntry) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if len(m.Ops) > 0 {
		for _, e := range m.Ops {
			l = e.Size()
			n += 1 + l + sovProto(uint64(l))
		}
	}
	if m.XXX_unrecognized != nil {
		n += len(m.XXX_unrecognized)
	}
	return n
}

func sovProto(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozProto(x uint64) (n int) {
	return sovProto(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *FileHeader) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowProto
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: FileHeader: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: FileHeader: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowProto
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthProto
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthProto
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Id = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field FileEnd", wireType)
			}
			m.FileEnd = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowProto
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.FileEnd |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field LastEntryId", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowProto
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthProto
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthProto
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.LastEntryId = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 4:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field EntryNum", wireType)
			}
			m.EntryNum = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowProto
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.EntryNum |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipProto(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthProto
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *LogOperation) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowProto
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: LogOperation: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: LogOperation: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Op", wireType)
			}
			m.Op = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowProto
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Op |= int32(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowProto
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthProto
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthProto
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Key = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowProto
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthProto
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthProto
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Value = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Gid", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowProto
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthProto
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthProto
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Gid = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field PrevGid", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowProto
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthProto
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthProto
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.PrevGid = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 6:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field PrevValue", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowProto
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthProto
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthProto
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.PrevValue = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 7:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType)
			}
			m.Seq = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowProto
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Seq |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 8:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field MachineId", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowProto
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthProto
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthProto
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.MachineId = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 9:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field PrevMachineId", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowProto
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthProto
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthProto
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.PrevMachineId = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 10:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowProto
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthProto
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthProto
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Changes == nil {
				m.Changes = make(map[string]int32)
			}
			var mapkey string
			var mapvalue int32
			for iNdEx < postIndex {
				entryPreIndex := iNdEx
				var wire uint64
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return ErrIntOverflowProto
					}
					if iNdEx >= l {
						return io.ErrUnexpectedEOF
					}
					b := dAtA[iNdEx]
					iNdEx++
					wire |= uint64(b&0x7F) << shift
					if b < 0x80 {
						break
					}
				}
				fieldNum := int32(wire >> 3)
				if fieldNum == 1 {
					var stringLenmapkey uint64
					for shift := uint(0); ; shift += 7 {
						if shift >= 64 {
							return ErrIntOverflowProto
						}
						if iNdEx >= l {
							return io.ErrUnexpectedEOF
						}
						b := dAtA[iNdEx]
						iNdEx++
						stringLenmapkey |= uint64(b&0x7F) << shift
						if b < 0x80 {
							break
						}
					}
					intStringLenmapkey := int(stringLenmapkey)
					if intStringLenmapkey < 0 {
						return ErrInvalidLengthProto
					}
					postStringIndexmapkey := iNdEx + intStringLenmapkey
					if postStringIndexmapkey < 0 {
						return ErrInvalidLengthProto
					}
					if postStringIndexmapkey > l {
						return io.ErrUnexpectedEOF
					}
					mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
					iNdEx = postStringIndexmapkey
				} else if fieldNum == 2 {
					for shift := uint(0); ; shift += 7 {
						if shift >= 64 {
							return ErrIntOverflowProto
						}
						if iNdEx >= l {
							return io.ErrUnexpectedEOF
						}
						b := dAtA[iNdEx]
						iNdEx++
						mapvalue |= int32(b&0x7F) << shift
						if b < 0x80 {
							break
						}
					}
				} else {
					iNdEx = entryPreIndex
					skippy, err := skipProto(dAtA[iNdEx:])
					if err != nil {
						return err
					}
					if (skippy < 0) || (iNdEx+skippy) < 0 {
						return ErrInvalidLengthProto
					}
					if (iNdEx + skippy) > postIndex {
						return io.ErrUnexpectedEOF
					}
					iNdEx += skippy
				}
			}
			m.Changes[mapkey] = mapvalue
			iNdEx = postIndex
		case 11:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Num", wireType)
			}
			m.Num = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowProto
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Num |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 12:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field PrevNum", wireType)
			}
			m.PrevNum = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowProto
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.PrevNum |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipProto(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthProto
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *LogEntry) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowProto
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: LogEntry: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: LogEntry: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Ops", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowProto
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthProto
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthProto
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Ops = append(m.Ops, &LogOperation{})
			if err := m.Ops[len(m.Ops)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipProto(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthProto
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipProto(dAtA []byte) (n int, err error) {
	l := len(dAtA)
	iNdEx := 0
	depth := 0
	for iNdEx < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return 0, ErrIntOverflowProto
			}
			if iNdEx >= l {
				return 0, io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		wireType := int(wire & 0x7)
		switch wireType {
		case 0:
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowProto
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				iNdEx++
				if dAtA[iNdEx-1] < 0x80 {
					break
				}
			}
		case 1:
			iNdEx += 8
		case 2:
			var length int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowProto
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				length |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if length < 0 {
				return 0, ErrInvalidLengthProto
			}
			iNdEx += length
		case 3:
			depth++
		case 4:
			if depth == 0 {
				return 0, ErrUnexpectedEndOfGroupProto
			}
			depth--
		case 5:
			iNdEx += 4
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
		if iNdEx < 0 {
			return 0, ErrInvalidLengthProto
		}
		if depth == 0 {
			return iNdEx, nil
		}
	}
	return 0, io.ErrUnexpectedEOF
}

var (
	ErrInvalidLengthProto        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowProto          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupProto = fmt.Errorf("proto: unexpected end of group")
)
