// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             v3.12.4
// source: orbit.proto

package proto

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.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

const (
	Plugin_Meta_FullMethodName    = "/proto.Plugin/Meta"
	Plugin_Symbols_FullMethodName = "/proto.Plugin/Symbols"
	Plugin_Call_FullMethodName    = "/proto.Plugin/Call"
)

// PluginClient is the client API for Plugin 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.
type PluginClient interface {
	Meta(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Metadata, error)
	Symbols(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*FunctionDefinitions, error)
	Call(ctx context.Context, in *CallRequest, opts ...grpc.CallOption) (*CallReturn, error)
}

type pluginClient struct {
	cc grpc.ClientConnInterface
}

func NewPluginClient(cc grpc.ClientConnInterface) PluginClient {
	return &pluginClient{cc}
}

func (c *pluginClient) Meta(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Metadata, error) {
	out := new(Metadata)
	err := c.cc.Invoke(ctx, Plugin_Meta_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *pluginClient) Symbols(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*FunctionDefinitions, error) {
	out := new(FunctionDefinitions)
	err := c.cc.Invoke(ctx, Plugin_Symbols_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *pluginClient) Call(ctx context.Context, in *CallRequest, opts ...grpc.CallOption) (*CallReturn, error) {
	out := new(CallReturn)
	err := c.cc.Invoke(ctx, Plugin_Call_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// PluginServer is the server API for Plugin service.
// All implementations must embed UnimplementedPluginServer
// for forward compatibility
type PluginServer interface {
	Meta(context.Context, *Empty) (*Metadata, error)
	Symbols(context.Context, *Empty) (*FunctionDefinitions, error)
	Call(context.Context, *CallRequest) (*CallReturn, error)
	mustEmbedUnimplementedPluginServer()
}

// UnimplementedPluginServer must be embedded to have forward compatible implementations.
type UnimplementedPluginServer struct {
}

func (UnimplementedPluginServer) Meta(context.Context, *Empty) (*Metadata, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Meta not implemented")
}
func (UnimplementedPluginServer) Symbols(context.Context, *Empty) (*FunctionDefinitions, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Symbols not implemented")
}
func (UnimplementedPluginServer) Call(context.Context, *CallRequest) (*CallReturn, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Call not implemented")
}
func (UnimplementedPluginServer) mustEmbedUnimplementedPluginServer() {}

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

func RegisterPluginServer(s grpc.ServiceRegistrar, srv PluginServer) {
	s.RegisterService(&Plugin_ServiceDesc, srv)
}

func _Plugin_Meta_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PluginServer).Meta(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Plugin_Meta_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PluginServer).Meta(ctx, req.(*Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _Plugin_Symbols_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PluginServer).Symbols(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Plugin_Symbols_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PluginServer).Symbols(ctx, req.(*Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _Plugin_Call_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CallRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PluginServer).Call(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Plugin_Call_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PluginServer).Call(ctx, req.(*CallRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// Plugin_ServiceDesc is the grpc.ServiceDesc for Plugin service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Plugin_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Plugin",
	HandlerType: (*PluginServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Meta",
			Handler:    _Plugin_Meta_Handler,
		},
		{
			MethodName: "Symbols",
			Handler:    _Plugin_Symbols_Handler,
		},
		{
			MethodName: "Call",
			Handler:    _Plugin_Call_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "orbit.proto",
}

const (
	Module_MemoryRead_FullMethodName  = "/proto.Module/MemoryRead"
	Module_MemoryWrite_FullMethodName = "/proto.Module/MemoryWrite"
)

// ModuleClient is the client API for Module 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.
type ModuleClient interface {
	MemoryRead(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadReturn, error)
	MemoryWrite(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteReturn, error)
}

type moduleClient struct {
	cc grpc.ClientConnInterface
}

func NewModuleClient(cc grpc.ClientConnInterface) ModuleClient {
	return &moduleClient{cc}
}

func (c *moduleClient) MemoryRead(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadReturn, error) {
	out := new(ReadReturn)
	err := c.cc.Invoke(ctx, Module_MemoryRead_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *moduleClient) MemoryWrite(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteReturn, error) {
	out := new(WriteReturn)
	err := c.cc.Invoke(ctx, Module_MemoryWrite_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ModuleServer is the server API for Module service.
// All implementations must embed UnimplementedModuleServer
// for forward compatibility
type ModuleServer interface {
	MemoryRead(context.Context, *ReadRequest) (*ReadReturn, error)
	MemoryWrite(context.Context, *WriteRequest) (*WriteReturn, error)
	mustEmbedUnimplementedModuleServer()
}

// UnimplementedModuleServer must be embedded to have forward compatible implementations.
type UnimplementedModuleServer struct {
}

func (UnimplementedModuleServer) MemoryRead(context.Context, *ReadRequest) (*ReadReturn, error) {
	return nil, status.Errorf(codes.Unimplemented, "method MemoryRead not implemented")
}
func (UnimplementedModuleServer) MemoryWrite(context.Context, *WriteRequest) (*WriteReturn, error) {
	return nil, status.Errorf(codes.Unimplemented, "method MemoryWrite not implemented")
}
func (UnimplementedModuleServer) mustEmbedUnimplementedModuleServer() {}

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

func RegisterModuleServer(s grpc.ServiceRegistrar, srv ModuleServer) {
	s.RegisterService(&Module_ServiceDesc, srv)
}

func _Module_MemoryRead_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ReadRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ModuleServer).MemoryRead(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Module_MemoryRead_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ModuleServer).MemoryRead(ctx, req.(*ReadRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Module_MemoryWrite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(WriteRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ModuleServer).MemoryWrite(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Module_MemoryWrite_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ModuleServer).MemoryWrite(ctx, req.(*WriteRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// Module_ServiceDesc is the grpc.ServiceDesc for Module service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Module_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Module",
	HandlerType: (*ModuleServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "MemoryRead",
			Handler:    _Module_MemoryRead_Handler,
		},
		{
			MethodName: "MemoryWrite",
			Handler:    _Module_MemoryWrite_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "orbit.proto",
}
