// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.0
// - protoc             v3.21.12
// source: persist.proto

package persist

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	PersistService_Ping_FullMethodName                  = "/joblet.persist.PersistService/Ping"
	PersistService_QueryLogs_FullMethodName             = "/joblet.persist.PersistService/QueryLogs"
	PersistService_QueryMetrics_FullMethodName          = "/joblet.persist.PersistService/QueryMetrics"
	PersistService_QueryExecEvents_FullMethodName       = "/joblet.persist.PersistService/QueryExecEvents"
	PersistService_QueryConnectEvents_FullMethodName    = "/joblet.persist.PersistService/QueryConnectEvents"
	PersistService_QueryMmapEvents_FullMethodName       = "/joblet.persist.PersistService/QueryMmapEvents"
	PersistService_QueryMprotectEvents_FullMethodName   = "/joblet.persist.PersistService/QueryMprotectEvents"
	PersistService_QueryFileEvents_FullMethodName       = "/joblet.persist.PersistService/QueryFileEvents"
	PersistService_QueryAcceptEvents_FullMethodName     = "/joblet.persist.PersistService/QueryAcceptEvents"
	PersistService_QuerySocketDataEvents_FullMethodName = "/joblet.persist.PersistService/QuerySocketDataEvents"
	PersistService_DeleteJob_FullMethodName             = "/joblet.persist.PersistService/DeleteJob"
)

// PersistServiceClient is the client API for PersistService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// PersistService is an INTERNAL service for joblet-core ←→ persist IPC communication.
//
// ⚠️  DO NOT USE DIRECTLY - This service is for internal communication only via Unix socket.
//
// Public API: Use JobService.QueryLogs() and JobService.QueryMetrics()
//
//	These methods proxy to this internal service automatically.
//
// This service is provided by persist subprocess and communicates via Unix socket IPC.
type PersistServiceClient interface {
	// Health check - verify persist is running and responsive
	Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
	// Query logs for a job from disk storage
	QueryLogs(ctx context.Context, in *QueryLogsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LogLine], error)
	// Query metrics for a job from disk storage
	QueryMetrics(ctx context.Context, in *QueryMetricsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Metric], error)
	// Query exec events (eBPF telemetry) for a job
	QueryExecEvents(ctx context.Context, in *QueryTelemetryRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ExecEvent], error)
	// Query connect events (eBPF telemetry) for a job
	QueryConnectEvents(ctx context.Context, in *QueryTelemetryRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ConnectEvent], error)
	// Query mmap events (eBPF telemetry) for a job
	QueryMmapEvents(ctx context.Context, in *QueryTelemetryRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[MmapEvent], error)
	// Query mprotect events (eBPF telemetry) for a job
	QueryMprotectEvents(ctx context.Context, in *QueryTelemetryRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[MprotectEvent], error)
	// Query file events (eBPF telemetry) for a job
	QueryFileEvents(ctx context.Context, in *QueryTelemetryRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[FileEvent], error)
	// Query accept events (eBPF telemetry) for a job
	QueryAcceptEvents(ctx context.Context, in *QueryTelemetryRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[AcceptEvent], error)
	// Query socket data events (eBPF telemetry) for a job
	QuerySocketDataEvents(ctx context.Context, in *QueryTelemetryRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SocketDataEvent], error)
	// Delete all persisted data for a job (admin only)
	DeleteJob(ctx context.Context, in *DeleteJobRequest, opts ...grpc.CallOption) (*DeleteJobResponse, error)
}

type persistServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewPersistServiceClient(cc grpc.ClientConnInterface) PersistServiceClient {
	return &persistServiceClient{cc}
}

