// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             v3.20.0--rc2
// source: resource.proto

package pb

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.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

// ResourceClient is the client API for Resource 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 ResourceClient interface {
	//开通或者取消用户/企业权益
	PowerHandle(ctx context.Context, in *PowerReq, opts ...grpc.CallOption) (*Resp, error)
	//检查用户/企业权益
	CheckPower(ctx context.Context, in *CheckPowerReq, opts ...grpc.CallOption) (*Resp, error)
	//资源扣减
	Deduction(ctx context.Context, in *DeductionReq, opts ...grpc.CallOption) (*Resp, error)
	//资源充值
	Recharge(ctx context.Context, in *RechargeReq, opts ...grpc.CallOption) (*Resp, error)
	//先把有权限的人清空，再把权益授权给新的人
	ReEmpower(ctx context.Context, in *EmpowerReq, opts ...grpc.CallOption) (*Resp, error)
	//先根据功能分类把人的权益清空，再给人授权新的权益
	CrReEmpower(ctx context.Context, in *CrReEmpowerReq, opts ...grpc.CallOption) (*Resp, error)
	//授权
	Empower(ctx context.Context, in *EmpowerReq, opts ...grpc.CallOption) (*Resp, error)
	//根据功能代码取消授权
	CancelEmpower(ctx context.Context, in *EmpowerReq, opts ...grpc.CallOption) (*Resp, error)
	//根据功能分类取消授权
	CancelAllEmpower(ctx context.Context, in *AllEmpowerReq, opts ...grpc.CallOption) (*Resp, error)
	//授权列表
	EmpowerList(ctx context.Context, in *EmpowerListReq, opts ...grpc.CallOption) (*EmpowerListResp, error)
	//所有的权益
	Haspowers(ctx context.Context, in *HaspowersReq, opts ...grpc.CallOption) (*HaspowersResp, error)
	//根据功能代码获取待授权详情
	WaitEmpowerDetail(ctx context.Context, in *WaitEmpowerDetailReq, opts ...grpc.CallOption) (*WaitEmpowerDetailResp, error)
	//根据商品规格获取待授权详情
	WaitEmpowerDetailBySpecId(ctx context.Context, in *WaitEmpowerDetailBySpecIdReq, opts ...grpc.CallOption) (*WaitEmpowerDetailsResp, error)
}

type resourceClient struct {
	cc grpc.ClientConnInterface
}

func NewResourceClient(cc grpc.ClientConnInterface) ResourceClient {
	return &resourceClient{cc}
}

