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

package treechangeproto

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

const (
	ErrorCodes_Unexpected           ErrorCodes = 0
	ErrorCodes_GetTreeError         ErrorCodes = 1
	ErrorCodes_FullSyncRequestError ErrorCodes = 2
	ErrorCodes_ErrorOffset          ErrorCodes = 400
)

// Enum value maps for ErrorCodes.
var (
	ErrorCodes_name = map[int32]string{
		0:   "Unexpected",
		1:   "GetTreeError",
		2:   "FullSyncRequestError",
		400: "ErrorOffset",
	}
	ErrorCodes_value = map[string]int32{
		"Unexpected":           0,
		"GetTreeError":         1,
		"FullSyncRequestError": 2,
		"ErrorOffset":          400,
	}
)

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

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

func (ErrorCodes) Descriptor() protoreflect.EnumDescriptor {
	return file_treechange_proto_enumTypes[0].Descriptor()
}

func (ErrorCodes) Type() protoreflect.EnumType {
	return &file_treechange_proto_enumTypes[0]
}

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

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

// RootChange is a root of a tree
type RootChange struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// AclHeadId is a cid of latest acl record at the time of tree creation
	AclHeadId string `protobuf:"bytes,1,opt,name=aclHeadId,proto3" json:"aclHeadId,omitempty"`
	// SpaceId is an id of space where the document is placed
	SpaceId string `protobuf:"bytes,2,opt,name=spaceId,proto3" json:"spaceId,omitempty"`
	// ChangeType is a type of tree which this RootChange is a root of
	ChangeType string `protobuf:"bytes,3,opt,name=changeType,proto3" json:"changeType,omitempty"`
	// Timestamp is this change creation timestamp
	Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// Seed is a random bytes to make root change unique
	Seed []byte `protobuf:"bytes,5,opt,name=seed,proto3" json:"seed,omitempty"`
	// Identity is a public key of the tree's creator
	Identity []byte `protobuf:"bytes,6,opt,name=identity,proto3" json:"identity,omitempty"`
	// ChangePayload is a payload related to ChangeType
	ChangePayload []byte `protobuf:"bytes,7,opt,name=changePayload,proto3" json:"changePayload,omitempty"`
	// IsDerived tells if the tree is derived
	IsDerived     bool `protobuf:"varint,8,opt,name=isDerived,proto3" json:"isDerived,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*RootChange) ProtoMessage() {}

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

func (x *RootChange) GetAclHeadId() string {
	if x != nil {
		return x.AclHeadId
	}
	return ""
}

func (x *RootChange) GetSpaceId() string {
	if x != nil {
		return x.SpaceId
	}
	return ""
}

func (x *RootChange) GetChangeType() string {
	if x != nil {
		return x.ChangeType
	}
	return ""
}

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

func (x *RootChange) GetSeed() []byte {
	if x != nil {
		return x.Seed
	}
	return nil
}

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

func (x *RootChange) GetChangePayload() []byte {
	if x != nil {
		return x.ChangePayload
	}
	return nil
}

func (x *RootChange) GetIsDerived() bool {
	if x != nil {
		return x.IsDerived
	}
	return false
}

// TreeChange is a change of a tree
type TreeChange struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// TreeHeadIds are previous ids for this TreeChange
	TreeHeadIds []string `protobuf:"bytes,1,rep,name=treeHeadIds,proto3" json:"treeHeadIds,omitempty"`
	// AclHeadId is a cid of latest acl record at the time of this change
	AclHeadId string `protobuf:"bytes,2,opt,name=aclHeadId,proto3" json:"aclHeadId,omitempty"`
	// SnapshotBaseId is a snapshot (root) of the tree where this change is added
	SnapshotBaseId string `protobuf:"bytes,3,opt,name=snapshotBaseId,proto3" json:"snapshotBaseId,omitempty"`
	// ChangesData is an arbitrary payload to be read by the client
	ChangesData []byte `protobuf:"bytes,4,opt,name=changesData,proto3" json:"changesData,omitempty"`
	// ReadKeyId is the id of the read key
	ReadKeyId string `protobuf:"bytes,5,opt,name=readKeyId,proto3" json:"readKeyId,omitempty"`
	// Timestamp is this change creation timestamp
	Timestamp int64 `protobuf:"varint,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// Identity is a public key with which the raw payload of this change is signed
	Identity []byte `protobuf:"bytes,7,opt,name=identity,proto3" json:"identity,omitempty"`
	// IsSnapshot indicates whether this change contains a snapshot of state
	IsSnapshot bool `protobuf:"varint,8,opt,name=isSnapshot,proto3" json:"isSnapshot,omitempty"`
	// DataType indicates some special parameters of data for the client
	DataType      string `protobuf:"bytes,9,opt,name=dataType,proto3" json:"dataType,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*TreeChange) ProtoMessage() {}

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

func (x *TreeChange) GetTreeHeadIds() []string {
	if x != nil {
		return x.TreeHeadIds
	}
	return nil
}

func (x *TreeChange) GetAclHeadId() string {
	if x != nil {
		return x.AclHeadId
	}
	return ""
}

func (x *TreeChange) GetSnapshotBaseId() string {
	if x != nil {
		return x.SnapshotBaseId
	}
	return ""
}

func (x *TreeChange) GetChangesData() []byte {
	if x != nil {
		return x.ChangesData
	}
	return nil
}

func (x *TreeChange) GetReadKeyId() string {
	if x != nil {
		return x.ReadKeyId
	}
	return ""
}

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

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

func (x *TreeChange) GetIsSnapshot() bool {
	if x != nil {
		return x.IsSnapshot
	}
	return false
}

func (x *TreeChange) GetDataType() string {
	if x != nil {
		return x.DataType
	}
	return ""
}

// TreeChange is a change of a tree
type NoDataTreeChange struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// TreeHeadIds are previous ids for this TreeChange
	TreeHeadIds []string `protobuf:"bytes,1,rep,name=treeHeadIds,proto3" json:"treeHeadIds,omitempty"`
	// AclHeadId is a cid of latest acl record at the time of this change
	AclHeadId string `protobuf:"bytes,2,opt,name=aclHeadId,proto3" json:"aclHeadId,omitempty"`
	// SnapshotBaseId is a snapshot (root) of the tree where this change is added
	SnapshotBaseId string `protobuf:"bytes,3,opt,name=snapshotBaseId,proto3" json:"snapshotBaseId,omitempty"`
	// ReadKeyId is the id of the read key
	ReadKeyId string `protobuf:"bytes,5,opt,name=readKeyId,proto3" json:"readKeyId,omitempty"`
	// Timestamp is this change creation timestamp
	Timestamp int64 `protobuf:"varint,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// Identity is a public key with which the raw payload of this change is signed
	Identity []byte `protobuf:"bytes,7,opt,name=identity,proto3" json:"identity,omitempty"`
	// IsSnapshot indicates whether this change contains a snapshot of state
	IsSnapshot bool `protobuf:"varint,8,opt,name=isSnapshot,proto3" json:"isSnapshot,omitempty"`
	// DataType indicates some special parameters of data for the client
	DataType      string `protobuf:"bytes,9,opt,name=dataType,proto3" json:"dataType,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*NoDataTreeChange) ProtoMessage() {}

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

func (x *NoDataTreeChange) GetTreeHeadIds() []string {
	if x != nil {
		return x.TreeHeadIds
	}
	return nil
}

func (x *NoDataTreeChange) GetAclHeadId() string {
	if x != nil {
		return x.AclHeadId
	}
	return ""
}

func (x *NoDataTreeChange) GetSnapshotBaseId() string {
	if x != nil {
		return x.SnapshotBaseId
	}
	return ""
}

func (x *NoDataTreeChange) GetReadKeyId() string {
	if x != nil {
		return x.ReadKeyId
	}
	return ""
}

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

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

func (x *NoDataTreeChange) GetIsSnapshot() bool {
	if x != nil {
		return x.IsSnapshot
	}
	return false
}

func (x *NoDataTreeChange) GetDataType() string {
	if x != nil {
		return x.DataType
	}
	return ""
}

type ReducedTreeChange struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// TreeHeadIds are previous ids for this TreeChange
	TreeHeadIds   []string `protobuf:"bytes,1,rep,name=treeHeadIds,proto3" json:"treeHeadIds,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ReducedTreeChange) ProtoMessage() {}

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

