// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             v5.27.1
// source: refund.proto

package api

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

// RefundServiceClient is the client API for RefundService 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 RefundServiceClient interface {
	RefundCreate(ctx context.Context, in *RefundCreateRequest, opts ...grpc.CallOption) (*RefundCreateResponse, error)
	RefundQuery(ctx context.Context, in *RefundQueryRequest, opts ...grpc.CallOption) (*RefundQueryResponse, error)
	RefundUpdate(ctx context.Context, in *RefundUpdateRequest, opts ...grpc.CallOption) (*RefundUpdateResponse, error)
}

type refundServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewRefundServiceClient(cc grpc.ClientConnInterface) RefundServiceClient {
	return &refundServiceClient{cc}
}

func (c *refundServiceClient) RefundCreate(ctx context.Context, in *RefundCreateRequest, opts ...grpc.CallOption) (*RefundCreateResponse, error) {
	out := new(RefundCreateResponse)
	err := c.cc.Invoke(ctx, "/api.RefundService/RefundCreate", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *refundServiceClient) RefundQuery(ctx context.Context, in *RefundQueryRequest, opts ...grpc.CallOption) (*RefundQueryResponse, error) {
	out := new(RefundQueryResponse)
	err := c.cc.Invoke(ctx, "/api.RefundService/RefundQuery", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *refundServiceClient) RefundUpdate(ctx context.Context, in *RefundUpdateRequest, opts ...grpc.CallOption) (*RefundUpdateResponse, error) {
	out := new(RefundUpdateResponse)
	err := c.cc.Invoke(ctx, "/api.RefundService/RefundUpdate", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// RefundServiceServer is the server API for RefundService service.
// All implementations should embed UnimplementedRefundServiceServer
// for forward compatibility
type RefundServiceServer interface {
	RefundCreate(context.Context, *RefundCreateRequest) (*RefundCreateResponse, error)
	RefundQuery(context.Context, *RefundQueryRequest) (*RefundQueryResponse, error)
	RefundUpdate(context.Context, *RefundUpdateRequest) (*RefundUpdateResponse, error)
}

// UnimplementedRefundServiceServer should be embedded to have forward compatible implementations.
type UnimplementedRefundServiceServer struct {
}

func (UnimplementedRefundServiceServer) RefundCreate(context.Context, *RefundCreateRequest) (*RefundCreateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RefundCreate not implemented")
}
func (UnimplementedRefundServiceServer) RefundQuery(context.Context, *RefundQueryRequest) (*RefundQueryResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RefundQuery not implemented")
}
func (UnimplementedRefundServiceServer) RefundUpdate(context.Context, *RefundUpdateRequest) (*RefundUpdateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RefundUpdate not implemented")
}

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

func RegisterRefundServiceServer(s grpc.ServiceRegistrar, srv RefundServiceServer) {
	s.RegisterService(&RefundService_ServiceDesc, srv)
}

func _RefundService_RefundCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RefundCreateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RefundServiceServer).RefundCreate(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/api.RefundService/RefundCreate",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RefundServiceServer).RefundCreate(ctx, req.(*RefundCreateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RefundService_RefundQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RefundQueryRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RefundServiceServer).RefundQuery(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/api.RefundService/RefundQuery",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RefundServiceServer).RefundQuery(ctx, req.(*RefundQueryRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RefundService_RefundUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RefundUpdateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RefundServiceServer).RefundUpdate(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/api.RefundService/RefundUpdate",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RefundServiceServer).RefundUpdate(ctx, req.(*RefundUpdateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// RefundService_ServiceDesc is the grpc.ServiceDesc for RefundService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var RefundService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.RefundService",
	HandlerType: (*RefundServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "RefundCreate",
			Handler:    _RefundService_RefundCreate_Handler,
		},
		{
			MethodName: "RefundQuery",
			Handler:    _RefundService_RefundQuery_Handler,
		},
		{
			MethodName: "RefundUpdate",
			Handler:    _RefundService_RefundUpdate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "refund.proto",
}
