// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.2
// - protoc             v7.35.0
// source: module/finance/wallet/proto/payment.proto

package wallet

import (
	protobuf "bsm/full/protobuf"
	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 (
	Payment_Hello_FullMethodName    = "/wallet.Payment/Hello"
	Payment_Way_FullMethodName      = "/wallet.Payment/Way"
	Payment_Get_FullMethodName      = "/wallet.Payment/Get"
	Payment_ByOrder_FullMethodName  = "/wallet.Payment/ByOrder"
	Payment_ByCharge_FullMethodName = "/wallet.Payment/ByCharge"
	Payment_Callback_FullMethodName = "/wallet.Payment/Callback"
)

// PaymentClient is the client API for Payment 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 PaymentClient interface {
	Hello(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*PaymentReply, error)
	// 获取平台支持的支付网关
	Way(ctx context.Context, in *WayRequest, opts ...grpc.CallOption) (*WayReply, error)
	// 获取支付的详情
	Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*PaymentItem, error)
	// 支付-电商订单
	ByOrder(ctx context.Context, in *OrderRequest, opts ...grpc.CallOption) (*PaymentReply, error)
	// 支付-充值
	ByCharge(ctx context.Context, in *ChargeRequest, opts ...grpc.CallOption) (*PaymentReply, error)
	// 回调更新支付的结果和状态
	Callback(ctx context.Context, in *CallbackRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
}

type paymentClient struct {
	cc grpc.ClientConnInterface
}

func NewPaymentClient(cc grpc.ClientConnInterface) PaymentClient {
	return &paymentClient{cc}
}

func (c *paymentClient) Hello(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*PaymentReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(PaymentReply)
	err := c.cc.Invoke(ctx, Payment_Hello_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *paymentClient) Way(ctx context.Context, in *WayRequest, opts ...grpc.CallOption) (*WayReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(WayReply)
	err := c.cc.Invoke(ctx, Payment_Way_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *paymentClient) Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*PaymentItem, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(PaymentItem)
	err := c.cc.Invoke(ctx, Payment_Get_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *paymentClient) ByOrder(ctx context.Context, in *OrderRequest, opts ...grpc.CallOption) (*PaymentReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(PaymentReply)
	err := c.cc.Invoke(ctx, Payment_ByOrder_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *paymentClient) ByCharge(ctx context.Context, in *ChargeRequest, opts ...grpc.CallOption) (*PaymentReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(PaymentReply)
	err := c.cc.Invoke(ctx, Payment_ByCharge_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *paymentClient) Callback(ctx context.Context, in *CallbackRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(protobuf.StatusReply)
	err := c.cc.Invoke(ctx, Payment_Callback_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// PaymentServer is the server API for Payment service.
// All implementations should embed UnimplementedPaymentServer
// for forward compatibility.
type PaymentServer interface {
	Hello(context.Context, *protobuf.Empty) (*PaymentReply, error)
	// 获取平台支持的支付网关
	Way(context.Context, *WayRequest) (*WayReply, error)
	// 获取支付的详情
	Get(context.Context, *protobuf.IdentRequest) (*PaymentItem, error)
	// 支付-电商订单
	ByOrder(context.Context, *OrderRequest) (*PaymentReply, error)
	// 支付-充值
	ByCharge(context.Context, *ChargeRequest) (*PaymentReply, error)
	// 回调更新支付的结果和状态
	Callback(context.Context, *CallbackRequest) (*protobuf.StatusReply, error)
}

// UnimplementedPaymentServer should 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 UnimplementedPaymentServer struct{}

func (UnimplementedPaymentServer) Hello(context.Context, *protobuf.Empty) (*PaymentReply, error) {
	return nil, status.Error(codes.Unimplemented, "method Hello not implemented")
}
func (UnimplementedPaymentServer) Way(context.Context, *WayRequest) (*WayReply, error) {
	return nil, status.Error(codes.Unimplemented, "method Way not implemented")
}
func (UnimplementedPaymentServer) Get(context.Context, *protobuf.IdentRequest) (*PaymentItem, error) {
	return nil, status.Error(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedPaymentServer) ByOrder(context.Context, *OrderRequest) (*PaymentReply, error) {
	return nil, status.Error(codes.Unimplemented, "method ByOrder not implemented")
}
func (UnimplementedPaymentServer) ByCharge(context.Context, *ChargeRequest) (*PaymentReply, error) {
	return nil, status.Error(codes.Unimplemented, "method ByCharge not implemented")
}
func (UnimplementedPaymentServer) Callback(context.Context, *CallbackRequest) (*protobuf.StatusReply, error) {
	return nil, status.Error(codes.Unimplemented, "method Callback not implemented")
}
func (UnimplementedPaymentServer) testEmbeddedByValue() {}

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

func RegisterPaymentServer(s grpc.ServiceRegistrar, srv PaymentServer) {
	// If the following call panics, it indicates UnimplementedPaymentServer 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(&Payment_ServiceDesc, srv)
}

func _Payment_Hello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(protobuf.Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PaymentServer).Hello(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Payment_Hello_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PaymentServer).Hello(ctx, req.(*protobuf.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _Payment_Way_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(WayRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PaymentServer).Way(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Payment_Way_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PaymentServer).Way(ctx, req.(*WayRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Payment_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(protobuf.IdentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PaymentServer).Get(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Payment_Get_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PaymentServer).Get(ctx, req.(*protobuf.IdentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Payment_ByOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(OrderRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PaymentServer).ByOrder(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Payment_ByOrder_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PaymentServer).ByOrder(ctx, req.(*OrderRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Payment_ByCharge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ChargeRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PaymentServer).ByCharge(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Payment_ByCharge_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PaymentServer).ByCharge(ctx, req.(*ChargeRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Payment_Callback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CallbackRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PaymentServer).Callback(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Payment_Callback_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PaymentServer).Callback(ctx, req.(*CallbackRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// Payment_ServiceDesc is the grpc.ServiceDesc for Payment service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Payment_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "wallet.Payment",
	HandlerType: (*PaymentServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Hello",
			Handler:    _Payment_Hello_Handler,
		},
		{
			MethodName: "Way",
			Handler:    _Payment_Way_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _Payment_Get_Handler,
		},
		{
			MethodName: "ByOrder",
			Handler:    _Payment_ByOrder_Handler,
		},
		{
			MethodName: "ByCharge",
			Handler:    _Payment_ByCharge_Handler,
		},
		{
			MethodName: "Callback",
			Handler:    _Payment_Callback_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "module/finance/wallet/proto/payment.proto",
}