func (x *ReducedTreeChange) GetTreeHeadIds() []string {
	if x != nil {
		return x.TreeHeadIds
	}
	return nil
}

// RawTreeChange is a marshalled TreeChange (or RootChange) payload and a signature of this payload
type RawTreeChange struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Payload is a byte payload containing TreeChange
	Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// Signature is a signature made by identity indicated in the TreeChange payload
	Signature     []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*RawTreeChange) ProtoMessage() {}

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

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

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

// RawTreeChangeWithId is a marshalled RawTreeChange with CID
type RawTreeChangeWithId struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// RawChange is a byte payload of RawTreeChange
	RawChange []byte `protobuf:"bytes,1,opt,name=rawChange,proto3" json:"rawChange,omitempty"`
	// Id is a cid made from rawChange payload
	Id            string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*RawTreeChangeWithId) ProtoMessage() {}

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

func (x *RawTreeChangeWithId) GetRawChange() []byte {
	if x != nil {
		return x.RawChange
	}
	return nil
}

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

type TreeSyncMessage struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Content       *TreeSyncContentValue  `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	RootChange    *RawTreeChangeWithId   `protobuf:"bytes,2,opt,name=rootChange,proto3" json:"rootChange,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*TreeSyncMessage) ProtoMessage() {}

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

