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

package localserver

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

// NodeServiceClient is the client API for NodeService 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 NodeServiceClient interface {
	CreateNode(ctx context.Context, in *CreateNodeRequest, opts ...grpc.CallOption) (*CreateNodeResponse, error)
	GetNodes(ctx context.Context, in *GetNodesRequest, opts ...grpc.CallOption) (*GetNodesResponse, error)
	GetNode(ctx context.Context, in *GetNodeRequest, opts ...grpc.CallOption) (*GetNodeResponse, error)
	DeleteNode(ctx context.Context, in *DeleteNodeRequest, opts ...grpc.CallOption) (*DeleteNodeResponse, error)
	NewPeerOperatorRequest(ctx context.Context, in *AddPeerOperatorRequest, opts ...grpc.CallOption) (*AddPeerOperatorResponse, error)
	DeletePeerOperatorRequest(ctx context.Context, in *RejectPeerOperatorRequest, opts ...grpc.CallOption) (*RejectPeerOperatorResponse, error)
	AcceptNewPeerOperator(ctx context.Context, in *AcceptPeerOperatorRequest, opts ...grpc.CallOption) (*AcceptPeerOperatorResponse, error)
	RemovePeerOperator(ctx context.Context, in *RemovePeerOperatorRequest, opts ...grpc.CallOption) (*RemovePeerOperatorResponse, error)
}

type nodeServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewNodeServiceClient(cc grpc.ClientConnInterface) NodeServiceClient {
	return &nodeServiceClient{cc}
}

