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

package api_device

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

// DeviceServiceClient is the client API for DeviceService 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 DeviceServiceClient interface {
	// === DB information
	GetAll(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*DeviceAllInfo, error)
	GetInfo(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*DeviceBaseInfo, error)
	GetCharge(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*Charge, error)
	GetLocation(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*Location, error)
	// References
	GetNfcCardIds(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error)
	GetStatusIds(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error)
	GetSentMessageIds(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error)
	GetReceivedMessageIds(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error)
	GetLogs(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error)
	// Common
	GetActivity(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.Activity, error)
	GetMeta(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.Meta, error)
}

type deviceServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewDeviceServiceClient(cc grpc.ClientConnInterface) DeviceServiceClient {
	return &deviceServiceClient{cc}
}

func (c *deviceServiceClient) GetAll(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*DeviceAllInfo, error) {
	out := new(DeviceAllInfo)
	err := c.cc.Invoke(ctx, "/pagerino.device.DeviceService/GetAll", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *deviceServiceClient) GetInfo(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*DeviceBaseInfo, error) {
	out := new(DeviceBaseInfo)
	err := c.cc.Invoke(ctx, "/pagerino.device.DeviceService/GetInfo", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *deviceServiceClient) GetCharge(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*Charge, error) {
	out := new(Charge)
	err := c.cc.Invoke(ctx, "/pagerino.device.DeviceService/GetCharge", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *deviceServiceClient) GetLocation(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*Location, error) {
	out := new(Location)
	err := c.cc.Invoke(ctx, "/pagerino.device.DeviceService/GetLocation", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *deviceServiceClient) GetNfcCardIds(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error) {
	out := new(common.References)
	err := c.cc.Invoke(ctx, "/pagerino.device.DeviceService/GetNfcCardIds", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *deviceServiceClient) GetStatusIds(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error) {
	out := new(common.References)
	err := c.cc.Invoke(ctx, "/pagerino.device.DeviceService/GetStatusIds", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *deviceServiceClient) GetSentMessageIds(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error) {
	out := new(common.References)
	err := c.cc.Invoke(ctx, "/pagerino.device.DeviceService/GetSentMessageIds", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *deviceServiceClient) GetReceivedMessageIds(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error) {
	out := new(common.References)
	err := c.cc.Invoke(ctx, "/pagerino.device.DeviceService/GetReceivedMessageIds", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *deviceServiceClient) GetLogs(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error) {
	out := new(common.References)
	err := c.cc.Invoke(ctx, "/pagerino.device.DeviceService/GetLogs", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *deviceServiceClient) GetActivity(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.Activity, error) {
	out := new(common.Activity)
	err := c.cc.Invoke(ctx, "/pagerino.device.DeviceService/GetActivity", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

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

// DeviceServiceServer is the server API for DeviceService service.
// All implementations must embed UnimplementedDeviceServiceServer
// for forward compatibility
type DeviceServiceServer interface {
	// === DB information
	GetAll(context.Context, *common.StrIndex) (*DeviceAllInfo, error)
	GetInfo(context.Context, *common.StrIndex) (*DeviceBaseInfo, error)
	GetCharge(context.Context, *common.StrIndex) (*Charge, error)
	GetLocation(context.Context, *common.StrIndex) (*Location, error)
	// References
	GetNfcCardIds(context.Context, *common.StrIndex) (*common.References, error)
	GetStatusIds(context.Context, *common.StrIndex) (*common.References, error)
	GetSentMessageIds(context.Context, *common.StrIndex) (*common.References, error)
	GetReceivedMessageIds(context.Context, *common.StrIndex) (*common.References, error)
	GetLogs(context.Context, *common.StrIndex) (*common.References, error)
	// Common
	GetActivity(context.Context, *common.StrIndex) (*common.Activity, error)
	GetMeta(context.Context, *common.StrIndex) (*common.Meta, error)
	mustEmbedUnimplementedDeviceServiceServer()
}

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

func (UnimplementedDeviceServiceServer) GetAll(context.Context, *common.StrIndex) (*DeviceAllInfo, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetAll not implemented")
}
func (UnimplementedDeviceServiceServer) GetInfo(context.Context, *common.StrIndex) (*DeviceBaseInfo, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented")
}
func (UnimplementedDeviceServiceServer) GetCharge(context.Context, *common.StrIndex) (*Charge, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetCharge not implemented")
}
func (UnimplementedDeviceServiceServer) GetLocation(context.Context, *common.StrIndex) (*Location, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetLocation not implemented")
}
func (UnimplementedDeviceServiceServer) GetNfcCardIds(context.Context, *common.StrIndex) (*common.References, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetNfcCardIds not implemented")
}
func (UnimplementedDeviceServiceServer) GetStatusIds(context.Context, *common.StrIndex) (*common.References, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetStatusIds not implemented")
}
func (UnimplementedDeviceServiceServer) GetSentMessageIds(context.Context, *common.StrIndex) (*common.References, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetSentMessageIds not implemented")
}
func (UnimplementedDeviceServiceServer) GetReceivedMessageIds(context.Context, *common.StrIndex) (*common.References, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetReceivedMessageIds not implemented")
}
func (UnimplementedDeviceServiceServer) GetLogs(context.Context, *common.StrIndex) (*common.References, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetLogs not implemented")
}
func (UnimplementedDeviceServiceServer) GetActivity(context.Context, *common.StrIndex) (*common.Activity, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetActivity not implemented")
}
func (UnimplementedDeviceServiceServer) GetMeta(context.Context, *common.StrIndex) (*common.Meta, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetMeta not implemented")
}
func (UnimplementedDeviceServiceServer) mustEmbedUnimplementedDeviceServiceServer() {}

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

func RegisterDeviceServiceServer(s grpc.ServiceRegistrar, srv DeviceServiceServer) {
	s.RegisterService(&DeviceService_ServiceDesc, srv)
}

func _DeviceService_GetAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(common.StrIndex)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DeviceServiceServer).GetAll(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pagerino.device.DeviceService/GetAll",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DeviceServiceServer).GetAll(ctx, req.(*common.StrIndex))
	}
	return interceptor(ctx, in, info, handler)
}

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

func _DeviceService_GetCharge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(common.StrIndex)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DeviceServiceServer).GetCharge(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pagerino.device.DeviceService/GetCharge",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DeviceServiceServer).GetCharge(ctx, req.(*common.StrIndex))
	}
	return interceptor(ctx, in, info, handler)
}

func _DeviceService_GetLocation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(common.StrIndex)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DeviceServiceServer).GetLocation(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pagerino.device.DeviceService/GetLocation",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DeviceServiceServer).GetLocation(ctx, req.(*common.StrIndex))
	}
	return interceptor(ctx, in, info, handler)
}

func _DeviceService_GetNfcCardIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(common.StrIndex)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DeviceServiceServer).GetNfcCardIds(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pagerino.device.DeviceService/GetNfcCardIds",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DeviceServiceServer).GetNfcCardIds(ctx, req.(*common.StrIndex))
	}
	return interceptor(ctx, in, info, handler)
}

func _DeviceService_GetStatusIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(common.StrIndex)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DeviceServiceServer).GetStatusIds(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pagerino.device.DeviceService/GetStatusIds",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DeviceServiceServer).GetStatusIds(ctx, req.(*common.StrIndex))
	}
	return interceptor(ctx, in, info, handler)
}

func _DeviceService_GetSentMessageIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(common.StrIndex)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DeviceServiceServer).GetSentMessageIds(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pagerino.device.DeviceService/GetSentMessageIds",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DeviceServiceServer).GetSentMessageIds(ctx, req.(*common.StrIndex))
	}
	return interceptor(ctx, in, info, handler)
}

