// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             (unknown)
// source: aggsender/validator/proto/v1/validator.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 (
	AggsenderValidator_HealthCheck_FullMethodName         = "/aggkit.aggsender.validator.v1.AggsenderValidator/HealthCheck"
	AggsenderValidator_ValidateCertificate_FullMethodName = "/aggkit.aggsender.validator.v1.AggsenderValidator/ValidateCertificate"
)

// AggsenderValidatorClient is the client API for AggsenderValidator 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 AggsenderValidatorClient interface {
	// Method to get the status of the validator
	HealthCheck(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error)
	// Method to validate a new certificate
	ValidateCertificate(ctx context.Context, in *ValidateCertificateRequest, opts ...grpc.CallOption) (*ValidateCertificateResponse, error)
}

type aggsenderValidatorClient struct {
	cc grpc.ClientConnInterface
}

func NewAggsenderValidatorClient(cc grpc.ClientConnInterface) AggsenderValidatorClient {
	return &aggsenderValidatorClient{cc}
}

func (c *aggsenderValidatorClient) HealthCheck(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HealthCheckResponse, error) {
	out := new(HealthCheckResponse)
	err := c.cc.Invoke(ctx, AggsenderValidator_HealthCheck_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *aggsenderValidatorClient) ValidateCertificate(ctx context.Context, in *ValidateCertificateRequest, opts ...grpc.CallOption) (*ValidateCertificateResponse, error) {
	out := new(ValidateCertificateResponse)
	err := c.cc.Invoke(ctx, AggsenderValidator_ValidateCertificate_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// AggsenderValidatorServer is the server API for AggsenderValidator service.
// All implementations must embed UnimplementedAggsenderValidatorServer
// for forward compatibility
type AggsenderValidatorServer interface {
	// Method to get the status of the validator
	HealthCheck(context.Context, *emptypb.Empty) (*HealthCheckResponse, error)
	// Method to validate a new certificate
	ValidateCertificate(context.Context, *ValidateCertificateRequest) (*ValidateCertificateResponse, error)
	mustEmbedUnimplementedAggsenderValidatorServer()
}

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

func (UnimplementedAggsenderValidatorServer) HealthCheck(context.Context, *emptypb.Empty) (*HealthCheckResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method HealthCheck not implemented")
}
func (UnimplementedAggsenderValidatorServer) ValidateCertificate(context.Context, *ValidateCertificateRequest) (*ValidateCertificateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ValidateCertificate not implemented")
}
func (UnimplementedAggsenderValidatorServer) mustEmbedUnimplementedAggsenderValidatorServer() {}

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

func RegisterAggsenderValidatorServer(s grpc.ServiceRegistrar, srv AggsenderValidatorServer) {
	s.RegisterService(&AggsenderValidator_ServiceDesc, srv)
}

func _AggsenderValidator_HealthCheck_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.(AggsenderValidatorServer).HealthCheck(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: AggsenderValidator_HealthCheck_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AggsenderValidatorServer).HealthCheck(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _AggsenderValidator_ValidateCertificate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ValidateCertificateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AggsenderValidatorServer).ValidateCertificate(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: AggsenderValidator_ValidateCertificate_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AggsenderValidatorServer).ValidateCertificate(ctx, req.(*ValidateCertificateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// AggsenderValidator_ServiceDesc is the grpc.ServiceDesc for AggsenderValidator service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var AggsenderValidator_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "aggkit.aggsender.validator.v1.AggsenderValidator",
	HandlerType: (*AggsenderValidatorServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "HealthCheck",
			Handler:    _AggsenderValidator_HealthCheck_Handler,
		},
		{
			MethodName: "ValidateCertificate",
			Handler:    _AggsenderValidator_ValidateCertificate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "aggsender/validator/proto/v1/validator.proto",
}