func (c *nodeServiceClient) CreateNode(ctx context.Context, in *CreateNodeRequest, opts ...grpc.CallOption) (*CreateNodeResponse, error) {
	out := new(CreateNodeResponse)
	err := c.cc.Invoke(ctx, "/node.NodeService/CreateNode", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *nodeServiceClient) GetNodes(ctx context.Context, in *GetNodesRequest, opts ...grpc.CallOption) (*GetNodesResponse, error) {
	out := new(GetNodesResponse)
	err := c.cc.Invoke(ctx, "/node.NodeService/GetNodes", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *nodeServiceClient) GetNode(ctx context.Context, in *GetNodeRequest, opts ...grpc.CallOption) (*GetNodeResponse, error) {
	out := new(GetNodeResponse)
	err := c.cc.Invoke(ctx, "/node.NodeService/GetNode", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *nodeServiceClient) DeleteNode(ctx context.Context, in *DeleteNodeRequest, opts ...grpc.CallOption) (*DeleteNodeResponse, error) {
	out := new(DeleteNodeResponse)
	err := c.cc.Invoke(ctx, "/node.NodeService/DeleteNode", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *nodeServiceClient) NewPeerOperatorRequest(ctx context.Context, in *AddPeerOperatorRequest, opts ...grpc.CallOption) (*AddPeerOperatorResponse, error) {
	out := new(AddPeerOperatorResponse)
	err := c.cc.Invoke(ctx, "/node.NodeService/NewPeerOperatorRequest", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *nodeServiceClient) DeletePeerOperatorRequest(ctx context.Context, in *RejectPeerOperatorRequest, opts ...grpc.CallOption) (*RejectPeerOperatorResponse, error) {
	out := new(RejectPeerOperatorResponse)
	err := c.cc.Invoke(ctx, "/node.NodeService/DeletePeerOperatorRequest", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *nodeServiceClient) AcceptNewPeerOperator(ctx context.Context, in *AcceptPeerOperatorRequest, opts ...grpc.CallOption) (*AcceptPeerOperatorResponse, error) {
	out := new(AcceptPeerOperatorResponse)
	err := c.cc.Invoke(ctx, "/node.NodeService/AcceptNewPeerOperator", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *nodeServiceClient) RemovePeerOperator(ctx context.Context, in *RemovePeerOperatorRequest, opts ...grpc.CallOption) (*RemovePeerOperatorResponse, error) {
	out := new(RemovePeerOperatorResponse)
	err := c.cc.Invoke(ctx, "/node.NodeService/RemovePeerOperator", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// NodeServiceServer is the server API for NodeService service.
// All implementations must embed UnimplementedNodeServiceServer
// for forward compatibility
type NodeServiceServer interface {
	CreateNode(context.Context, *CreateNodeRequest) (*CreateNodeResponse, error)
	GetNodes(context.Context, *GetNodesRequest) (*GetNodesResponse, error)
	GetNode(context.Context, *GetNodeRequest) (*GetNodeResponse, error)
	DeleteNode(context.Context, *DeleteNodeRequest) (*DeleteNodeResponse, error)
	NewPeerOperatorRequest(context.Context, *AddPeerOperatorRequest) (*AddPeerOperatorResponse, error)
	DeletePeerOperatorRequest(context.Context, *RejectPeerOperatorRequest) (*RejectPeerOperatorResponse, error)
	AcceptNewPeerOperator(context.Context, *AcceptPeerOperatorRequest) (*AcceptPeerOperatorResponse, error)
	RemovePeerOperator(context.Context, *RemovePeerOperatorRequest) (*RemovePeerOperatorResponse, error)
	mustEmbedUnimplementedNodeServiceServer()
}

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

func (UnimplementedNodeServiceServer) CreateNode(context.Context, *CreateNodeRequest) (*CreateNodeResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateNode not implemented")
}
func (UnimplementedNodeServiceServer) GetNodes(context.Context, *GetNodesRequest) (*GetNodesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetNodes not implemented")
}
func (UnimplementedNodeServiceServer) GetNode(context.Context, *GetNodeRequest) (*GetNodeResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetNode not implemented")
}
func (UnimplementedNodeServiceServer) DeleteNode(context.Context, *DeleteNodeRequest) (*DeleteNodeResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteNode not implemented")
}
func (UnimplementedNodeServiceServer) NewPeerOperatorRequest(context.Context, *AddPeerOperatorRequest) (*AddPeerOperatorResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method NewPeerOperatorRequest not implemented")
}
func (UnimplementedNodeServiceServer) DeletePeerOperatorRequest(context.Context, *RejectPeerOperatorRequest) (*RejectPeerOperatorResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeletePeerOperatorRequest not implemented")
}
func (UnimplementedNodeServiceServer) AcceptNewPeerOperator(context.Context, *AcceptPeerOperatorRequest) (*AcceptPeerOperatorResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method AcceptNewPeerOperator not implemented")
}
func (UnimplementedNodeServiceServer) RemovePeerOperator(context.Context, *RemovePeerOperatorRequest) (*RemovePeerOperatorResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RemovePeerOperator not implemented")
}
func (UnimplementedNodeServiceServer) mustEmbedUnimplementedNodeServiceServer() {}

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

func RegisterNodeServiceServer(s grpc.ServiceRegistrar, srv NodeServiceServer) {
	s.RegisterService(&NodeService_ServiceDesc, srv)
}

func _NodeService_CreateNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateNodeRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(NodeServiceServer).CreateNode(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/node.NodeService/CreateNode",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(NodeServiceServer).CreateNode(ctx, req.(*CreateNodeRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _NodeService_GetNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetNodesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(NodeServiceServer).GetNodes(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/node.NodeService/GetNodes",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(NodeServiceServer).GetNodes(ctx, req.(*GetNodesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _NodeService_GetNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetNodeRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(NodeServiceServer).GetNode(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/node.NodeService/GetNode",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(NodeServiceServer).GetNode(ctx, req.(*GetNodeRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _NodeService_DeleteNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteNodeRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(NodeServiceServer).DeleteNode(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/node.NodeService/DeleteNode",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(NodeServiceServer).DeleteNode(ctx, req.(*DeleteNodeRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _NodeService_NewPeerOperatorRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AddPeerOperatorRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(NodeServiceServer).NewPeerOperatorRequest(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/node.NodeService/NewPeerOperatorRequest",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(NodeServiceServer).NewPeerOperatorRequest(ctx, req.(*AddPeerOperatorRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _NodeService_DeletePeerOperatorRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RejectPeerOperatorRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(NodeServiceServer).DeletePeerOperatorRequest(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/node.NodeService/DeletePeerOperatorRequest",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(NodeServiceServer).DeletePeerOperatorRequest(ctx, req.(*RejectPeerOperatorRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _NodeService_AcceptNewPeerOperator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AcceptPeerOperatorRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(NodeServiceServer).AcceptNewPeerOperator(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/node.NodeService/AcceptNewPeerOperator",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(NodeServiceServer).AcceptNewPeerOperator(ctx, req.(*AcceptPeerOperatorRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _NodeService_RemovePeerOperator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RemovePeerOperatorRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(NodeServiceServer).RemovePeerOperator(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/node.NodeService/RemovePeerOperator",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(NodeServiceServer).RemovePeerOperator(ctx, req.(*RemovePeerOperatorRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// NodeService_ServiceDesc is the grpc.ServiceDesc for NodeService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var NodeService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "node.NodeService",
	HandlerType: (*NodeServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateNode",
			Handler:    _NodeService_CreateNode_Handler,
		},
		{
			MethodName: "GetNodes",
			Handler:    _NodeService_GetNodes_Handler,
		},
		{
			MethodName: "GetNode",
			Handler:    _NodeService_GetNode_Handler,
		},
		{
			MethodName: "DeleteNode",
			Handler:    _NodeService_DeleteNode_Handler,
		},
		{
			MethodName: "NewPeerOperatorRequest",
			Handler:    _NodeService_NewPeerOperatorRequest_Handler,
		},
		{
			MethodName: "DeletePeerOperatorRequest",
			Handler:    _NodeService_DeletePeerOperatorRequest_Handler,
		},
		{
			MethodName: "AcceptNewPeerOperator",
			Handler:    _NodeService_AcceptNewPeerOperator_Handler,
		},
		{
			MethodName: "RemovePeerOperator",
			Handler:    _NodeService_RemovePeerOperator_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "node.proto",
}
