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

package subtreevalidation_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 (
	SubtreeValidationAPI_HealthGRPC_FullMethodName            = "/subtreevalidation_api.SubtreeValidationAPI/HealthGRPC"
	SubtreeValidationAPI_CheckSubtreeFromBlock_FullMethodName = "/subtreevalidation_api.SubtreeValidationAPI/CheckSubtreeFromBlock"
	SubtreeValidationAPI_CheckBlockSubtrees_FullMethodName    = "/subtreevalidation_api.SubtreeValidationAPI/CheckBlockSubtrees"
)

// SubtreeValidationAPIClient is the client API for SubtreeValidationAPI 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.
//
// SubtreeValidationAPI provides gRPC services for validating blockchain subtrees.
// The service exposes endpoints for health monitoring and subtree validation operations.
type SubtreeValidationAPIClient interface {
	// HealthGRPC checks the service's health status.
	// It takes an empty request message and returns a response indicating the service's health.
	HealthGRPC(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*HealthResponse, error)
	// CheckSubtreeFromBlock validates a subtree within a specified block in the blockchain.
	// It takes a request containing the subtree's merkle root hash and block details,
	// returning a response indicating the subtree's validity status.
	CheckSubtreeFromBlock(ctx context.Context, in *CheckSubtreeFromBlockRequest, opts ...grpc.CallOption) (*CheckSubtreeFromBlockResponse, error)
	CheckBlockSubtrees(ctx context.Context, in *CheckBlockSubtreesRequest, opts ...grpc.CallOption) (*CheckBlockSubtreesResponse, error)
}

type subtreeValidationAPIClient struct {
	cc grpc.ClientConnInterface
}

func NewSubtreeValidationAPIClient(cc grpc.ClientConnInterface) SubtreeValidationAPIClient {
	return &subtreeValidationAPIClient{cc}
}

func (c *subtreeValidationAPIClient) 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, SubtreeValidationAPI_HealthGRPC_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *subtreeValidationAPIClient) CheckSubtreeFromBlock(ctx context.Context, in *CheckSubtreeFromBlockRequest, opts ...grpc.CallOption) (*CheckSubtreeFromBlockResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CheckSubtreeFromBlockResponse)
	err := c.cc.Invoke(ctx, SubtreeValidationAPI_CheckSubtreeFromBlock_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *subtreeValidationAPIClient) CheckBlockSubtrees(ctx context.Context, in *CheckBlockSubtreesRequest, opts ...grpc.CallOption) (*CheckBlockSubtreesResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CheckBlockSubtreesResponse)
	err := c.cc.Invoke(ctx, SubtreeValidationAPI_CheckBlockSubtrees_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// SubtreeValidationAPIServer is the server API for SubtreeValidationAPI service.
// All implementations must embed UnimplementedSubtreeValidationAPIServer
// for forward compatibility.
//
// SubtreeValidationAPI provides gRPC services for validating blockchain subtrees.
// The service exposes endpoints for health monitoring and subtree validation operations.
type SubtreeValidationAPIServer interface {
	// HealthGRPC checks the service's health status.
	// It takes an empty request message and returns a response indicating the service's health.
	HealthGRPC(context.Context, *EmptyMessage) (*HealthResponse, error)
	// CheckSubtreeFromBlock validates a subtree within a specified block in the blockchain.
	// It takes a request containing the subtree's merkle root hash and block details,
	// returning a response indicating the subtree's validity status.
	CheckSubtreeFromBlock(context.Context, *CheckSubtreeFromBlockRequest) (*CheckSubtreeFromBlockResponse, error)
	CheckBlockSubtrees(context.Context, *CheckBlockSubtreesRequest) (*CheckBlockSubtreesResponse, error)
	mustEmbedUnimplementedSubtreeValidationAPIServer()
}

// UnimplementedSubtreeValidationAPIServer 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 UnimplementedSubtreeValidationAPIServer struct{}

func (UnimplementedSubtreeValidationAPIServer) HealthGRPC(context.Context, *EmptyMessage) (*HealthResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method HealthGRPC not implemented")
}
func (UnimplementedSubtreeValidationAPIServer) CheckSubtreeFromBlock(context.Context, *CheckSubtreeFromBlockRequest) (*CheckSubtreeFromBlockResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CheckSubtreeFromBlock not implemented")
}
func (UnimplementedSubtreeValidationAPIServer) CheckBlockSubtrees(context.Context, *CheckBlockSubtreesRequest) (*CheckBlockSubtreesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CheckBlockSubtrees not implemented")
}
func (UnimplementedSubtreeValidationAPIServer) mustEmbedUnimplementedSubtreeValidationAPIServer() {}
func (UnimplementedSubtreeValidationAPIServer) testEmbeddedByValue()                              {}

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

func RegisterSubtreeValidationAPIServer(s grpc.ServiceRegistrar, srv SubtreeValidationAPIServer) {
	// If the following call pancis, it indicates UnimplementedSubtreeValidationAPIServer 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(&SubtreeValidationAPI_ServiceDesc, srv)
}

func _SubtreeValidationAPI_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.(SubtreeValidationAPIServer).HealthGRPC(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SubtreeValidationAPI_HealthGRPC_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SubtreeValidationAPIServer).HealthGRPC(ctx, req.(*EmptyMessage))
	}
	return interceptor(ctx, in, info, handler)
}

func _SubtreeValidationAPI_CheckSubtreeFromBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CheckSubtreeFromBlockRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SubtreeValidationAPIServer).CheckSubtreeFromBlock(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SubtreeValidationAPI_CheckSubtreeFromBlock_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SubtreeValidationAPIServer).CheckSubtreeFromBlock(ctx, req.(*CheckSubtreeFromBlockRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SubtreeValidationAPI_CheckBlockSubtrees_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CheckBlockSubtreesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SubtreeValidationAPIServer).CheckBlockSubtrees(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SubtreeValidationAPI_CheckBlockSubtrees_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SubtreeValidationAPIServer).CheckBlockSubtrees(ctx, req.(*CheckBlockSubtreesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// SubtreeValidationAPI_ServiceDesc is the grpc.ServiceDesc for SubtreeValidationAPI service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SubtreeValidationAPI_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "subtreevalidation_api.SubtreeValidationAPI",
	HandlerType: (*SubtreeValidationAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "HealthGRPC",
			Handler:    _SubtreeValidationAPI_HealthGRPC_Handler,
		},
		{
			MethodName: "CheckSubtreeFromBlock",
			Handler:    _SubtreeValidationAPI_CheckSubtreeFromBlock_Handler,
		},
		{
			MethodName: "CheckBlockSubtrees",
			Handler:    _SubtreeValidationAPI_CheckBlockSubtrees_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "services/subtreevalidation/subtreevalidation_api/subtreevalidation_api.proto",
}