func (x *TreeSyncMessage) GetContent() *TreeSyncContentValue {
	if x != nil {
		return x.Content
	}
	return nil
}

func (x *TreeSyncMessage) GetRootChange() *RawTreeChangeWithId {
	if x != nil {
		return x.RootChange
	}
	return nil
}

// TreeSyncContentValue provides different types for tree sync
type TreeSyncContentValue struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to Value:
	//
	//	*TreeSyncContentValue_HeadUpdate
	//	*TreeSyncContentValue_FullSyncRequest
	//	*TreeSyncContentValue_FullSyncResponse
	//	*TreeSyncContentValue_ErrorResponse
	Value         isTreeSyncContentValue_Value `protobuf_oneof:"value"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*TreeSyncContentValue) ProtoMessage() {}

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

func (x *TreeSyncContentValue) GetValue() isTreeSyncContentValue_Value {
	if x != nil {
		return x.Value
	}
	return nil
}

func (x *TreeSyncContentValue) GetHeadUpdate() *TreeHeadUpdate {
	if x != nil {
		if x, ok := x.Value.(*TreeSyncContentValue_HeadUpdate); ok {
			return x.HeadUpdate
		}
	}
	return nil
}

func (x *TreeSyncContentValue) GetFullSyncRequest() *TreeFullSyncRequest {
	if x != nil {
		if x, ok := x.Value.(*TreeSyncContentValue_FullSyncRequest); ok {
			return x.FullSyncRequest
		}
	}
	return nil
}

func (x *TreeSyncContentValue) GetFullSyncResponse() *TreeFullSyncResponse {
	if x != nil {
		if x, ok := x.Value.(*TreeSyncContentValue_FullSyncResponse); ok {
			return x.FullSyncResponse
		}
	}
	return nil
}

func (x *TreeSyncContentValue) GetErrorResponse() *TreeErrorResponse {
	if x != nil {
		if x, ok := x.Value.(*TreeSyncContentValue_ErrorResponse); ok {
			return x.ErrorResponse
		}
	}
	return nil
}

type isTreeSyncContentValue_Value interface {
	isTreeSyncContentValue_Value()
}

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

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

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

type TreeSyncContentValue_ErrorResponse struct {
	ErrorResponse *TreeErrorResponse `protobuf:"bytes,4,opt,name=errorResponse,proto3,oneof"`
}

func (*TreeSyncContentValue_HeadUpdate) isTreeSyncContentValue_Value() {}

func (*TreeSyncContentValue_FullSyncRequest) isTreeSyncContentValue_Value() {}

func (*TreeSyncContentValue_FullSyncResponse) isTreeSyncContentValue_Value() {}

func (*TreeSyncContentValue_ErrorResponse) isTreeSyncContentValue_Value() {}

// TreeHeadUpdate is a message sent on document head update
type TreeHeadUpdate struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Heads         []string               `protobuf:"bytes,1,rep,name=heads,proto3" json:"heads,omitempty"`
	Changes       []*RawTreeChangeWithId `protobuf:"bytes,2,rep,name=changes,proto3" json:"changes,omitempty"`
	SnapshotPath  []string               `protobuf:"bytes,3,rep,name=snapshotPath,proto3" json:"snapshotPath,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*TreeHeadUpdate) ProtoMessage() {}

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