func (c *resourceClient) PowerHandle(ctx context.Context, in *PowerReq, opts ...grpc.CallOption) (*Resp, error) {
	out := new(Resp)
	err := c.cc.Invoke(ctx, "/Resource/PowerHandle", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *resourceClient) CheckPower(ctx context.Context, in *CheckPowerReq, opts ...grpc.CallOption) (*Resp, error) {
	out := new(Resp)
	err := c.cc.Invoke(ctx, "/Resource/CheckPower", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *resourceClient) Deduction(ctx context.Context, in *DeductionReq, opts ...grpc.CallOption) (*Resp, error) {
	out := new(Resp)
	err := c.cc.Invoke(ctx, "/Resource/Deduction", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *resourceClient) Recharge(ctx context.Context, in *RechargeReq, opts ...grpc.CallOption) (*Resp, error) {
	out := new(Resp)
	err := c.cc.Invoke(ctx, "/Resource/Recharge", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *resourceClient) ReEmpower(ctx context.Context, in *EmpowerReq, opts ...grpc.CallOption) (*Resp, error) {
	out := new(Resp)
	err := c.cc.Invoke(ctx, "/Resource/ReEmpower", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *resourceClient) CrReEmpower(ctx context.Context, in *CrReEmpowerReq, opts ...grpc.CallOption) (*Resp, error) {
	out := new(Resp)
	err := c.cc.Invoke(ctx, "/Resource/CrReEmpower", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *resourceClient) Empower(ctx context.Context, in *EmpowerReq, opts ...grpc.CallOption) (*Resp, error) {
	out := new(Resp)
	err := c.cc.Invoke(ctx, "/Resource/Empower", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *resourceClient) CancelEmpower(ctx context.Context, in *EmpowerReq, opts ...grpc.CallOption) (*Resp, error) {
	out := new(Resp)
	err := c.cc.Invoke(ctx, "/Resource/CancelEmpower", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *resourceClient) CancelAllEmpower(ctx context.Context, in *AllEmpowerReq, opts ...grpc.CallOption) (*Resp, error) {
	out := new(Resp)
	err := c.cc.Invoke(ctx, "/Resource/CancelAllEmpower", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *resourceClient) EmpowerList(ctx context.Context, in *EmpowerListReq, opts ...grpc.CallOption) (*EmpowerListResp, error) {
	out := new(EmpowerListResp)
	err := c.cc.Invoke(ctx, "/Resource/EmpowerList", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *resourceClient) Haspowers(ctx context.Context, in *HaspowersReq, opts ...grpc.CallOption) (*HaspowersResp, error) {
	out := new(HaspowersResp)
	err := c.cc.Invoke(ctx, "/Resource/Haspowers", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *resourceClient) WaitEmpowerDetail(ctx context.Context, in *WaitEmpowerDetailReq, opts ...grpc.CallOption) (*WaitEmpowerDetailResp, error) {
	out := new(WaitEmpowerDetailResp)
	err := c.cc.Invoke(ctx, "/Resource/WaitEmpowerDetail", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *resourceClient) WaitEmpowerDetailBySpecId(ctx context.Context, in *WaitEmpowerDetailBySpecIdReq, opts ...grpc.CallOption) (*WaitEmpowerDetailsResp, error) {
	out := new(WaitEmpowerDetailsResp)
	err := c.cc.Invoke(ctx, "/Resource/WaitEmpowerDetailBySpecId", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ResourceServer is the server API for Resource service.
// All implementations must embed UnimplementedResourceServer
// for forward compatibility
type ResourceServer interface {
	//开通或者取消用户/企业权益
	PowerHandle(context.Context, *PowerReq) (*Resp, error)
	//检查用户/企业权益
	CheckPower(context.Context, *CheckPowerReq) (*Resp, error)
	//资源扣减
	Deduction(context.Context, *DeductionReq) (*Resp, error)
	//资源充值
	Recharge(context.Context, *RechargeReq) (*Resp, error)
	//先把有权限的人清空，再把权益授权给新的人
	ReEmpower(context.Context, *EmpowerReq) (*Resp, error)
	//先根据功能分类把人的权益清空，再给人授权新的权益
	CrReEmpower(context.Context, *CrReEmpowerReq) (*Resp, error)
	//授权
	Empower(context.Context, *EmpowerReq) (*Resp, error)
	//根据功能代码取消授权
	CancelEmpower(context.Context, *EmpowerReq) (*Resp, error)
	//根据功能分类取消授权
	CancelAllEmpower(context.Context, *AllEmpowerReq) (*Resp, error)
	//授权列表
	EmpowerList(context.Context, *EmpowerListReq) (*EmpowerListResp, error)
	//所有的权益
	Haspowers(context.Context, *HaspowersReq) (*HaspowersResp, error)
	//根据功能代码获取待授权详情
	WaitEmpowerDetail(context.Context, *WaitEmpowerDetailReq) (*WaitEmpowerDetailResp, error)
	//根据商品规格获取待授权详情
	WaitEmpowerDetailBySpecId(context.Context, *WaitEmpowerDetailBySpecIdReq) (*WaitEmpowerDetailsResp, error)
	mustEmbedUnimplementedResourceServer()
}

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

func (UnimplementedResourceServer) PowerHandle(context.Context, *PowerReq) (*Resp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method PowerHandle not implemented")
}
func (UnimplementedResourceServer) CheckPower(context.Context, *CheckPowerReq) (*Resp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CheckPower not implemented")
}
func (UnimplementedResourceServer) Deduction(context.Context, *DeductionReq) (*Resp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Deduction not implemented")
}
func (UnimplementedResourceServer) Recharge(context.Context, *RechargeReq) (*Resp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Recharge not implemented")
}
func (UnimplementedResourceServer) ReEmpower(context.Context, *EmpowerReq) (*Resp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ReEmpower not implemented")
}
func (UnimplementedResourceServer) CrReEmpower(context.Context, *CrReEmpowerReq) (*Resp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CrReEmpower not implemented")
}
func (UnimplementedResourceServer) Empower(context.Context, *EmpowerReq) (*Resp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Empower not implemented")
}
func (UnimplementedResourceServer) CancelEmpower(context.Context, *EmpowerReq) (*Resp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CancelEmpower not implemented")
}
func (UnimplementedResourceServer) CancelAllEmpower(context.Context, *AllEmpowerReq) (*Resp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CancelAllEmpower not implemented")
}
func (UnimplementedResourceServer) EmpowerList(context.Context, *EmpowerListReq) (*EmpowerListResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method EmpowerList not implemented")
}
func (UnimplementedResourceServer) Haspowers(context.Context, *HaspowersReq) (*HaspowersResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Haspowers not implemented")
}
func (UnimplementedResourceServer) WaitEmpowerDetail(context.Context, *WaitEmpowerDetailReq) (*WaitEmpowerDetailResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method WaitEmpowerDetail not implemented")
}
func (UnimplementedResourceServer) WaitEmpowerDetailBySpecId(context.Context, *WaitEmpowerDetailBySpecIdReq) (*WaitEmpowerDetailsResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method WaitEmpowerDetailBySpecId not implemented")
}
func (UnimplementedResourceServer) mustEmbedUnimplementedResourceServer() {}

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

func RegisterResourceServer(s grpc.ServiceRegistrar, srv ResourceServer) {
	s.RegisterService(&Resource_ServiceDesc, srv)
}

func _Resource_PowerHandle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PowerReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ResourceServer).PowerHandle(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/Resource/PowerHandle",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ResourceServer).PowerHandle(ctx, req.(*PowerReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Resource_CheckPower_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CheckPowerReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ResourceServer).CheckPower(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/Resource/CheckPower",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ResourceServer).CheckPower(ctx, req.(*CheckPowerReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Resource_Deduction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeductionReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ResourceServer).Deduction(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/Resource/Deduction",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ResourceServer).Deduction(ctx, req.(*DeductionReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Resource_Recharge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RechargeReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ResourceServer).Recharge(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/Resource/Recharge",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ResourceServer).Recharge(ctx, req.(*RechargeReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Resource_ReEmpower_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(EmpowerReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ResourceServer).ReEmpower(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/Resource/ReEmpower",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ResourceServer).ReEmpower(ctx, req.(*EmpowerReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Resource_CrReEmpower_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CrReEmpowerReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ResourceServer).CrReEmpower(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/Resource/CrReEmpower",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ResourceServer).CrReEmpower(ctx, req.(*CrReEmpowerReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Resource_Empower_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(EmpowerReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ResourceServer).Empower(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/Resource/Empower",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ResourceServer).Empower(ctx, req.(*EmpowerReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Resource_CancelEmpower_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(EmpowerReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ResourceServer).CancelEmpower(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/Resource/CancelEmpower",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ResourceServer).CancelEmpower(ctx, req.(*EmpowerReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Resource_CancelAllEmpower_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AllEmpowerReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ResourceServer).CancelAllEmpower(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/Resource/CancelAllEmpower",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ResourceServer).CancelAllEmpower(ctx, req.(*AllEmpowerReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Resource_EmpowerList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(EmpowerListReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ResourceServer).EmpowerList(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/Resource/EmpowerList",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ResourceServer).EmpowerList(ctx, req.(*EmpowerListReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Resource_Haspowers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(HaspowersReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ResourceServer).Haspowers(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/Resource/Haspowers",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ResourceServer).Haspowers(ctx, req.(*HaspowersReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Resource_WaitEmpowerDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(WaitEmpowerDetailReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ResourceServer).WaitEmpowerDetail(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/Resource/WaitEmpowerDetail",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ResourceServer).WaitEmpowerDetail(ctx, req.(*WaitEmpowerDetailReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Resource_WaitEmpowerDetailBySpecId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(WaitEmpowerDetailBySpecIdReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ResourceServer).WaitEmpowerDetailBySpecId(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/Resource/WaitEmpowerDetailBySpecId",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ResourceServer).WaitEmpowerDetailBySpecId(ctx, req.(*WaitEmpowerDetailBySpecIdReq))
	}
	return interceptor(ctx, in, info, handler)
}

// Resource_ServiceDesc is the grpc.ServiceDesc for Resource service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Resource_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Resource",
	HandlerType: (*ResourceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "PowerHandle",
			Handler:    _Resource_PowerHandle_Handler,
		},
		{
			MethodName: "CheckPower",
			Handler:    _Resource_CheckPower_Handler,
		},
		{
			MethodName: "Deduction",
			Handler:    _Resource_Deduction_Handler,
		},
		{
			MethodName: "Recharge",
			Handler:    _Resource_Recharge_Handler,
		},
		{
			MethodName: "ReEmpower",
			Handler:    _Resource_ReEmpower_Handler,
		},
		{
			MethodName: "CrReEmpower",
			Handler:    _Resource_CrReEmpower_Handler,
		},
		{
			MethodName: "Empower",
			Handler:    _Resource_Empower_Handler,
		},
		{
			MethodName: "CancelEmpower",
			Handler:    _Resource_CancelEmpower_Handler,
		},
		{
			MethodName: "CancelAllEmpower",
			Handler:    _Resource_CancelAllEmpower_Handler,
		},
		{
			MethodName: "EmpowerList",
			Handler:    _Resource_EmpowerList_Handler,
		},
		{
			MethodName: "Haspowers",
			Handler:    _Resource_Haspowers_Handler,
		},
		{
			MethodName: "WaitEmpowerDetail",
			Handler:    _Resource_WaitEmpowerDetail_Handler,
		},
		{
			MethodName: "WaitEmpowerDetailBySpecId",
			Handler:    _Resource_WaitEmpowerDetailBySpecId_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "resource.proto",
}
