// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             v3.20.0
// source: communication/grpc/schema/blockchain.proto

package grpcBlockchain

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

// GrpcBlockchainServiceClient is the client API for GrpcBlockchainService 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 GrpcBlockchainServiceClient interface {
	PrintChain(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*SuccessResponse, error)
	CreateChain(ctx context.Context, in *Wallet, opts ...grpc.CallOption) (*SuccessResponse, error)
	CreateActionData(ctx context.Context, in *ActionDataRequest, opts ...grpc.CallOption) (*SuccessResponse, error)
	ProcessAdminRequest(ctx context.Context, in *AdminRequest, opts ...grpc.CallOption) (*AdminReply, error)
	//function for handling reception of newly generated shell schema on admin side
	HandleNewShellSchema(ctx context.Context, in *NewShellSchema, opts ...grpc.CallOption) (*NewShellSchemaResponse, error)
	SendConsensus(ctx context.Context, in *ConsensusRequest, opts ...grpc.CallOption) (*SuccessResponse, error)
}

type grpcBlockchainServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewGrpcBlockchainServiceClient(cc grpc.ClientConnInterface) GrpcBlockchainServiceClient {
	return &grpcBlockchainServiceClient{cc}
}

func (c *grpcBlockchainServiceClient) PrintChain(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*SuccessResponse, error) {
	out := new(SuccessResponse)
	err := c.cc.Invoke(ctx, "/grpcBlockchain.GrpcBlockchainService/PrintChain", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *grpcBlockchainServiceClient) CreateChain(ctx context.Context, in *Wallet, opts ...grpc.CallOption) (*SuccessResponse, error) {
	out := new(SuccessResponse)
	err := c.cc.Invoke(ctx, "/grpcBlockchain.GrpcBlockchainService/CreateChain", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *grpcBlockchainServiceClient) CreateActionData(ctx context.Context, in *ActionDataRequest, opts ...grpc.CallOption) (*SuccessResponse, error) {
	out := new(SuccessResponse)
	err := c.cc.Invoke(ctx, "/grpcBlockchain.GrpcBlockchainService/CreateActionData", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *grpcBlockchainServiceClient) ProcessAdminRequest(ctx context.Context, in *AdminRequest, opts ...grpc.CallOption) (*AdminReply, error) {
	out := new(AdminReply)
	err := c.cc.Invoke(ctx, "/grpcBlockchain.GrpcBlockchainService/ProcessAdminRequest", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *grpcBlockchainServiceClient) HandleNewShellSchema(ctx context.Context, in *NewShellSchema, opts ...grpc.CallOption) (*NewShellSchemaResponse, error) {
	out := new(NewShellSchemaResponse)
	err := c.cc.Invoke(ctx, "/grpcBlockchain.GrpcBlockchainService/HandleNewShellSchema", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *grpcBlockchainServiceClient) SendConsensus(ctx context.Context, in *ConsensusRequest, opts ...grpc.CallOption) (*SuccessResponse, error) {
	out := new(SuccessResponse)
	err := c.cc.Invoke(ctx, "/grpcBlockchain.GrpcBlockchainService/SendConsensus", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// GrpcBlockchainServiceServer is the server API for GrpcBlockchainService service.
// All implementations must embed UnimplementedGrpcBlockchainServiceServer
// for forward compatibility
type GrpcBlockchainServiceServer interface {
	PrintChain(context.Context, *EmptyRequest) (*SuccessResponse, error)
	CreateChain(context.Context, *Wallet) (*SuccessResponse, error)
	CreateActionData(context.Context, *ActionDataRequest) (*SuccessResponse, error)
	ProcessAdminRequest(context.Context, *AdminRequest) (*AdminReply, error)
	//function for handling reception of newly generated shell schema on admin side
	HandleNewShellSchema(context.Context, *NewShellSchema) (*NewShellSchemaResponse, error)
	SendConsensus(context.Context, *ConsensusRequest) (*SuccessResponse, error)
	mustEmbedUnimplementedGrpcBlockchainServiceServer()
}

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

func (UnimplementedGrpcBlockchainServiceServer) PrintChain(context.Context, *EmptyRequest) (*SuccessResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method PrintChain not implemented")
}
func (UnimplementedGrpcBlockchainServiceServer) CreateChain(context.Context, *Wallet) (*SuccessResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateChain not implemented")
}
func (UnimplementedGrpcBlockchainServiceServer) CreateActionData(context.Context, *ActionDataRequest) (*SuccessResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateActionData not implemented")
}
func (UnimplementedGrpcBlockchainServiceServer) ProcessAdminRequest(context.Context, *AdminRequest) (*AdminReply, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ProcessAdminRequest not implemented")
}
func (UnimplementedGrpcBlockchainServiceServer) HandleNewShellSchema(context.Context, *NewShellSchema) (*NewShellSchemaResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method HandleNewShellSchema not implemented")
}
func (UnimplementedGrpcBlockchainServiceServer) SendConsensus(context.Context, *ConsensusRequest) (*SuccessResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SendConsensus not implemented")
}
func (UnimplementedGrpcBlockchainServiceServer) mustEmbedUnimplementedGrpcBlockchainServiceServer() {}

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

func RegisterGrpcBlockchainServiceServer(s grpc.ServiceRegistrar, srv GrpcBlockchainServiceServer) {
	s.RegisterService(&GrpcBlockchainService_ServiceDesc, srv)
}

func _GrpcBlockchainService_PrintChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(EmptyRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(GrpcBlockchainServiceServer).PrintChain(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/grpcBlockchain.GrpcBlockchainService/PrintChain",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(GrpcBlockchainServiceServer).PrintChain(ctx, req.(*EmptyRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _GrpcBlockchainService_CreateChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Wallet)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(GrpcBlockchainServiceServer).CreateChain(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/grpcBlockchain.GrpcBlockchainService/CreateChain",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(GrpcBlockchainServiceServer).CreateChain(ctx, req.(*Wallet))
	}
	return interceptor(ctx, in, info, handler)
}

func _GrpcBlockchainService_CreateActionData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ActionDataRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(GrpcBlockchainServiceServer).CreateActionData(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/grpcBlockchain.GrpcBlockchainService/CreateActionData",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(GrpcBlockchainServiceServer).CreateActionData(ctx, req.(*ActionDataRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _GrpcBlockchainService_ProcessAdminRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AdminRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(GrpcBlockchainServiceServer).ProcessAdminRequest(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/grpcBlockchain.GrpcBlockchainService/ProcessAdminRequest",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(GrpcBlockchainServiceServer).ProcessAdminRequest(ctx, req.(*AdminRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _GrpcBlockchainService_HandleNewShellSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(NewShellSchema)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(GrpcBlockchainServiceServer).HandleNewShellSchema(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/grpcBlockchain.GrpcBlockchainService/HandleNewShellSchema",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(GrpcBlockchainServiceServer).HandleNewShellSchema(ctx, req.(*NewShellSchema))
	}
	return interceptor(ctx, in, info, handler)
}

func _GrpcBlockchainService_SendConsensus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ConsensusRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(GrpcBlockchainServiceServer).SendConsensus(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/grpcBlockchain.GrpcBlockchainService/SendConsensus",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(GrpcBlockchainServiceServer).SendConsensus(ctx, req.(*ConsensusRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// GrpcBlockchainService_ServiceDesc is the grpc.ServiceDesc for GrpcBlockchainService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var GrpcBlockchainService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "grpcBlockchain.GrpcBlockchainService",
	HandlerType: (*GrpcBlockchainServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "PrintChain",
			Handler:    _GrpcBlockchainService_PrintChain_Handler,
		},
		{
			MethodName: "CreateChain",
			Handler:    _GrpcBlockchainService_CreateChain_Handler,
		},
		{
			MethodName: "CreateActionData",
			Handler:    _GrpcBlockchainService_CreateActionData_Handler,
		},
		{
			MethodName: "ProcessAdminRequest",
			Handler:    _GrpcBlockchainService_ProcessAdminRequest_Handler,
		},
		{
			MethodName: "HandleNewShellSchema",
			Handler:    _GrpcBlockchainService_HandleNewShellSchema_Handler,
		},
		{
			MethodName: "SendConsensus",
			Handler:    _GrpcBlockchainService_SendConsensus_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "communication/grpc/schema/blockchain.proto",
}
