// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.11
// 	protoc        v7.35.0
// source: proto/server/tap.proto

package server

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)
)

// TapEvent messages are based on the Tap Event design from ABFS (see
// go/abfs-casfs-doc)
type TapEventType int32

const (
	TapEventType_TAP_UNSPECIFIED  TapEventType = 0
	TapEventType_TAP_MKDIR        TapEventType = 1
	TapEventType_TAP_SYMLINK      TapEventType = 2
	TapEventType_TAP_LINK         TapEventType = 3
	TapEventType_TAP_UNLINK       TapEventType = 4
	TapEventType_TAP_RENAME       TapEventType = 5
	TapEventType_TAP_READDIR      TapEventType = 6
	TapEventType_TAP_OPEN_WRITE   TapEventType = 7
	TapEventType_TAP_OPEN_READ    TapEventType = 8
	TapEventType_TAP_OPEN_RDWR    TapEventType = 9
	TapEventType_TAP_CLOSE        TapEventType = 10
	TapEventType_TAP_SYMLINK_READ TapEventType = 11
	TapEventType_TAP_STAT         TapEventType = 12
	TapEventType_TAP_ATTR_CHANGE  TapEventType = 13
)

// Enum value maps for TapEventType.
var (
	TapEventType_name = map[int32]string{
		0:  "TAP_UNSPECIFIED",
		1:  "TAP_MKDIR",
		2:  "TAP_SYMLINK",
		3:  "TAP_LINK",
		4:  "TAP_UNLINK",
		5:  "TAP_RENAME",
		6:  "TAP_READDIR",
		7:  "TAP_OPEN_WRITE",
		8:  "TAP_OPEN_READ",
		9:  "TAP_OPEN_RDWR",
		10: "TAP_CLOSE",
		11: "TAP_SYMLINK_READ",
		12: "TAP_STAT",
		13: "TAP_ATTR_CHANGE",
	}
	TapEventType_value = map[string]int32{
		"TAP_UNSPECIFIED":  0,
		"TAP_MKDIR":        1,
		"TAP_SYMLINK":      2,
		"TAP_LINK":         3,
		"TAP_UNLINK":       4,
		"TAP_RENAME":       5,
		"TAP_READDIR":      6,
		"TAP_OPEN_WRITE":   7,
		"TAP_OPEN_READ":    8,
		"TAP_OPEN_RDWR":    9,
		"TAP_CLOSE":        10,
		"TAP_SYMLINK_READ": 11,
		"TAP_STAT":         12,
		"TAP_ATTR_CHANGE":  13,
	}
)

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

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

func (TapEventType) Descriptor() protoreflect.EnumDescriptor {
	return file_proto_server_tap_proto_enumTypes[0].Descriptor()
}

func (TapEventType) Type() protoreflect.EnumType {
	return &file_proto_server_tap_proto_enumTypes[0]
}

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

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

type StartTapSessionRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The process group id to provide file tap events for.
	ProcessGroupId int64 `protobuf:"varint,1,opt,name=process_group_id,json=processGroupId,proto3" json:"process_group_id,omitempty"`
	unknownFields  protoimpl.UnknownFields
	sizeCache      protoimpl.SizeCache
}

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

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

func (*StartTapSessionRequest) ProtoMessage() {}

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

func (x *StartTapSessionRequest) GetProcessGroupId() int64 {
	if x != nil {
		return x.ProcessGroupId
	}
	return 0
}

type FinishTapSessionRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The process group id to stop providing tap events for.  There should be
	// one active TapEvent stream with a matching process_group_id when this
	// is called.
	ProcessGroupId int64 `protobuf:"varint,1,opt,name=process_group_id,json=processGroupId,proto3" json:"process_group_id,omitempty"`
	unknownFields  protoimpl.UnknownFields
	sizeCache      protoimpl.SizeCache
}

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

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

func (*FinishTapSessionRequest) ProtoMessage() {}

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

func (x *FinishTapSessionRequest) GetProcessGroupId() int64 {
	if x != nil {
		return x.ProcessGroupId
	}
	return 0
}

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

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

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

func (*FinishTapSessionResponse) ProtoMessage() {}

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

type ExcludeProcessGroupFromTapsRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The process group id to exclude from tap events.
	ProcessGroupId int64 `protobuf:"varint,1,opt,name=process_group_id,json=processGroupId,proto3" json:"process_group_id,omitempty"`
	unknownFields  protoimpl.UnknownFields
	sizeCache      protoimpl.SizeCache
}

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

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

func (*ExcludeProcessGroupFromTapsRequest) ProtoMessage() {}

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

func (x *ExcludeProcessGroupFromTapsRequest) GetProcessGroupId() int64 {
	if x != nil {
		return x.ProcessGroupId
	}
	return 0
}

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

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

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

func (*ExcludeProcessGroupFromTapsResponse) ProtoMessage() {}

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

type TapEventBatch struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// A batch of TapEvents
	TapEvent      []*TapEvent `protobuf:"bytes,1,rep,name=tap_event,json=tapEvent,proto3" json:"tap_event,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*TapEventBatch) ProtoMessage() {}

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

func (x *TapEventBatch) GetTapEvent() []*TapEvent {
	if x != nil {
		return x.TapEvent
	}
	return nil
}

type TapEvent struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The type of tap event.
	Type TapEventType `protobuf:"varint,1,opt,name=type,proto3,enum=cartfs.TapEventType" json:"type,omitempty"`
	// The file path in the CartFS mount where the event happened.
	Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	// An optional second path that the event is related to, valid for
	// TAP_RENAME or TAP_LINK events.
	// For TAP_RENAME and TAP_LINK, this is the source path.
	SecondPath string `protobuf:"bytes,3,opt,name=second_path,json=secondPath,proto3" json:"second_path,omitempty"`
	// Filemode field of the inode.
	UnixFileMode uint32 `protobuf:"varint,4,opt,name=unix_file_mode,json=unixFileMode,proto3" json:"unix_file_mode,omitempty"`
	// Digest of the file (hash and size).  Hash will be sha256 for now, but
	// but could be sha1 or others later.  If the digest isn't set, then the
	// node is considered not snapshotted at this point.
	Hash          string `protobuf:"bytes,5,opt,name=hash,proto3" json:"hash,omitempty"`
	Size          uint64 `protobuf:"varint,6,opt,name=size,proto3" json:"size,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*TapEvent) ProtoMessage() {}

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

func (x *TapEvent) GetType() TapEventType {
	if x != nil {
		return x.Type
	}
	return TapEventType_TAP_UNSPECIFIED
}

func (x *TapEvent) GetPath() string {
	if x != nil {
		return x.Path
	}
	return ""
}

func (x *TapEvent) GetSecondPath() string {
	if x != nil {
		return x.SecondPath
	}
	return ""
}

func (x *TapEvent) GetUnixFileMode() uint32 {
	if x != nil {
		return x.UnixFileMode
	}
	return 0
}

func (x *TapEvent) GetHash() string {
	if x != nil {
		return x.Hash
	}
	return ""
}

func (x *TapEvent) GetSize() uint64 {
	if x != nil {
		return x.Size
	}
	return 0
}

var File_proto_server_tap_proto protoreflect.FileDescriptor

