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

package node

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

// CommandApiClient is the client API for CommandApi 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 CommandApiClient interface {
	Get(ctx context.Context, in *Command, opts ...grpc.CallOption) (*CommandResponse, error)
	Set(ctx context.Context, in *Command, opts ...grpc.CallOption) (*CommandResponse, error)
	Del(ctx context.Context, in *Command, opts ...grpc.CallOption) (*CommandResponse, error)
}

type commandApiClient struct {
	cc grpc.ClientConnInterface
}

func NewCommandApiClient(cc grpc.ClientConnInterface) CommandApiClient {
	return &commandApiClient{cc}
}

func (c *commandApiClient) Get(ctx context.Context, in *Command, opts ...grpc.CallOption) (*CommandResponse, error) {
	out := new(CommandResponse)
	err := c.cc.Invoke(ctx, "/commandApi/Get", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *commandApiClient) Set(ctx context.Context, in *Command, opts ...grpc.CallOption) (*CommandResponse, error) {
	out := new(CommandResponse)
	err := c.cc.Invoke(ctx, "/commandApi/Set", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *commandApiClient) Del(ctx context.Context, in *Command, opts ...grpc.CallOption) (*CommandResponse, error) {
	out := new(CommandResponse)
	err := c.cc.Invoke(ctx, "/commandApi/Del", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// CommandApiServer is the server API for CommandApi service.
// All implementations must embed UnimplementedCommandApiServer
// for forward compatibility
type CommandApiServer interface {
	Get(context.Context, *Command) (*CommandResponse, error)
	Set(context.Context, *Command) (*CommandResponse, error)
	Del(context.Context, *Command) (*CommandResponse, error)
	mustEmbedUnimplementedCommandApiServer()
}

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

func (UnimplementedCommandApiServer) Get(context.Context, *Command) (*CommandResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedCommandApiServer) Set(context.Context, *Command) (*CommandResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Set not implemented")
}
func (UnimplementedCommandApiServer) Del(context.Context, *Command) (*CommandResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Del not implemented")
}
func (UnimplementedCommandApiServer) mustEmbedUnimplementedCommandApiServer() {}

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

func RegisterCommandApiServer(s grpc.ServiceRegistrar, srv CommandApiServer) {
	s.RegisterService(&CommandApi_ServiceDesc, srv)
}

func _CommandApi_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Command)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CommandApiServer).Get(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/commandApi/Get",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CommandApiServer).Get(ctx, req.(*Command))
	}
	return interceptor(ctx, in, info, handler)
}

func _CommandApi_Set_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Command)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CommandApiServer).Set(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/commandApi/Set",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CommandApiServer).Set(ctx, req.(*Command))
	}
	return interceptor(ctx, in, info, handler)
}

func _CommandApi_Del_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Command)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CommandApiServer).Del(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/commandApi/Del",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CommandApiServer).Del(ctx, req.(*Command))
	}
	return interceptor(ctx, in, info, handler)
}

// CommandApi_ServiceDesc is the grpc.ServiceDesc for CommandApi service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var CommandApi_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "commandApi",
	HandlerType: (*CommandApiServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _CommandApi_Get_Handler,
		},
		{
			MethodName: "Set",
			Handler:    _CommandApi_Set_Handler,
		},
		{
			MethodName: "Del",
			Handler:    _CommandApi_Del_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "node.proto",
}

// CoordinatorApiClient is the client API for CoordinatorApi 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 CoordinatorApiClient interface {
	Get(ctx context.Context, in *Command, opts ...grpc.CallOption) (*CoordinatorResponse, error)
	Set(ctx context.Context, in *Command, opts ...grpc.CallOption) (*CoordinatorResponse, error)
	Del(ctx context.Context, in *Command, opts ...grpc.CallOption) (*CoordinatorResponse, error)
}

type coordinatorApiClient struct {
	cc grpc.ClientConnInterface
}

func NewCoordinatorApiClient(cc grpc.ClientConnInterface) CoordinatorApiClient {
	return &coordinatorApiClient{cc}
}

func (c *coordinatorApiClient) Get(ctx context.Context, in *Command, opts ...grpc.CallOption) (*CoordinatorResponse, error) {
	out := new(CoordinatorResponse)
	err := c.cc.Invoke(ctx, "/CoordinatorApi/Get", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *coordinatorApiClient) Set(ctx context.Context, in *Command, opts ...grpc.CallOption) (*CoordinatorResponse, error) {
	out := new(CoordinatorResponse)
	err := c.cc.Invoke(ctx, "/CoordinatorApi/Set", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *coordinatorApiClient) Del(ctx context.Context, in *Command, opts ...grpc.CallOption) (*CoordinatorResponse, error) {
	out := new(CoordinatorResponse)
	err := c.cc.Invoke(ctx, "/CoordinatorApi/Del", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// CoordinatorApiServer is the server API for CoordinatorApi service.
// All implementations must embed UnimplementedCoordinatorApiServer
// for forward compatibility
type CoordinatorApiServer interface {
	Get(context.Context, *Command) (*CoordinatorResponse, error)
	Set(context.Context, *Command) (*CoordinatorResponse, error)
	Del(context.Context, *Command) (*CoordinatorResponse, error)
	mustEmbedUnimplementedCoordinatorApiServer()
}

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

func (UnimplementedCoordinatorApiServer) Get(context.Context, *Command) (*CoordinatorResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedCoordinatorApiServer) Set(context.Context, *Command) (*CoordinatorResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Set not implemented")
}
func (UnimplementedCoordinatorApiServer) Del(context.Context, *Command) (*CoordinatorResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Del not implemented")
}
func (UnimplementedCoordinatorApiServer) mustEmbedUnimplementedCoordinatorApiServer() {}

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

func RegisterCoordinatorApiServer(s grpc.ServiceRegistrar, srv CoordinatorApiServer) {
	s.RegisterService(&CoordinatorApi_ServiceDesc, srv)
}

func _CoordinatorApi_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Command)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CoordinatorApiServer).Get(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/CoordinatorApi/Get",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CoordinatorApiServer).Get(ctx, req.(*Command))
	}
	return interceptor(ctx, in, info, handler)
}

func _CoordinatorApi_Set_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Command)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CoordinatorApiServer).Set(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/CoordinatorApi/Set",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CoordinatorApiServer).Set(ctx, req.(*Command))
	}
	return interceptor(ctx, in, info, handler)
}

func _CoordinatorApi_Del_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Command)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CoordinatorApiServer).Del(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/CoordinatorApi/Del",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CoordinatorApiServer).Del(ctx, req.(*Command))
	}
	return interceptor(ctx, in, info, handler)
}

// CoordinatorApi_ServiceDesc is the grpc.ServiceDesc for CoordinatorApi service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var CoordinatorApi_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "CoordinatorApi",
	HandlerType: (*CoordinatorApiServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _CoordinatorApi_Get_Handler,
		},
		{
			MethodName: "Set",
			Handler:    _CoordinatorApi_Set_Handler,
		},
		{
			MethodName: "Del",
			Handler:    _CoordinatorApi_Del_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "node.proto",
}
