// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             (unknown)
// source: autokitteh/user_code/v1/runner_svc.proto

package user_codev1

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 (
	RunnerService_Exports_FullMethodName       = "/autokitteh.user_code.v1.RunnerService/Exports"
	RunnerService_Start_FullMethodName         = "/autokitteh.user_code.v1.RunnerService/Start"
	RunnerService_Execute_FullMethodName       = "/autokitteh.user_code.v1.RunnerService/Execute"
	RunnerService_ActivityReply_FullMethodName = "/autokitteh.user_code.v1.RunnerService/ActivityReply"
	RunnerService_Health_FullMethodName        = "/autokitteh.user_code.v1.RunnerService/Health"
)

// RunnerServiceClient is the client API for RunnerService 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 RunnerServiceClient interface {
	// Get exports
	Exports(ctx context.Context, in *ExportsRequest, opts ...grpc.CallOption) (*ExportsResponse, error)
	// Called at start of session
	Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*StartResponse, error)
	// Execute a function in the runtime (skipped if it's a reply)
	Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error)
	// Reply from activity
	ActivityReply(ctx context.Context, in *ActivityReplyRequest, opts ...grpc.CallOption) (*ActivityReplyResponse, error)
	Health(ctx context.Context, in *RunnerHealthRequest, opts ...grpc.CallOption) (*RunnerHealthResponse, error)
}

type runnerServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewRunnerServiceClient(cc grpc.ClientConnInterface) RunnerServiceClient {
	return &runnerServiceClient{cc}
}

func (c *runnerServiceClient) Exports(ctx context.Context, in *ExportsRequest, opts ...grpc.CallOption) (*ExportsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ExportsResponse)
	err := c.cc.Invoke(ctx, RunnerService_Exports_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *runnerServiceClient) Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*StartResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(StartResponse)
	err := c.cc.Invoke(ctx, RunnerService_Start_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *runnerServiceClient) Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ExecuteResponse)
	err := c.cc.Invoke(ctx, RunnerService_Execute_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *runnerServiceClient) ActivityReply(ctx context.Context, in *ActivityReplyRequest, opts ...grpc.CallOption) (*ActivityReplyResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ActivityReplyResponse)
	err := c.cc.Invoke(ctx, RunnerService_ActivityReply_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *runnerServiceClient) Health(ctx context.Context, in *RunnerHealthRequest, opts ...grpc.CallOption) (*RunnerHealthResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(RunnerHealthResponse)
	err := c.cc.Invoke(ctx, RunnerService_Health_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// RunnerServiceServer is the server API for RunnerService service.
// All implementations must embed UnimplementedRunnerServiceServer
// for forward compatibility.
type RunnerServiceServer interface {
	// Get exports
	Exports(context.Context, *ExportsRequest) (*ExportsResponse, error)
	// Called at start of session
	Start(context.Context, *StartRequest) (*StartResponse, error)
	// Execute a function in the runtime (skipped if it's a reply)
	Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error)
	// Reply from activity
	ActivityReply(context.Context, *ActivityReplyRequest) (*ActivityReplyResponse, error)
	Health(context.Context, *RunnerHealthRequest) (*RunnerHealthResponse, error)
	mustEmbedUnimplementedRunnerServiceServer()
}

// UnimplementedRunnerServiceServer 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 UnimplementedRunnerServiceServer struct{}

func (UnimplementedRunnerServiceServer) Exports(context.Context, *ExportsRequest) (*ExportsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Exports not implemented")
}
func (UnimplementedRunnerServiceServer) Start(context.Context, *StartRequest) (*StartResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Start not implemented")
}
func (UnimplementedRunnerServiceServer) Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Execute not implemented")
}
func (UnimplementedRunnerServiceServer) ActivityReply(context.Context, *ActivityReplyRequest) (*ActivityReplyResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ActivityReply not implemented")
}
func (UnimplementedRunnerServiceServer) Health(context.Context, *RunnerHealthRequest) (*RunnerHealthResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Health not implemented")
}
func (UnimplementedRunnerServiceServer) mustEmbedUnimplementedRunnerServiceServer() {}
func (UnimplementedRunnerServiceServer) testEmbeddedByValue()                       {}

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

func RegisterRunnerServiceServer(s grpc.ServiceRegistrar, srv RunnerServiceServer) {
	// If the following call pancis, it indicates UnimplementedRunnerServiceServer 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(&RunnerService_ServiceDesc, srv)
}

func _RunnerService_Exports_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ExportsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RunnerServiceServer).Exports(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RunnerService_Exports_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RunnerServiceServer).Exports(ctx, req.(*ExportsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RunnerService_Start_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(StartRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RunnerServiceServer).Start(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RunnerService_Start_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RunnerServiceServer).Start(ctx, req.(*StartRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RunnerService_Execute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ExecuteRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RunnerServiceServer).Execute(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RunnerService_Execute_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RunnerServiceServer).Execute(ctx, req.(*ExecuteRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RunnerService_ActivityReply_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ActivityReplyRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RunnerServiceServer).ActivityReply(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RunnerService_ActivityReply_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RunnerServiceServer).ActivityReply(ctx, req.(*ActivityReplyRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RunnerService_Health_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RunnerHealthRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RunnerServiceServer).Health(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RunnerService_Health_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RunnerServiceServer).Health(ctx, req.(*RunnerHealthRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// RunnerService_ServiceDesc is the grpc.ServiceDesc for RunnerService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var RunnerService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "autokitteh.user_code.v1.RunnerService",
	HandlerType: (*RunnerServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Exports",
			Handler:    _RunnerService_Exports_Handler,
		},
		{
			MethodName: "Start",
			Handler:    _RunnerService_Start_Handler,
		},
		{
			MethodName: "Execute",
			Handler:    _RunnerService_Execute_Handler,
		},
		{
			MethodName: "ActivityReply",
			Handler:    _RunnerService_ActivityReply_Handler,
		},
		{
			MethodName: "Health",
			Handler:    _RunnerService_Health_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "autokitteh/user_code/v1/runner_svc.proto",
}
