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

package api_status

import (
	context "context"
	common "pagerino-web/pager_api/common"

	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

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

type statusServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewStatusServiceClient(cc grpc.ClientConnInterface) StatusServiceClient {
	return &statusServiceClient{cc}
}

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

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

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

// StatusServiceServer is the server API for StatusService service.
// All implementations must embed UnimplementedStatusServiceServer
// for forward compatibility
type StatusServiceServer interface {
	// === DB information
	GetInfo(context.Context, *common.StrIndex) (*StatusBasicInfo, error)
	// References
	GetDeviceId(context.Context, *common.StrIndex) (*common.Reference, error)
	// Common
	GetMeta(context.Context, *common.StrIndex) (*common.Meta, error)
	mustEmbedUnimplementedStatusServiceServer()
}

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

func (UnimplementedStatusServiceServer) GetInfo(context.Context, *common.StrIndex) (*StatusBasicInfo, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented")
}
func (UnimplementedStatusServiceServer) GetDeviceId(context.Context, *common.StrIndex) (*common.Reference, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetDeviceId not implemented")
}
func (UnimplementedStatusServiceServer) GetMeta(context.Context, *common.StrIndex) (*common.Meta, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetMeta not implemented")
}
func (UnimplementedStatusServiceServer) mustEmbedUnimplementedStatusServiceServer() {}

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

func RegisterStatusServiceServer(s grpc.ServiceRegistrar, srv StatusServiceServer) {
	s.RegisterService(&StatusService_ServiceDesc, srv)
}

func _StatusService_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.(StatusServiceServer).GetInfo(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pagerino.status.StatusService/GetInfo",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(StatusServiceServer).GetInfo(ctx, req.(*common.StrIndex))
	}
	return interceptor(ctx, in, info, handler)
}

func _StatusService_GetDeviceId_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.(StatusServiceServer).GetDeviceId(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pagerino.status.StatusService/GetDeviceId",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(StatusServiceServer).GetDeviceId(ctx, req.(*common.StrIndex))
	}
	return interceptor(ctx, in, info, handler)
}

func _StatusService_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.(StatusServiceServer).GetMeta(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pagerino.status.StatusService/GetMeta",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(StatusServiceServer).GetMeta(ctx, req.(*common.StrIndex))
	}
	return interceptor(ctx, in, info, handler)
}

// StatusService_ServiceDesc is the grpc.ServiceDesc for StatusService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var StatusService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pagerino.status.StatusService",
	HandlerType: (*StatusServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetInfo",
			Handler:    _StatusService_GetInfo_Handler,
		},
		{
			MethodName: "GetDeviceId",
			Handler:    _StatusService_GetDeviceId_Handler,
		},
		{
			MethodName: "GetMeta",
			Handler:    _StatusService_GetMeta_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "status.proto",
}