func _DeviceService_GetReceivedMessageIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(common.StrIndex)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DeviceServiceServer).GetReceivedMessageIds(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pagerino.device.DeviceService/GetReceivedMessageIds",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DeviceServiceServer).GetReceivedMessageIds(ctx, req.(*common.StrIndex))
	}
	return interceptor(ctx, in, info, handler)
}

func _DeviceService_GetLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(common.StrIndex)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DeviceServiceServer).GetLogs(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pagerino.device.DeviceService/GetLogs",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DeviceServiceServer).GetLogs(ctx, req.(*common.StrIndex))
	}
	return interceptor(ctx, in, info, handler)
}

func _DeviceService_GetActivity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(common.StrIndex)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DeviceServiceServer).GetActivity(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pagerino.device.DeviceService/GetActivity",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DeviceServiceServer).GetActivity(ctx, req.(*common.StrIndex))
	}
	return interceptor(ctx, in, info, handler)
}

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

// DeviceService_ServiceDesc is the grpc.ServiceDesc for DeviceService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var DeviceService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pagerino.device.DeviceService",
	HandlerType: (*DeviceServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetAll",
			Handler:    _DeviceService_GetAll_Handler,
		},
		{
			MethodName: "GetInfo",
			Handler:    _DeviceService_GetInfo_Handler,
		},
		{
			MethodName: "GetCharge",
			Handler:    _DeviceService_GetCharge_Handler,
		},
		{
			MethodName: "GetLocation",
			Handler:    _DeviceService_GetLocation_Handler,
		},
		{
			MethodName: "GetNfcCardIds",
			Handler:    _DeviceService_GetNfcCardIds_Handler,
		},
		{
			MethodName: "GetStatusIds",
			Handler:    _DeviceService_GetStatusIds_Handler,
		},
		{
			MethodName: "GetSentMessageIds",
			Handler:    _DeviceService_GetSentMessageIds_Handler,
		},
		{
			MethodName: "GetReceivedMessageIds",
			Handler:    _DeviceService_GetReceivedMessageIds_Handler,
		},
		{
			MethodName: "GetLogs",
			Handler:    _DeviceService_GetLogs_Handler,
		},
		{
			MethodName: "GetActivity",
			Handler:    _DeviceService_GetActivity_Handler,
		},
		{
			MethodName: "GetMeta",
			Handler:    _DeviceService_GetMeta_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "device.proto",
}
