// Code generated by protoc-gen-go-grpc. DO NOT EDIT.

package api_nfccard

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	common "server/app_comm/api/common"
)

// 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

// NfcCardServiceClient is the client API for NfcCardService 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 NfcCardServiceClient interface {
	// === DB information
	GetInfo(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*NfcCardBaseInfo, error)
	// References
	GetDeviceId(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*common.Reference, error)
	// Common
	GetMeta(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*common.Meta, error)
}

type nfcCardServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewNfcCardServiceClient(cc grpc.ClientConnInterface) NfcCardServiceClient {
	return &nfcCardServiceClient{cc}
}

func (c *nfcCardServiceClient) GetInfo(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*NfcCardBaseInfo, error) {
	out := new(NfcCardBaseInfo)
	err := c.cc.Invoke(ctx, "/pagerino.nfc_card.NfcCardService/GetInfo", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *nfcCardServiceClient) GetDeviceId(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*common.Reference, error) {
	out := new(common.Reference)
	err := c.cc.Invoke(ctx, "/pagerino.nfc_card.NfcCardService/GetDeviceId", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *nfcCardServiceClient) GetMeta(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*common.Meta, error) {
	out := new(common.Meta)
	err := c.cc.Invoke(ctx, "/pagerino.nfc_card.NfcCardService/GetMeta", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// NfcCardServiceServer is the server API for NfcCardService service.
// All implementations must embed UnimplementedNfcCardServiceServer
// for forward compatibility
type NfcCardServiceServer interface {
	// === DB information
	GetInfo(context.Context, *common.Index) (*NfcCardBaseInfo, error)
	// References
	GetDeviceId(context.Context, *common.Index) (*common.Reference, error)
	// Common
	GetMeta(context.Context, *common.Index) (*common.Meta, error)
	mustEmbedUnimplementedNfcCardServiceServer()
}

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

func (UnimplementedNfcCardServiceServer) GetInfo(context.Context, *common.Index) (*NfcCardBaseInfo, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented")
}
func (UnimplementedNfcCardServiceServer) GetDeviceId(context.Context, *common.Index) (*common.Reference, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetDeviceId not implemented")
}
func (UnimplementedNfcCardServiceServer) GetMeta(context.Context, *common.Index) (*common.Meta, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetMeta not implemented")
}
func (UnimplementedNfcCardServiceServer) mustEmbedUnimplementedNfcCardServiceServer() {}

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

func RegisterNfcCardServiceServer(s grpc.ServiceRegistrar, srv NfcCardServiceServer) {
	s.RegisterService(&NfcCardService_ServiceDesc, srv)
}

func _NfcCardService_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(common.Index)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(NfcCardServiceServer).GetInfo(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pagerino.nfc_card.NfcCardService/GetInfo",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(NfcCardServiceServer).GetInfo(ctx, req.(*common.Index))
	}
	return interceptor(ctx, in, info, handler)
}

func _NfcCardService_GetDeviceId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(common.Index)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(NfcCardServiceServer).GetDeviceId(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pagerino.nfc_card.NfcCardService/GetDeviceId",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(NfcCardServiceServer).GetDeviceId(ctx, req.(*common.Index))
	}
	return interceptor(ctx, in, info, handler)
}

func _NfcCardService_GetMeta_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(common.Index)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(NfcCardServiceServer).GetMeta(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pagerino.nfc_card.NfcCardService/GetMeta",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(NfcCardServiceServer).GetMeta(ctx, req.(*common.Index))
	}
	return interceptor(ctx, in, info, handler)
}

// NfcCardService_ServiceDesc is the grpc.ServiceDesc for NfcCardService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var NfcCardService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pagerino.nfc_card.NfcCardService",
	HandlerType: (*NfcCardServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetInfo",
			Handler:    _NfcCardService_GetInfo_Handler,
		},
		{
			MethodName: "GetDeviceId",
			Handler:    _NfcCardService_GetDeviceId_Handler,
		},
		{
			MethodName: "GetMeta",
			Handler:    _NfcCardService_GetMeta_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "nfccard.proto",
}