func (c *persistServiceClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(PingResponse)
	err := c.cc.Invoke(ctx, PersistService_Ping_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *persistServiceClient) QueryLogs(ctx context.Context, in *QueryLogsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LogLine], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &PersistService_ServiceDesc.Streams[0], PersistService_QueryLogs_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[QueryLogsRequest, LogLine]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PersistService_QueryLogsClient = grpc.ServerStreamingClient[LogLine]

func (c *persistServiceClient) QueryMetrics(ctx context.Context, in *QueryMetricsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Metric], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &PersistService_ServiceDesc.Streams[1], PersistService_QueryMetrics_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[QueryMetricsRequest, Metric]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PersistService_QueryMetricsClient = grpc.ServerStreamingClient[Metric]

func (c *persistServiceClient) QueryExecEvents(ctx context.Context, in *QueryTelemetryRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ExecEvent], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &PersistService_ServiceDesc.Streams[2], PersistService_QueryExecEvents_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[QueryTelemetryRequest, ExecEvent]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PersistService_QueryExecEventsClient = grpc.ServerStreamingClient[ExecEvent]

func (c *persistServiceClient) QueryConnectEvents(ctx context.Context, in *QueryTelemetryRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ConnectEvent], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &PersistService_ServiceDesc.Streams[3], PersistService_QueryConnectEvents_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[QueryTelemetryRequest, ConnectEvent]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PersistService_QueryConnectEventsClient = grpc.ServerStreamingClient[ConnectEvent]

func (c *persistServiceClient) QueryMmapEvents(ctx context.Context, in *QueryTelemetryRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[MmapEvent], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &PersistService_ServiceDesc.Streams[4], PersistService_QueryMmapEvents_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[QueryTelemetryRequest, MmapEvent]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PersistService_QueryMmapEventsClient = grpc.ServerStreamingClient[MmapEvent]

func (c *persistServiceClient) QueryMprotectEvents(ctx context.Context, in *QueryTelemetryRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[MprotectEvent], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &PersistService_ServiceDesc.Streams[5], PersistService_QueryMprotectEvents_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[QueryTelemetryRequest, MprotectEvent]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PersistService_QueryMprotectEventsClient = grpc.ServerStreamingClient[MprotectEvent]

func (c *persistServiceClient) QueryFileEvents(ctx context.Context, in *QueryTelemetryRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[FileEvent], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &PersistService_ServiceDesc.Streams[6], PersistService_QueryFileEvents_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[QueryTelemetryRequest, FileEvent]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PersistService_QueryFileEventsClient = grpc.ServerStreamingClient[FileEvent]

func (c *persistServiceClient) QueryAcceptEvents(ctx context.Context, in *QueryTelemetryRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[AcceptEvent], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &PersistService_ServiceDesc.Streams[7], PersistService_QueryAcceptEvents_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[QueryTelemetryRequest, AcceptEvent]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PersistService_QueryAcceptEventsClient = grpc.ServerStreamingClient[AcceptEvent]

func (c *persistServiceClient) QuerySocketDataEvents(ctx context.Context, in *QueryTelemetryRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SocketDataEvent], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &PersistService_ServiceDesc.Streams[8], PersistService_QuerySocketDataEvents_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[QueryTelemetryRequest, SocketDataEvent]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PersistService_QuerySocketDataEventsClient = grpc.ServerStreamingClient[SocketDataEvent]

func (c *persistServiceClient) DeleteJob(ctx context.Context, in *DeleteJobRequest, opts ...grpc.CallOption) (*DeleteJobResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DeleteJobResponse)
	err := c.cc.Invoke(ctx, PersistService_DeleteJob_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// PersistServiceServer is the server API for PersistService service.
// All implementations must embed UnimplementedPersistServiceServer
// for forward compatibility.
//
// PersistService is an INTERNAL service for joblet-core ←→ persist IPC communication.
//
// ⚠️  DO NOT USE DIRECTLY - This service is for internal communication only via Unix socket.
//
// Public API: Use JobService.QueryLogs() and JobService.QueryMetrics()
//
//	These methods proxy to this internal service automatically.
//
// This service is provided by persist subprocess and communicates via Unix socket IPC.
type PersistServiceServer interface {
	// Health check - verify persist is running and responsive
	Ping(context.Context, *PingRequest) (*PingResponse, error)
	// Query logs for a job from disk storage
	QueryLogs(*QueryLogsRequest, grpc.ServerStreamingServer[LogLine]) error
	// Query metrics for a job from disk storage
	QueryMetrics(*QueryMetricsRequest, grpc.ServerStreamingServer[Metric]) error
	// Query exec events (eBPF telemetry) for a job
	QueryExecEvents(*QueryTelemetryRequest, grpc.ServerStreamingServer[ExecEvent]) error
	// Query connect events (eBPF telemetry) for a job
	QueryConnectEvents(*QueryTelemetryRequest, grpc.ServerStreamingServer[ConnectEvent]) error
	// Query mmap events (eBPF telemetry) for a job
	QueryMmapEvents(*QueryTelemetryRequest, grpc.ServerStreamingServer[MmapEvent]) error
	// Query mprotect events (eBPF telemetry) for a job
	QueryMprotectEvents(*QueryTelemetryRequest, grpc.ServerStreamingServer[MprotectEvent]) error
	// Query file events (eBPF telemetry) for a job
	QueryFileEvents(*QueryTelemetryRequest, grpc.ServerStreamingServer[FileEvent]) error
	// Query accept events (eBPF telemetry) for a job
	QueryAcceptEvents(*QueryTelemetryRequest, grpc.ServerStreamingServer[AcceptEvent]) error
	// Query socket data events (eBPF telemetry) for a job
	QuerySocketDataEvents(*QueryTelemetryRequest, grpc.ServerStreamingServer[SocketDataEvent]) error
	// Delete all persisted data for a job (admin only)
	DeleteJob(context.Context, *DeleteJobRequest) (*DeleteJobResponse, error)
	mustEmbedUnimplementedPersistServiceServer()
}

// UnimplementedPersistServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedPersistServiceServer struct{}

func (UnimplementedPersistServiceServer) Ping(context.Context, *PingRequest) (*PingResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method Ping not implemented")
}
func (UnimplementedPersistServiceServer) QueryLogs(*QueryLogsRequest, grpc.ServerStreamingServer[LogLine]) error {
	return status.Error(codes.Unimplemented, "method QueryLogs not implemented")
}
func (UnimplementedPersistServiceServer) QueryMetrics(*QueryMetricsRequest, grpc.ServerStreamingServer[Metric]) error {
	return status.Error(codes.Unimplemented, "method QueryMetrics not implemented")
}
func (UnimplementedPersistServiceServer) QueryExecEvents(*QueryTelemetryRequest, grpc.ServerStreamingServer[ExecEvent]) error {
	return status.Error(codes.Unimplemented, "method QueryExecEvents not implemented")
}
func (UnimplementedPersistServiceServer) QueryConnectEvents(*QueryTelemetryRequest, grpc.ServerStreamingServer[ConnectEvent]) error {
	return status.Error(codes.Unimplemented, "method QueryConnectEvents not implemented")
}
func (UnimplementedPersistServiceServer) QueryMmapEvents(*QueryTelemetryRequest, grpc.ServerStreamingServer[MmapEvent]) error {
	return status.Error(codes.Unimplemented, "method QueryMmapEvents not implemented")
}
func (UnimplementedPersistServiceServer) QueryMprotectEvents(*QueryTelemetryRequest, grpc.ServerStreamingServer[MprotectEvent]) error {
	return status.Error(codes.Unimplemented, "method QueryMprotectEvents not implemented")
}
func (UnimplementedPersistServiceServer) QueryFileEvents(*QueryTelemetryRequest, grpc.ServerStreamingServer[FileEvent]) error {
	return status.Error(codes.Unimplemented, "method QueryFileEvents not implemented")
}
func (UnimplementedPersistServiceServer) QueryAcceptEvents(*QueryTelemetryRequest, grpc.ServerStreamingServer[AcceptEvent]) error {
	return status.Error(codes.Unimplemented, "method QueryAcceptEvents not implemented")
}
func (UnimplementedPersistServiceServer) QuerySocketDataEvents(*QueryTelemetryRequest, grpc.ServerStreamingServer[SocketDataEvent]) error {
	return status.Error(codes.Unimplemented, "method QuerySocketDataEvents not implemented")
}
func (UnimplementedPersistServiceServer) DeleteJob(context.Context, *DeleteJobRequest) (*DeleteJobResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method DeleteJob not implemented")
}
func (UnimplementedPersistServiceServer) mustEmbedUnimplementedPersistServiceServer() {}
func (UnimplementedPersistServiceServer) testEmbeddedByValue()                        {}

// UnsafePersistServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PersistServiceServer will
// result in compilation errors.
type UnsafePersistServiceServer interface {
	mustEmbedUnimplementedPersistServiceServer()
}

func RegisterPersistServiceServer(s grpc.ServiceRegistrar, srv PersistServiceServer) {
	// If the following call panics, it indicates UnimplementedPersistServiceServer was
	// embedded by pointer and is nil.  This will cause panics if an
	// unimplemented method is ever invoked, so we test this at initialization
	// time to prevent it from happening at runtime later due to I/O.
	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
		t.testEmbeddedByValue()
	}
	s.RegisterService(&PersistService_ServiceDesc, srv)
}

func _PersistService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PingRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PersistServiceServer).Ping(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PersistService_Ping_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PersistServiceServer).Ping(ctx, req.(*PingRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _PersistService_QueryLogs_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(QueryLogsRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(PersistServiceServer).QueryLogs(m, &grpc.GenericServerStream[QueryLogsRequest, LogLine]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PersistService_QueryLogsServer = grpc.ServerStreamingServer[LogLine]

func _PersistService_QueryMetrics_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(QueryMetricsRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(PersistServiceServer).QueryMetrics(m, &grpc.GenericServerStream[QueryMetricsRequest, Metric]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PersistService_QueryMetricsServer = grpc.ServerStreamingServer[Metric]

func _PersistService_QueryExecEvents_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(QueryTelemetryRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(PersistServiceServer).QueryExecEvents(m, &grpc.GenericServerStream[QueryTelemetryRequest, ExecEvent]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PersistService_QueryExecEventsServer = grpc.ServerStreamingServer[ExecEvent]

func _PersistService_QueryConnectEvents_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(QueryTelemetryRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(PersistServiceServer).QueryConnectEvents(m, &grpc.GenericServerStream[QueryTelemetryRequest, ConnectEvent]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PersistService_QueryConnectEventsServer = grpc.ServerStreamingServer[ConnectEvent]

func _PersistService_QueryMmapEvents_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(QueryTelemetryRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(PersistServiceServer).QueryMmapEvents(m, &grpc.GenericServerStream[QueryTelemetryRequest, MmapEvent]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PersistService_QueryMmapEventsServer = grpc.ServerStreamingServer[MmapEvent]

func _PersistService_QueryMprotectEvents_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(QueryTelemetryRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(PersistServiceServer).QueryMprotectEvents(m, &grpc.GenericServerStream[QueryTelemetryRequest, MprotectEvent]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PersistService_QueryMprotectEventsServer = grpc.ServerStreamingServer[MprotectEvent]

func _PersistService_QueryFileEvents_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(QueryTelemetryRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(PersistServiceServer).QueryFileEvents(m, &grpc.GenericServerStream[QueryTelemetryRequest, FileEvent]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PersistService_QueryFileEventsServer = grpc.ServerStreamingServer[FileEvent]

func _PersistService_QueryAcceptEvents_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(QueryTelemetryRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(PersistServiceServer).QueryAcceptEvents(m, &grpc.GenericServerStream[QueryTelemetryRequest, AcceptEvent]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PersistService_QueryAcceptEventsServer = grpc.ServerStreamingServer[AcceptEvent]

func _PersistService_QuerySocketDataEvents_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(QueryTelemetryRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(PersistServiceServer).QuerySocketDataEvents(m, &grpc.GenericServerStream[QueryTelemetryRequest, SocketDataEvent]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PersistService_QuerySocketDataEventsServer = grpc.ServerStreamingServer[SocketDataEvent]

func _PersistService_DeleteJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteJobRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PersistServiceServer).DeleteJob(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PersistService_DeleteJob_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PersistServiceServer).DeleteJob(ctx, req.(*DeleteJobRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// PersistService_ServiceDesc is the grpc.ServiceDesc for PersistService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PersistService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "joblet.persist.PersistService",
	HandlerType: (*PersistServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Ping",
			Handler:    _PersistService_Ping_Handler,
		},
		{
			MethodName: "DeleteJob",
			Handler:    _PersistService_DeleteJob_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "QueryLogs",
			Handler:       _PersistService_QueryLogs_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "QueryMetrics",
			Handler:       _PersistService_QueryMetrics_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "QueryExecEvents",
			Handler:       _PersistService_QueryExecEvents_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "QueryConnectEvents",
			Handler:       _PersistService_QueryConnectEvents_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "QueryMmapEvents",
			Handler:       _PersistService_QueryMmapEvents_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "QueryMprotectEvents",
			Handler:       _PersistService_QueryMprotectEvents_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "QueryFileEvents",
			Handler:       _PersistService_QueryFileEvents_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "QueryAcceptEvents",
			Handler:       _PersistService_QueryAcceptEvents_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "QuerySocketDataEvents",
			Handler:       _PersistService_QuerySocketDataEvents_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "persist.proto",
}
