// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc             (unknown)
// source: sanitizer.proto

package pluginextensionv2

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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8

const (
	Sanitizer_Sanitize_FullMethodName = "/pluginextensionv2.Sanitizer/Sanitize"
)

// SanitizerClient is the client API for Sanitizer 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 SanitizerClient interface {
	Sanitize(ctx context.Context, in *SanitizeRequest, opts ...grpc.CallOption) (*SanitizeResponse, error)
}

type sanitizerClient struct {
	cc grpc.ClientConnInterface
}

func NewSanitizerClient(cc grpc.ClientConnInterface) SanitizerClient {
	return &sanitizerClient{cc}
}

func (c *sanitizerClient) Sanitize(ctx context.Context, in *SanitizeRequest, opts ...grpc.CallOption) (*SanitizeResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(SanitizeResponse)
	err := c.cc.Invoke(ctx, Sanitizer_Sanitize_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// SanitizerServer is the server API for Sanitizer service.
// All implementations must embed UnimplementedSanitizerServer
// for forward compatibility
type SanitizerServer interface {
	Sanitize(context.Context, *SanitizeRequest) (*SanitizeResponse, error)
	mustEmbedUnimplementedSanitizerServer()
}

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

func (UnimplementedSanitizerServer) Sanitize(context.Context, *SanitizeRequest) (*SanitizeResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Sanitize not implemented")
}
func (UnimplementedSanitizerServer) mustEmbedUnimplementedSanitizerServer() {}

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

func RegisterSanitizerServer(s grpc.ServiceRegistrar, srv SanitizerServer) {
	s.RegisterService(&Sanitizer_ServiceDesc, srv)
}

func _Sanitizer_Sanitize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SanitizeRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SanitizerServer).Sanitize(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Sanitizer_Sanitize_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SanitizerServer).Sanitize(ctx, req.(*SanitizeRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// Sanitizer_ServiceDesc is the grpc.ServiceDesc for Sanitizer service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Sanitizer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pluginextensionv2.Sanitizer",
	HandlerType: (*SanitizerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Sanitize",
			Handler:    _Sanitizer_Sanitize_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "sanitizer.proto",
}
