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

package api_user

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

// UserServiceClient is the client API for UserService 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 UserServiceClient interface {
	// === DB information
	GetAll(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*UserAllInfo, error)
	GetInfo(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*UserBaseInfo, error)
	GetPassword(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*Password, error)
	// References
	GetRoleId(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.Reference, error)
	GetDeviceIds(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 userServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient {
	return &userServiceClient{cc}
}

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

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

func (c *userServiceClient) GetPassword(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*Password, error) {
	out := new(Password)
	err := c.cc.Invoke(ctx, "/pagerino.user.UserService/GetPassword", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

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

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

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

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

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

// UserServiceServer is the server API for UserService service.
// All implementations must embed UnimplementedUserServiceServer
// for forward compatibility
type UserServiceServer interface {
	// === DB information
	GetAll(context.Context, *common.StrIndex) (*UserAllInfo, error)
	GetInfo(context.Context, *common.StrIndex) (*UserBaseInfo, error)
	GetPassword(context.Context, *common.StrIndex) (*Password, error)
	// References
	GetRoleId(context.Context, *common.StrIndex) (*common.Reference, error)
	GetDeviceIds(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)
	mustEmbedUnimplementedUserServiceServer()
}

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

func (UnimplementedUserServiceServer) GetAll(context.Context, *common.StrIndex) (*UserAllInfo, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetAll not implemented")
}
func (UnimplementedUserServiceServer) GetInfo(context.Context, *common.StrIndex) (*UserBaseInfo, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented")
}
func (UnimplementedUserServiceServer) GetPassword(context.Context, *common.StrIndex) (*Password, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetPassword not implemented")
}
func (UnimplementedUserServiceServer) GetRoleId(context.Context, *common.StrIndex) (*common.Reference, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetRoleId not implemented")
}
func (UnimplementedUserServiceServer) GetDeviceIds(context.Context, *common.StrIndex) (*common.References, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetDeviceIds not implemented")
}
func (UnimplementedUserServiceServer) GetLogs(context.Context, *common.StrIndex) (*common.References, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetLogs not implemented")
}
func (UnimplementedUserServiceServer) GetActivity(context.Context, *common.StrIndex) (*common.Activity, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetActivity not implemented")
}
func (UnimplementedUserServiceServer) GetMeta(context.Context, *common.StrIndex) (*common.Meta, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetMeta not implemented")
}
func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {}

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

func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) {
	s.RegisterService(&UserService_ServiceDesc, srv)
}

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

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

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

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

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

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

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

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

// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pagerino.user.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetAll",
			Handler:    _UserService_GetAll_Handler,
		},
		{
			MethodName: "GetInfo",
			Handler:    _UserService_GetInfo_Handler,
		},
		{
			MethodName: "GetPassword",
			Handler:    _UserService_GetPassword_Handler,
		},
		{
			MethodName: "GetRoleId",
			Handler:    _UserService_GetRoleId_Handler,
		},
		{
			MethodName: "GetDeviceIds",
			Handler:    _UserService_GetDeviceIds_Handler,
		},
		{
			MethodName: "GetLogs",
			Handler:    _UserService_GetLogs_Handler,
		},
		{
			MethodName: "GetActivity",
			Handler:    _UserService_GetActivity_Handler,
		},
		{
			MethodName: "GetMeta",
			Handler:    _UserService_GetMeta_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "user.proto",
}
