// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v6.32.1
// source: services/blockvalidation/blockvalidation_api/blockvalidation_api.proto

package blockvalidation_api

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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	BlockValidationAPI_HealthGRPC_FullMethodName    = "/blockvalidation_api.BlockValidationAPI/HealthGRPC"
	BlockValidationAPI_BlockFound_FullMethodName    = "/blockvalidation_api.BlockValidationAPI/BlockFound"
	BlockValidationAPI_ProcessBlock_FullMethodName  = "/blockvalidation_api.BlockValidationAPI/ProcessBlock"
	BlockValidationAPI_ValidateBlock_FullMethodName = "/blockvalidation_api.BlockValidationAPI/ValidateBlock"
)

// BlockValidationAPIClient is the client API for BlockValidationAPI 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 BlockValidationAPIClient interface {
	// Health returns the health of the API.
	HealthGRPC(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*HealthResponse, error)
	BlockFound(ctx context.Context, in *BlockFoundRequest, opts ...grpc.CallOption) (*EmptyMessage, error)
	ProcessBlock(ctx context.Context, in *ProcessBlockRequest, opts ...grpc.CallOption) (*EmptyMessage, error)
	ValidateBlock(ctx context.Context, in *ValidateBlockRequest, opts ...grpc.CallOption) (*ValidateBlockResponse, error)
}

type blockValidationAPIClient struct {
	cc grpc.ClientConnInterface
}

func NewBlockValidationAPIClient(cc grpc.ClientConnInterface) BlockValidationAPIClient {
	return &blockValidationAPIClient{cc}
}

func (c *blockValidationAPIClient) HealthGRPC(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*HealthResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(HealthResponse)
	err := c.cc.Invoke(ctx, BlockValidationAPI_HealthGRPC_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockValidationAPIClient) BlockFound(ctx context.Context, in *BlockFoundRequest, opts ...grpc.CallOption) (*EmptyMessage, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(EmptyMessage)
	err := c.cc.Invoke(ctx, BlockValidationAPI_BlockFound_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockValidationAPIClient) ProcessBlock(ctx context.Context, in *ProcessBlockRequest, opts ...grpc.CallOption) (*EmptyMessage, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(EmptyMessage)
	err := c.cc.Invoke(ctx, BlockValidationAPI_ProcessBlock_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *blockValidationAPIClient) ValidateBlock(ctx context.Context, in *ValidateBlockRequest, opts ...grpc.CallOption) (*ValidateBlockResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ValidateBlockResponse)
	err := c.cc.Invoke(ctx, BlockValidationAPI_ValidateBlock_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// BlockValidationAPIServer is the server API for BlockValidationAPI service.
// All implementations must embed UnimplementedBlockValidationAPIServer
// for forward compatibility.
type BlockValidationAPIServer interface {
	// Health returns the health of the API.
	HealthGRPC(context.Context, *EmptyMessage) (*HealthResponse, error)
	BlockFound(context.Context, *BlockFoundRequest) (*EmptyMessage, error)
	ProcessBlock(context.Context, *ProcessBlockRequest) (*EmptyMessage, error)
	ValidateBlock(context.Context, *ValidateBlockRequest) (*ValidateBlockResponse, error)
	mustEmbedUnimplementedBlockValidationAPIServer()
}

// UnimplementedBlockValidationAPIServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedBlockValidationAPIServer struct{}

func (UnimplementedBlockValidationAPIServer) HealthGRPC(context.Context, *EmptyMessage) (*HealthResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method HealthGRPC not implemented")
}
func (UnimplementedBlockValidationAPIServer) BlockFound(context.Context, *BlockFoundRequest) (*EmptyMessage, error) {
	return nil, status.Errorf(codes.Unimplemented, "method BlockFound not implemented")
}
func (UnimplementedBlockValidationAPIServer) ProcessBlock(context.Context, *ProcessBlockRequest) (*EmptyMessage, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ProcessBlock not implemented")
}
func (UnimplementedBlockValidationAPIServer) ValidateBlock(context.Context, *ValidateBlockRequest) (*ValidateBlockResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ValidateBlock not implemented")
}
func (UnimplementedBlockValidationAPIServer) mustEmbedUnimplementedBlockValidationAPIServer() {}
func (UnimplementedBlockValidationAPIServer) testEmbeddedByValue()                            {}

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

func RegisterBlockValidationAPIServer(s grpc.ServiceRegistrar, srv BlockValidationAPIServer) {
	// If the following call pancis, it indicates UnimplementedBlockValidationAPIServer was
	// embedded by pointer and is nil.  This will cause panics if an
	// unimplemented method is ever invoked, so we test this at initialization
	// time to prevent it from happening at runtime later due to I/O.
	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
		t.testEmbeddedByValue()
	}
	s.RegisterService(&BlockValidationAPI_ServiceDesc, srv)
}

func _BlockValidationAPI_HealthGRPC_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(EmptyMessage)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockValidationAPIServer).HealthGRPC(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockValidationAPI_HealthGRPC_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockValidationAPIServer).HealthGRPC(ctx, req.(*EmptyMessage))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockValidationAPI_BlockFound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(BlockFoundRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockValidationAPIServer).BlockFound(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockValidationAPI_BlockFound_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockValidationAPIServer).BlockFound(ctx, req.(*BlockFoundRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockValidationAPI_ProcessBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ProcessBlockRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockValidationAPIServer).ProcessBlock(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockValidationAPI_ProcessBlock_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockValidationAPIServer).ProcessBlock(ctx, req.(*ProcessBlockRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BlockValidationAPI_ValidateBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ValidateBlockRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BlockValidationAPIServer).ValidateBlock(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BlockValidationAPI_ValidateBlock_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BlockValidationAPIServer).ValidateBlock(ctx, req.(*ValidateBlockRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// BlockValidationAPI_ServiceDesc is the grpc.ServiceDesc for BlockValidationAPI service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var BlockValidationAPI_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "blockvalidation_api.BlockValidationAPI",
	HandlerType: (*BlockValidationAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "HealthGRPC",
			Handler:    _BlockValidationAPI_HealthGRPC_Handler,
		},
		{
			MethodName: "BlockFound",
			Handler:    _BlockValidationAPI_BlockFound_Handler,
		},
		{
			MethodName: "ProcessBlock",
			Handler:    _BlockValidationAPI_ProcessBlock_Handler,
		},
		{
			MethodName: "ValidateBlock",
			Handler:    _BlockValidationAPI_ValidateBlock_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "services/blockvalidation/blockvalidation_api/blockvalidation_api.proto",
}
