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

package v1

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	emptypb "google.golang.org/protobuf/types/known/emptypb"
)

// 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 (
	Engine_AddDefaultJob_FullMethodName    = "/api.engine.v1.Engine/AddDefaultJob"
	Engine_AddPeriodicJob_FullMethodName   = "/api.engine.v1.Engine/AddPeriodicJob"
	Engine_AddDelayedJob_FullMethodName    = "/api.engine.v1.Engine/AddDelayedJob"
	Engine_RemoveJob_FullMethodName        = "/api.engine.v1.Engine/RemoveJob"
	Engine_ListJobOnceTask_FullMethodName  = "/api.engine.v1.Engine/ListJobOnceTask"
	Engine_ListScheduledJob_FullMethodName = "/api.engine.v1.Engine/ListScheduledJob"
	Engine_CreateContainer_FullMethodName  = "/api.engine.v1.Engine/CreateContainer"
	Engine_ListContainers_FullMethodName   = "/api.engine.v1.Engine/ListContainers"
	Engine_InspectContainer_FullMethodName = "/api.engine.v1.Engine/InspectContainer"
)

// EngineClient is the client API for Engine 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 EngineClient interface {
	// 任务调度相关
	AddDefaultJob(ctx context.Context, in *AddDefaultJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	AddPeriodicJob(ctx context.Context, in *AddPeriodicJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	AddDelayedJob(ctx context.Context, in *AddDelayedJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	RemoveJob(ctx context.Context, in *RemoveJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	ListJobOnceTask(ctx context.Context, in *ListJobOnceTaskRequest, opts ...grpc.CallOption) (*ListJobReply, error)
	ListScheduledJob(ctx context.Context, in *ListScheduledJobRequest, opts ...grpc.CallOption) (*ListJobReply, error)
	// 容器相关
	CreateContainer(ctx context.Context, in *CreateContainerRequest, opts ...grpc.CallOption) (*CreateContainerReply, error)
	ListContainers(ctx context.Context, in *ListContainerRequest, opts ...grpc.CallOption) (*ListContainersReply, error)
	InspectContainer(ctx context.Context, in *InspectContainerRequest, opts ...grpc.CallOption) (*InspectContainerReply, error)
}

type engineClient struct {
	cc grpc.ClientConnInterface
}

func NewEngineClient(cc grpc.ClientConnInterface) EngineClient {
	return &engineClient{cc}
}

func (c *engineClient) AddDefaultJob(ctx context.Context, in *AddDefaultJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, Engine_AddDefaultJob_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *engineClient) AddPeriodicJob(ctx context.Context, in *AddPeriodicJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, Engine_AddPeriodicJob_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *engineClient) AddDelayedJob(ctx context.Context, in *AddDelayedJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, Engine_AddDelayedJob_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *engineClient) RemoveJob(ctx context.Context, in *RemoveJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, Engine_RemoveJob_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *engineClient) ListJobOnceTask(ctx context.Context, in *ListJobOnceTaskRequest, opts ...grpc.CallOption) (*ListJobReply, error) {
	out := new(ListJobReply)
	err := c.cc.Invoke(ctx, Engine_ListJobOnceTask_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *engineClient) ListScheduledJob(ctx context.Context, in *ListScheduledJobRequest, opts ...grpc.CallOption) (*ListJobReply, error) {
	out := new(ListJobReply)
	err := c.cc.Invoke(ctx, Engine_ListScheduledJob_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *engineClient) CreateContainer(ctx context.Context, in *CreateContainerRequest, opts ...grpc.CallOption) (*CreateContainerReply, error) {
	out := new(CreateContainerReply)
	err := c.cc.Invoke(ctx, Engine_CreateContainer_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *engineClient) ListContainers(ctx context.Context, in *ListContainerRequest, opts ...grpc.CallOption) (*ListContainersReply, error) {
	out := new(ListContainersReply)
	err := c.cc.Invoke(ctx, Engine_ListContainers_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *engineClient) InspectContainer(ctx context.Context, in *InspectContainerRequest, opts ...grpc.CallOption) (*InspectContainerReply, error) {
	out := new(InspectContainerReply)
	err := c.cc.Invoke(ctx, Engine_InspectContainer_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// EngineServer is the server API for Engine service.
// All implementations must embed UnimplementedEngineServer
// for forward compatibility
type EngineServer interface {
	// 任务调度相关
	AddDefaultJob(context.Context, *AddDefaultJobRequest) (*emptypb.Empty, error)
	AddPeriodicJob(context.Context, *AddPeriodicJobRequest) (*emptypb.Empty, error)
	AddDelayedJob(context.Context, *AddDelayedJobRequest) (*emptypb.Empty, error)
	RemoveJob(context.Context, *RemoveJobRequest) (*emptypb.Empty, error)
	ListJobOnceTask(context.Context, *ListJobOnceTaskRequest) (*ListJobReply, error)
	ListScheduledJob(context.Context, *ListScheduledJobRequest) (*ListJobReply, error)
	// 容器相关
	CreateContainer(context.Context, *CreateContainerRequest) (*CreateContainerReply, error)
	ListContainers(context.Context, *ListContainerRequest) (*ListContainersReply, error)
	InspectContainer(context.Context, *InspectContainerRequest) (*InspectContainerReply, error)
	mustEmbedUnimplementedEngineServer()
}

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

func (UnimplementedEngineServer) AddDefaultJob(context.Context, *AddDefaultJobRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method AddDefaultJob not implemented")
}
func (UnimplementedEngineServer) AddPeriodicJob(context.Context, *AddPeriodicJobRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method AddPeriodicJob not implemented")
}
func (UnimplementedEngineServer) AddDelayedJob(context.Context, *AddDelayedJobRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method AddDelayedJob not implemented")
}
func (UnimplementedEngineServer) RemoveJob(context.Context, *RemoveJobRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RemoveJob not implemented")
}
func (UnimplementedEngineServer) ListJobOnceTask(context.Context, *ListJobOnceTaskRequest) (*ListJobReply, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListJobOnceTask not implemented")
}
func (UnimplementedEngineServer) ListScheduledJob(context.Context, *ListScheduledJobRequest) (*ListJobReply, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListScheduledJob not implemented")
}
func (UnimplementedEngineServer) CreateContainer(context.Context, *CreateContainerRequest) (*CreateContainerReply, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateContainer not implemented")
}
func (UnimplementedEngineServer) ListContainers(context.Context, *ListContainerRequest) (*ListContainersReply, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListContainers not implemented")
}
func (UnimplementedEngineServer) InspectContainer(context.Context, *InspectContainerRequest) (*InspectContainerReply, error) {
	return nil, status.Errorf(codes.Unimplemented, "method InspectContainer not implemented")
}
func (UnimplementedEngineServer) mustEmbedUnimplementedEngineServer() {}

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

func RegisterEngineServer(s grpc.ServiceRegistrar, srv EngineServer) {
	s.RegisterService(&Engine_ServiceDesc, srv)
}

func _Engine_AddDefaultJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AddDefaultJobRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(EngineServer).AddDefaultJob(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Engine_AddDefaultJob_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(EngineServer).AddDefaultJob(ctx, req.(*AddDefaultJobRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Engine_AddPeriodicJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AddPeriodicJobRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(EngineServer).AddPeriodicJob(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Engine_AddPeriodicJob_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(EngineServer).AddPeriodicJob(ctx, req.(*AddPeriodicJobRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Engine_AddDelayedJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AddDelayedJobRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(EngineServer).AddDelayedJob(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Engine_AddDelayedJob_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(EngineServer).AddDelayedJob(ctx, req.(*AddDelayedJobRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Engine_RemoveJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RemoveJobRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(EngineServer).RemoveJob(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Engine_RemoveJob_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(EngineServer).RemoveJob(ctx, req.(*RemoveJobRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Engine_ListJobOnceTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListJobOnceTaskRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(EngineServer).ListJobOnceTask(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Engine_ListJobOnceTask_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(EngineServer).ListJobOnceTask(ctx, req.(*ListJobOnceTaskRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Engine_ListScheduledJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListScheduledJobRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(EngineServer).ListScheduledJob(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Engine_ListScheduledJob_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(EngineServer).ListScheduledJob(ctx, req.(*ListScheduledJobRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Engine_CreateContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateContainerRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(EngineServer).CreateContainer(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Engine_CreateContainer_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(EngineServer).CreateContainer(ctx, req.(*CreateContainerRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Engine_ListContainers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListContainerRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(EngineServer).ListContainers(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Engine_ListContainers_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(EngineServer).ListContainers(ctx, req.(*ListContainerRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Engine_InspectContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(InspectContainerRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(EngineServer).InspectContainer(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Engine_InspectContainer_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(EngineServer).InspectContainer(ctx, req.(*InspectContainerRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// Engine_ServiceDesc is the grpc.ServiceDesc for Engine service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Engine_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.engine.v1.Engine",
	HandlerType: (*EngineServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddDefaultJob",
			Handler:    _Engine_AddDefaultJob_Handler,
		},
		{
			MethodName: "AddPeriodicJob",
			Handler:    _Engine_AddPeriodicJob_Handler,
		},
		{
			MethodName: "AddDelayedJob",
			Handler:    _Engine_AddDelayedJob_Handler,
		},
		{
			MethodName: "RemoveJob",
			Handler:    _Engine_RemoveJob_Handler,
		},
		{
			MethodName: "ListJobOnceTask",
			Handler:    _Engine_ListJobOnceTask_Handler,
		},
		{
			MethodName: "ListScheduledJob",
			Handler:    _Engine_ListScheduledJob_Handler,
		},
		{
			MethodName: "CreateContainer",
			Handler:    _Engine_CreateContainer_Handler,
		},
		{
			MethodName: "ListContainers",
			Handler:    _Engine_ListContainers_Handler,
		},
		{
			MethodName: "InspectContainer",
			Handler:    _Engine_InspectContainer_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/engine/v1/engine.proto",
}
