// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             v6.31.1
// source: loms/v1/loms.proto

package loms

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	emptypb "google.golang.org/protobuf/types/known/emptypb"
)

// 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

// LOMSClient is the client API for LOMS 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 LOMSClient interface {
	OrderCreate(ctx context.Context, in *OrderCreateRequest, opts ...grpc.CallOption) (*OrderCreateResponse, error)
	OrderInfo(ctx context.Context, in *OrderInfoRequest, opts ...grpc.CallOption) (*OrderInfoResponse, error)
	OrderPay(ctx context.Context, in *OrderPayRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	OrderCancel(ctx context.Context, in *OrderCancelRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	StocksInfo(ctx context.Context, in *StocksInfoRequest, opts ...grpc.CallOption) (*StocksInfoResponse, error)
}

type lOMSClient struct {
	cc grpc.ClientConnInterface
}

func NewLOMSClient(cc grpc.ClientConnInterface) LOMSClient {
	return &lOMSClient{cc}
}

func (c *lOMSClient) OrderCreate(ctx context.Context, in *OrderCreateRequest, opts ...grpc.CallOption) (*OrderCreateResponse, error) {
	out := new(OrderCreateResponse)
	err := c.cc.Invoke(ctx, "/LOMS/OrderCreate", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *lOMSClient) OrderInfo(ctx context.Context, in *OrderInfoRequest, opts ...grpc.CallOption) (*OrderInfoResponse, error) {
	out := new(OrderInfoResponse)
	err := c.cc.Invoke(ctx, "/LOMS/OrderInfo", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *lOMSClient) OrderPay(ctx context.Context, in *OrderPayRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, "/LOMS/OrderPay", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *lOMSClient) OrderCancel(ctx context.Context, in *OrderCancelRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, "/LOMS/OrderCancel", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *lOMSClient) StocksInfo(ctx context.Context, in *StocksInfoRequest, opts ...grpc.CallOption) (*StocksInfoResponse, error) {
	out := new(StocksInfoResponse)
	err := c.cc.Invoke(ctx, "/LOMS/StocksInfo", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// LOMSServer is the server API for LOMS service.
// All implementations must embed UnimplementedLOMSServer
// for forward compatibility
type LOMSServer interface {
	OrderCreate(context.Context, *OrderCreateRequest) (*OrderCreateResponse, error)
	OrderInfo(context.Context, *OrderInfoRequest) (*OrderInfoResponse, error)
	OrderPay(context.Context, *OrderPayRequest) (*emptypb.Empty, error)
	OrderCancel(context.Context, *OrderCancelRequest) (*emptypb.Empty, error)
	StocksInfo(context.Context, *StocksInfoRequest) (*StocksInfoResponse, error)
	mustEmbedUnimplementedLOMSServer()
}

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

func (UnimplementedLOMSServer) OrderCreate(context.Context, *OrderCreateRequest) (*OrderCreateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method OrderCreate not implemented")
}
func (UnimplementedLOMSServer) OrderInfo(context.Context, *OrderInfoRequest) (*OrderInfoResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method OrderInfo not implemented")
}
func (UnimplementedLOMSServer) OrderPay(context.Context, *OrderPayRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method OrderPay not implemented")
}
func (UnimplementedLOMSServer) OrderCancel(context.Context, *OrderCancelRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method OrderCancel not implemented")
}
func (UnimplementedLOMSServer) StocksInfo(context.Context, *StocksInfoRequest) (*StocksInfoResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method StocksInfo not implemented")
}
func (UnimplementedLOMSServer) mustEmbedUnimplementedLOMSServer() {}

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

func RegisterLOMSServer(s grpc.ServiceRegistrar, srv LOMSServer) {
	s.RegisterService(&LOMS_ServiceDesc, srv)
}

func _LOMS_OrderCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(OrderCreateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(LOMSServer).OrderCreate(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/LOMS/OrderCreate",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(LOMSServer).OrderCreate(ctx, req.(*OrderCreateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _LOMS_OrderInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(OrderInfoRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(LOMSServer).OrderInfo(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/LOMS/OrderInfo",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(LOMSServer).OrderInfo(ctx, req.(*OrderInfoRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _LOMS_OrderPay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(OrderPayRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(LOMSServer).OrderPay(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/LOMS/OrderPay",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(LOMSServer).OrderPay(ctx, req.(*OrderPayRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _LOMS_OrderCancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(OrderCancelRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(LOMSServer).OrderCancel(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/LOMS/OrderCancel",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(LOMSServer).OrderCancel(ctx, req.(*OrderCancelRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _LOMS_StocksInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(StocksInfoRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(LOMSServer).StocksInfo(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/LOMS/StocksInfo",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(LOMSServer).StocksInfo(ctx, req.(*StocksInfoRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// LOMS_ServiceDesc is the grpc.ServiceDesc for LOMS service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var LOMS_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "LOMS",
	HandlerType: (*LOMSServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "OrderCreate",
			Handler:    _LOMS_OrderCreate_Handler,
		},
		{
			MethodName: "OrderInfo",
			Handler:    _LOMS_OrderInfo_Handler,
		},
		{
			MethodName: "OrderPay",
			Handler:    _LOMS_OrderPay_Handler,
		},
		{
			MethodName: "OrderCancel",
			Handler:    _LOMS_OrderCancel_Handler,
		},
		{
			MethodName: "StocksInfo",
			Handler:    _LOMS_StocksInfo_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "loms/v1/loms.proto",
}
