// Code generated by protoc-gen-go-grpc. DO NOT EDIT.

package spamcheck

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

// SpamcheckServiceClient is the client API for SpamcheckService 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 SpamcheckServiceClient interface {
	CheckForSpamIssue(ctx context.Context, in *Issue, opts ...grpc.CallOption) (*SpamVerdict, error)
	Healthz(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

type spamcheckServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewSpamcheckServiceClient(cc grpc.ClientConnInterface) SpamcheckServiceClient {
	return &spamcheckServiceClient{cc}
}

func (c *spamcheckServiceClient) CheckForSpamIssue(ctx context.Context, in *Issue, opts ...grpc.CallOption) (*SpamVerdict, error) {
	out := new(SpamVerdict)
	err := c.cc.Invoke(ctx, "/spamcheck.SpamcheckService/CheckForSpamIssue", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *spamcheckServiceClient) Healthz(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, "/spamcheck.SpamcheckService/Healthz", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// SpamcheckServiceServer is the server API for SpamcheckService service.
// All implementations must embed UnimplementedSpamcheckServiceServer
// for forward compatibility
type SpamcheckServiceServer interface {
	CheckForSpamIssue(context.Context, *Issue) (*SpamVerdict, error)
	Healthz(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	mustEmbedUnimplementedSpamcheckServiceServer()
}

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

func (UnimplementedSpamcheckServiceServer) CheckForSpamIssue(context.Context, *Issue) (*SpamVerdict, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CheckForSpamIssue not implemented")
}
func (UnimplementedSpamcheckServiceServer) Healthz(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Healthz not implemented")
}
func (UnimplementedSpamcheckServiceServer) mustEmbedUnimplementedSpamcheckServiceServer() {}

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

func RegisterSpamcheckServiceServer(s grpc.ServiceRegistrar, srv SpamcheckServiceServer) {
	s.RegisterService(&_SpamcheckService_serviceDesc, srv)
}

func _SpamcheckService_CheckForSpamIssue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Issue)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SpamcheckServiceServer).CheckForSpamIssue(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/spamcheck.SpamcheckService/CheckForSpamIssue",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SpamcheckServiceServer).CheckForSpamIssue(ctx, req.(*Issue))
	}
	return interceptor(ctx, in, info, handler)
}

func _SpamcheckService_Healthz_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(emptypb.Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SpamcheckServiceServer).Healthz(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/spamcheck.SpamcheckService/Healthz",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SpamcheckServiceServer).Healthz(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

var _SpamcheckService_serviceDesc = grpc.ServiceDesc{
	ServiceName: "spamcheck.SpamcheckService",
	HandlerType: (*SpamcheckServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CheckForSpamIssue",
			Handler:    _SpamcheckService_CheckForSpamIssue_Handler,
		},
		{
			MethodName: "Healthz",
			Handler:    _SpamcheckService_Healthz_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "spamcheck.proto",
}