const file_proto_server_tap_proto_rawDesc = "" +
	"\n" +
	"\x16proto/server/tap.proto\x12\x06cartfs\"B\n" +
	"\x16StartTapSessionRequest\x12(\n" +
	"\x10process_group_id\x18\x01 \x01(\x03R\x0eprocessGroupId\"C\n" +
	"\x17FinishTapSessionRequest\x12(\n" +
	"\x10process_group_id\x18\x01 \x01(\x03R\x0eprocessGroupId\"\x1a\n" +
	"\x18FinishTapSessionResponse\"N\n" +
	"\"ExcludeProcessGroupFromTapsRequest\x12(\n" +
	"\x10process_group_id\x18\x01 \x01(\x03R\x0eprocessGroupId\"%\n" +
	"#ExcludeProcessGroupFromTapsResponse\">\n" +
	"\rTapEventBatch\x12-\n" +
	"\ttap_event\x18\x01 \x03(\v2\x10.cartfs.TapEventR\btapEvent\"\xb7\x01\n" +
	"\bTapEvent\x12(\n" +
	"\x04type\x18\x01 \x01(\x0e2\x14.cartfs.TapEventTypeR\x04type\x12\x12\n" +
	"\x04path\x18\x02 \x01(\tR\x04path\x12\x1f\n" +
	"\vsecond_path\x18\x03 \x01(\tR\n" +
	"secondPath\x12$\n" +
	"\x0eunix_file_mode\x18\x04 \x01(\rR\funixFileMode\x12\x12\n" +
	"\x04hash\x18\x05 \x01(\tR\x04hash\x12\x12\n" +
	"\x04size\x18\x06 \x01(\x04R\x04size*\x84\x02\n" +
	"\fTapEventType\x12\x13\n" +
	"\x0fTAP_UNSPECIFIED\x10\x00\x12\r\n" +
	"\tTAP_MKDIR\x10\x01\x12\x0f\n" +
	"\vTAP_SYMLINK\x10\x02\x12\f\n" +
	"\bTAP_LINK\x10\x03\x12\x0e\n" +
	"\n" +
	"TAP_UNLINK\x10\x04\x12\x0e\n" +
	"\n" +
	"TAP_RENAME\x10\x05\x12\x0f\n" +
	"\vTAP_READDIR\x10\x06\x12\x12\n" +
	"\x0eTAP_OPEN_WRITE\x10\a\x12\x11\n" +
	"\rTAP_OPEN_READ\x10\b\x12\x11\n" +
	"\rTAP_OPEN_RDWR\x10\t\x12\r\n" +
	"\tTAP_CLOSE\x10\n" +
	"\x12\x14\n" +
	"\x10TAP_SYMLINK_READ\x10\v\x12\f\n" +
	"\bTAP_STAT\x10\f\x12\x13\n" +
	"\x0fTAP_ATTR_CHANGE\x10\rB@Z>go.chromium.org/build/siso/toolsupport/cartfsutil/proto/serverb\x06proto3"

var (
	file_proto_server_tap_proto_rawDescOnce sync.Once
	file_proto_server_tap_proto_rawDescData []byte
)

func file_proto_server_tap_proto_rawDescGZIP() []byte {
	file_proto_server_tap_proto_rawDescOnce.Do(func() {
		file_proto_server_tap_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proto_server_tap_proto_rawDesc), len(file_proto_server_tap_proto_rawDesc)))
	})
	return file_proto_server_tap_proto_rawDescData
}

var file_proto_server_tap_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_proto_server_tap_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_proto_server_tap_proto_goTypes = []any{
	(TapEventType)(0),                           // 0: cartfs.TapEventType
	(*StartTapSessionRequest)(nil),              // 1: cartfs.StartTapSessionRequest
	(*FinishTapSessionRequest)(nil),             // 2: cartfs.FinishTapSessionRequest
	(*FinishTapSessionResponse)(nil),            // 3: cartfs.FinishTapSessionResponse
	(*ExcludeProcessGroupFromTapsRequest)(nil),  // 4: cartfs.ExcludeProcessGroupFromTapsRequest
	(*ExcludeProcessGroupFromTapsResponse)(nil), // 5: cartfs.ExcludeProcessGroupFromTapsResponse
	(*TapEventBatch)(nil),                       // 6: cartfs.TapEventBatch
	(*TapEvent)(nil),                            // 7: cartfs.TapEvent
}
var file_proto_server_tap_proto_depIdxs = []int32{
	7, // 0: cartfs.TapEventBatch.tap_event:type_name -> cartfs.TapEvent
	0, // 1: cartfs.TapEvent.type:type_name -> cartfs.TapEventType
	2, // [2:2] is the sub-list for method output_type
	2, // [2:2] is the sub-list for method input_type
	2, // [2:2] is the sub-list for extension type_name
	2, // [2:2] is the sub-list for extension extendee
	0, // [0:2] is the sub-list for field type_name
}

func init() { file_proto_server_tap_proto_init() }
func file_proto_server_tap_proto_init() {
	if File_proto_server_tap_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_server_tap_proto_rawDesc), len(file_proto_server_tap_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   7,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_proto_server_tap_proto_goTypes,
		DependencyIndexes: file_proto_server_tap_proto_depIdxs,
		EnumInfos:         file_proto_server_tap_proto_enumTypes,
		MessageInfos:      file_proto_server_tap_proto_msgTypes,
	}.Build()
	File_proto_server_tap_proto = out.File
	file_proto_server_tap_proto_goTypes = nil
	file_proto_server_tap_proto_depIdxs = nil
}