func (x *TreeHeadUpdate) GetHeads() []string {
	if x != nil {
		return x.Heads
	}
	return nil
}

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

func (x *TreeHeadUpdate) GetSnapshotPath() []string {
	if x != nil {
		return x.SnapshotPath
	}
	return nil
}

// TreeHeadUpdate is a message sent when document needs full sync
type TreeFullSyncRequest struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Heads         []string               `protobuf:"bytes,1,rep,name=heads,proto3" json:"heads,omitempty"`
	Changes       []*RawTreeChangeWithId `protobuf:"bytes,2,rep,name=changes,proto3" json:"changes,omitempty"`
	SnapshotPath  []string               `protobuf:"bytes,3,rep,name=snapshotPath,proto3" json:"snapshotPath,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*TreeFullSyncRequest) ProtoMessage() {}

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

func (x *TreeFullSyncRequest) GetHeads() []string {
	if x != nil {
		return x.Heads
	}
	return nil
}

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

func (x *TreeFullSyncRequest) GetSnapshotPath() []string {
	if x != nil {
		return x.SnapshotPath
	}
	return nil
}

// TreeFullSyncResponse is a message sent as a response for a specific full sync
type TreeFullSyncResponse struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Heads         []string               `protobuf:"bytes,1,rep,name=heads,proto3" json:"heads,omitempty"`
	Changes       []*RawTreeChangeWithId `protobuf:"bytes,2,rep,name=changes,proto3" json:"changes,omitempty"`
	SnapshotPath  []string               `protobuf:"bytes,3,rep,name=snapshotPath,proto3" json:"snapshotPath,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*TreeFullSyncResponse) ProtoMessage() {}

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

func (x *TreeFullSyncResponse) GetHeads() []string {
	if x != nil {
		return x.Heads
	}
	return nil
}

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

func (x *TreeFullSyncResponse) GetSnapshotPath() []string {
	if x != nil {
		return x.SnapshotPath
	}
	return nil
}

// TreeErrorResponse is an error sent as a response for a full sync request
type TreeErrorResponse struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Error         string                 `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	ErrCode       uint64                 `protobuf:"varint,2,opt,name=errCode,proto3" json:"errCode,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*TreeErrorResponse) ProtoMessage() {}

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

func (x *TreeErrorResponse) GetError() string {
	if x != nil {
		return x.Error
	}
	return ""
}

func (x *TreeErrorResponse) GetErrCode() uint64 {
	if x != nil {
		return x.ErrCode
	}
	return 0
}

