// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v3.19.4
// source: proto/iam.proto

package iam

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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	Iam_GetAdminUserByID_FullMethodName       = "/iam.Iam/GetAdminUserByID"
	Iam_BatchGetAdminUser_FullMethodName      = "/iam.Iam/BatchGetAdminUser"
	Iam_GetAdminUserByNickName_FullMethodName = "/iam.Iam/GetAdminUserByNickName"
	Iam_GetRoleSystems_FullMethodName         = "/iam.Iam/GetRoleSystems"
)

// IamClient is the client API for Iam 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 IamClient interface {
	// 根据ID获取管理员信息
	GetAdminUserByID(ctx context.Context, in *GetAdminUserByIDReq, opts ...grpc.CallOption) (*GetAdminUserByIDResp, error)
	// 批量获取管理员信息
	BatchGetAdminUser(ctx context.Context, in *BatchGetAdminUserReq, opts ...grpc.CallOption) (*BatchGetAdminUserResp, error)
	// 根据昵称获取管理员信息
	GetAdminUserByNickName(ctx context.Context, in *GetAdminUserByNickNameReq, opts ...grpc.CallOption) (*GetAdminUserByNickNameResp, error)
	// 获取角色拥有的系统权限
	GetRoleSystems(ctx context.Context, in *GetRoleSystemsReq, opts ...grpc.CallOption) (*GetRoleSystemsResp, error)
}

type iamClient struct {
	cc grpc.ClientConnInterface
}

func NewIamClient(cc grpc.ClientConnInterface) IamClient {
	return &iamClient{cc}
}

func (c *iamClient) GetAdminUserByID(ctx context.Context, in *GetAdminUserByIDReq, opts ...grpc.CallOption) (*GetAdminUserByIDResp, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetAdminUserByIDResp)
	err := c.cc.Invoke(ctx, Iam_GetAdminUserByID_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *iamClient) BatchGetAdminUser(ctx context.Context, in *BatchGetAdminUserReq, opts ...grpc.CallOption) (*BatchGetAdminUserResp, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(BatchGetAdminUserResp)
	err := c.cc.Invoke(ctx, Iam_BatchGetAdminUser_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *iamClient) GetAdminUserByNickName(ctx context.Context, in *GetAdminUserByNickNameReq, opts ...grpc.CallOption) (*GetAdminUserByNickNameResp, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetAdminUserByNickNameResp)
	err := c.cc.Invoke(ctx, Iam_GetAdminUserByNickName_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *iamClient) GetRoleSystems(ctx context.Context, in *GetRoleSystemsReq, opts ...grpc.CallOption) (*GetRoleSystemsResp, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetRoleSystemsResp)
	err := c.cc.Invoke(ctx, Iam_GetRoleSystems_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// IamServer is the server API for Iam service.
// All implementations must embed UnimplementedIamServer
// for forward compatibility.
type IamServer interface {
	// 根据ID获取管理员信息
	GetAdminUserByID(context.Context, *GetAdminUserByIDReq) (*GetAdminUserByIDResp, error)
	// 批量获取管理员信息
	BatchGetAdminUser(context.Context, *BatchGetAdminUserReq) (*BatchGetAdminUserResp, error)
	// 根据昵称获取管理员信息
	GetAdminUserByNickName(context.Context, *GetAdminUserByNickNameReq) (*GetAdminUserByNickNameResp, error)
	// 获取角色拥有的系统权限
	GetRoleSystems(context.Context, *GetRoleSystemsReq) (*GetRoleSystemsResp, error)
	mustEmbedUnimplementedIamServer()
}

// UnimplementedIamServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedIamServer struct{}

func (UnimplementedIamServer) GetAdminUserByID(context.Context, *GetAdminUserByIDReq) (*GetAdminUserByIDResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetAdminUserByID not implemented")
}
func (UnimplementedIamServer) BatchGetAdminUser(context.Context, *BatchGetAdminUserReq) (*BatchGetAdminUserResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method BatchGetAdminUser not implemented")
}
func (UnimplementedIamServer) GetAdminUserByNickName(context.Context, *GetAdminUserByNickNameReq) (*GetAdminUserByNickNameResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetAdminUserByNickName not implemented")
}
func (UnimplementedIamServer) GetRoleSystems(context.Context, *GetRoleSystemsReq) (*GetRoleSystemsResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetRoleSystems not implemented")
}
func (UnimplementedIamServer) mustEmbedUnimplementedIamServer() {}
func (UnimplementedIamServer) testEmbeddedByValue()             {}

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

func RegisterIamServer(s grpc.ServiceRegistrar, srv IamServer) {
	// If the following call pancis, it indicates UnimplementedIamServer was
	// embedded by pointer and is nil.  This will cause panics if an
	// unimplemented method is ever invoked, so we test this at initialization
	// time to prevent it from happening at runtime later due to I/O.
	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
		t.testEmbeddedByValue()
	}
	s.RegisterService(&Iam_ServiceDesc, srv)
}

func _Iam_GetAdminUserByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetAdminUserByIDReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(IamServer).GetAdminUserByID(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Iam_GetAdminUserByID_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(IamServer).GetAdminUserByID(ctx, req.(*GetAdminUserByIDReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Iam_BatchGetAdminUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(BatchGetAdminUserReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(IamServer).BatchGetAdminUser(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Iam_BatchGetAdminUser_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(IamServer).BatchGetAdminUser(ctx, req.(*BatchGetAdminUserReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Iam_GetAdminUserByNickName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetAdminUserByNickNameReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(IamServer).GetAdminUserByNickName(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Iam_GetAdminUserByNickName_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(IamServer).GetAdminUserByNickName(ctx, req.(*GetAdminUserByNickNameReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Iam_GetRoleSystems_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetRoleSystemsReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(IamServer).GetRoleSystems(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Iam_GetRoleSystems_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(IamServer).GetRoleSystems(ctx, req.(*GetRoleSystemsReq))
	}
	return interceptor(ctx, in, info, handler)
}

// Iam_ServiceDesc is the grpc.ServiceDesc for Iam service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Iam_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "iam.Iam",
	HandlerType: (*IamServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetAdminUserByID",
			Handler:    _Iam_GetAdminUserByID_Handler,
		},
		{
			MethodName: "BatchGetAdminUser",
			Handler:    _Iam_BatchGetAdminUser_Handler,
		},
		{
			MethodName: "GetAdminUserByNickName",
			Handler:    _Iam_GetAdminUserByNickName_Handler,
		},
		{
			MethodName: "GetRoleSystems",
			Handler:    _Iam_GetRoleSystems_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/iam.proto",
}