// TreeChangeInfo is used internally in Tree implementation for ease of marshalling
type TreeChangeInfo struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	ChangeType    string                 `protobuf:"bytes,1,opt,name=changeType,proto3" json:"changeType,omitempty"`
	ChangePayload []byte                 `protobuf:"bytes,2,opt,name=changePayload,proto3" json:"changePayload,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*TreeChangeInfo) ProtoMessage() {}

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

func (x *TreeChangeInfo) GetChangeType() string {
	if x != nil {
		return x.ChangeType
	}
	return ""
}

func (x *TreeChangeInfo) GetChangePayload() []byte {
	if x != nil {
		return x.ChangePayload
	}
	return nil
}

var File_treechange_proto protoreflect.FileDescriptor

const file_treechange_proto_rawDesc = "" +
	"\n" +
	"\x10treechange.proto\x12\n" +
	"treechange\"\xf6\x01\n" +
	"\n" +
	"RootChange\x12\x1c\n" +
	"\taclHeadId\x18\x01 \x01(\tR\taclHeadId\x12\x18\n" +
	"\aspaceId\x18\x02 \x01(\tR\aspaceId\x12\x1e\n" +
	"\n" +
	"changeType\x18\x03 \x01(\tR\n" +
	"changeType\x12\x1c\n" +
	"\ttimestamp\x18\x04 \x01(\x03R\ttimestamp\x12\x12\n" +
	"\x04seed\x18\x05 \x01(\fR\x04seed\x12\x1a\n" +
	"\bidentity\x18\x06 \x01(\fR\bidentity\x12$\n" +
	"\rchangePayload\x18\a \x01(\fR\rchangePayload\x12\x1c\n" +
	"\tisDerived\x18\b \x01(\bR\tisDerived\"\xaa\x02\n" +
	"\n" +
	"TreeChange\x12 \n" +
	"\vtreeHeadIds\x18\x01 \x03(\tR\vtreeHeadIds\x12\x1c\n" +
	"\taclHeadId\x18\x02 \x01(\tR\taclHeadId\x12&\n" +
	"\x0esnapshotBaseId\x18\x03 \x01(\tR\x0esnapshotBaseId\x12 \n" +
	"\vchangesData\x18\x04 \x01(\fR\vchangesData\x12\x1c\n" +
	"\treadKeyId\x18\x05 \x01(\tR\treadKeyId\x12\x1c\n" +
	"\ttimestamp\x18\x06 \x01(\x03R\ttimestamp\x12\x1a\n" +
	"\bidentity\x18\a \x01(\fR\bidentity\x12\x1e\n" +
	"\n" +
	"isSnapshot\x18\b \x01(\bR\n" +
	"isSnapshot\x12\x1a\n" +
	"\bdataType\x18\t \x01(\tR\bdataType\"\x8e\x02\n" +
	"\x10NoDataTreeChange\x12 \n" +
	"\vtreeHeadIds\x18\x01 \x03(\tR\vtreeHeadIds\x12\x1c\n" +
	"\taclHeadId\x18\x02 \x01(\tR\taclHeadId\x12&\n" +
	"\x0esnapshotBaseId\x18\x03 \x01(\tR\x0esnapshotBaseId\x12\x1c\n" +
	"\treadKeyId\x18\x05 \x01(\tR\treadKeyId\x12\x1c\n" +
	"\ttimestamp\x18\x06 \x01(\x03R\ttimestamp\x12\x1a\n" +
	"\bidentity\x18\a \x01(\fR\bidentity\x12\x1e\n" +
	"\n" +
	"isSnapshot\x18\b \x01(\bR\n" +
	"isSnapshot\x12\x1a\n" +
	"\bdataType\x18\t \x01(\tR\bdataType\"5\n" +
	"\x11ReducedTreeChange\x12 \n" +
	"\vtreeHeadIds\x18\x01 \x03(\tR\vtreeHeadIds\"G\n" +
	"\rRawTreeChange\x12\x18\n" +
	"\apayload\x18\x01 \x01(\fR\apayload\x12\x1c\n" +
	"\tsignature\x18\x02 \x01(\fR\tsignature\"C\n" +
	"\x13RawTreeChangeWithId\x12\x1c\n" +
	"\trawChange\x18\x01 \x01(\fR\trawChange\x12\x0e\n" +
	"\x02id\x18\x02 \x01(\tR\x02id\"\x8e\x01\n" +
	"\x0fTreeSyncMessage\x12:\n" +
	"\acontent\x18\x01 \x01(\v2 .treechange.TreeSyncContentValueR\acontent\x12?\n" +
	"\n" +
	"rootChange\x18\x02 \x01(\v2\x1f.treechange.RawTreeChangeWithIdR\n" +
	"rootChange\"\xc1\x02\n" +
	"\x14TreeSyncContentValue\x12<\n" +
	"\n" +
	"headUpdate\x18\x01 \x01(\v2\x1a.treechange.TreeHeadUpdateH\x00R\n" +
	"headUpdate\x12K\n" +
	"\x0ffullSyncRequest\x18\x02 \x01(\v2\x1f.treechange.TreeFullSyncRequestH\x00R\x0ffullSyncRequest\x12N\n" +
	"\x10fullSyncResponse\x18\x03 \x01(\v2 .treechange.TreeFullSyncResponseH\x00R\x10fullSyncResponse\x12E\n" +
	"\rerrorResponse\x18\x04 \x01(\v2\x1d.treechange.TreeErrorResponseH\x00R\rerrorResponseB\a\n" +
	"\x05value\"\x85\x01\n" +
	"\x0eTreeHeadUpdate\x12\x14\n" +
	"\x05heads\x18\x01 \x03(\tR\x05heads\x129\n" +
	"\achanges\x18\x02 \x03(\v2\x1f.treechange.RawTreeChangeWithIdR\achanges\x12\"\n" +
	"\fsnapshotPath\x18\x03 \x03(\tR\fsnapshotPath\"\x8a\x01\n" +
	"\x13TreeFullSyncRequest\x12\x14\n" +
	"\x05heads\x18\x01 \x03(\tR\x05heads\x129\n" +
	"\achanges\x18\x02 \x03(\v2\x1f.treechange.RawTreeChangeWithIdR\achanges\x12\"\n" +
	"\fsnapshotPath\x18\x03 \x03(\tR\fsnapshotPath\"\x8b\x01\n" +
	"\x14TreeFullSyncResponse\x12\x14\n" +
	"\x05heads\x18\x01 \x03(\tR\x05heads\x129\n" +
	"\achanges\x18\x02 \x03(\v2\x1f.treechange.RawTreeChangeWithIdR\achanges\x12\"\n" +
	"\fsnapshotPath\x18\x03 \x03(\tR\fsnapshotPath\"C\n" +
	"\x11TreeErrorResponse\x12\x14\n" +
	"\x05error\x18\x01 \x01(\tR\x05error\x12\x18\n" +
	"\aerrCode\x18\x02 \x01(\x04R\aerrCode\"V\n" +
	"\x0eTreeChangeInfo\x12\x1e\n" +
	"\n" +
	"changeType\x18\x01 \x01(\tR\n" +
	"changeType\x12$\n" +
	"\rchangePayload\x18\x02 \x01(\fR\rchangePayload*Z\n" +
	"\n" +
	"ErrorCodes\x12\x0e\n" +
	"\n" +
	"Unexpected\x10\x00\x12\x10\n" +
	"\fGetTreeError\x10\x01\x12\x18\n" +
	"\x14FullSyncRequestError\x10\x02\x12\x10\n" +
	"\vErrorOffset\x10\x90\x03B)Z'commonspace/object/tree/treechangeprotob\x06proto3"

var (
	file_treechange_proto_rawDescOnce sync.Once
	file_treechange_proto_rawDescData []byte
)

func file_treechange_proto_rawDescGZIP() []byte {
	file_treechange_proto_rawDescOnce.Do(func() {
		file_treechange_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_treechange_proto_rawDesc), len(file_treechange_proto_rawDesc)))
	})
	return file_treechange_proto_rawDescData
}

var file_treechange_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_treechange_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
var file_treechange_proto_goTypes = []any{
	(ErrorCodes)(0),              // 0: treechange.ErrorCodes
	(*RootChange)(nil),           // 1: treechange.RootChange
	(*TreeChange)(nil),           // 2: treechange.TreeChange
	(*NoDataTreeChange)(nil),     // 3: treechange.NoDataTreeChange
	(*ReducedTreeChange)(nil),    // 4: treechange.ReducedTreeChange
	(*RawTreeChange)(nil),        // 5: treechange.RawTreeChange
	(*RawTreeChangeWithId)(nil),  // 6: treechange.RawTreeChangeWithId
	(*TreeSyncMessage)(nil),      // 7: treechange.TreeSyncMessage
	(*TreeSyncContentValue)(nil), // 8: treechange.TreeSyncContentValue
	(*TreeHeadUpdate)(nil),       // 9: treechange.TreeHeadUpdate
	(*TreeFullSyncRequest)(nil),  // 10: treechange.TreeFullSyncRequest
	(*TreeFullSyncResponse)(nil), // 11: treechange.TreeFullSyncResponse
	(*TreeErrorResponse)(nil),    // 12: treechange.TreeErrorResponse
	(*TreeChangeInfo)(nil),       // 13: treechange.TreeChangeInfo
}
var file_treechange_proto_depIdxs = []int32{
	8,  // 0: treechange.TreeSyncMessage.content:type_name -> treechange.TreeSyncContentValue
	6,  // 1: treechange.TreeSyncMessage.rootChange:type_name -> treechange.RawTreeChangeWithId
	9,  // 2: treechange.TreeSyncContentValue.headUpdate:type_name -> treechange.TreeHeadUpdate
	10, // 3: treechange.TreeSyncContentValue.fullSyncRequest:type_name -> treechange.TreeFullSyncRequest
	11, // 4: treechange.TreeSyncContentValue.fullSyncResponse:type_name -> treechange.TreeFullSyncResponse
	12, // 5: treechange.TreeSyncContentValue.errorResponse:type_name -> treechange.TreeErrorResponse
	6,  // 6: treechange.TreeHeadUpdate.changes:type_name -> treechange.RawTreeChangeWithId
	6,  // 7: treechange.TreeFullSyncRequest.changes:type_name -> treechange.RawTreeChangeWithId
	6,  // 8: treechange.TreeFullSyncResponse.changes:type_name -> treechange.RawTreeChangeWithId
	9,  // [9:9] is the sub-list for method output_type
	9,  // [9:9] is the sub-list for method input_type
	9,  // [9:9] is the sub-list for extension type_name
	9,  // [9:9] is the sub-list for extension extendee
	0,  // [0:9] is the sub-list for field type_name
}

func init() { file_treechange_proto_init() }
func file_treechange_proto_init() {
	if File_treechange_proto != nil {
		return
	}
	file_treechange_proto_msgTypes[7].OneofWrappers = []any{
		(*TreeSyncContentValue_HeadUpdate)(nil),
		(*TreeSyncContentValue_FullSyncRequest)(nil),
		(*TreeSyncContentValue_FullSyncResponse)(nil),
		(*TreeSyncContentValue_ErrorResponse)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_treechange_proto_rawDesc), len(file_treechange_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   13,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_treechange_proto_goTypes,
		DependencyIndexes: file_treechange_proto_depIdxs,
		EnumInfos:         file_treechange_proto_enumTypes,
		MessageInfos:      file_treechange_proto_msgTypes,
	}.Build()
	File_treechange_proto = out.File
	file_treechange_proto_goTypes = nil
	file_treechange_proto_depIdxs = nil
}
