// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             v5.26.1
// source: api/orders_management_system/service.proto

package orders_management_system

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

const (
	OrdersManagementSystemService_CreateOrder_FullMethodName = "/github.com.moguchev.microservices.orders_management_system.OrdersManagementSystemService/CreateOrder"
)

// OrdersManagementSystemServiceClient is the client API for OrdersManagementSystemService 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 OrdersManagementSystemServiceClient interface {
	// CreateOrder - метод создания заказа
	CreateOrder(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*CreateOrderResponse, error)
}

type ordersManagementSystemServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewOrdersManagementSystemServiceClient(cc grpc.ClientConnInterface) OrdersManagementSystemServiceClient {
	return &ordersManagementSystemServiceClient{cc}
}

func (c *ordersManagementSystemServiceClient) CreateOrder(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*CreateOrderResponse, error) {
	out := new(CreateOrderResponse)
	err := c.cc.Invoke(ctx, OrdersManagementSystemService_CreateOrder_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// OrdersManagementSystemServiceServer is the server API for OrdersManagementSystemService service.
// All implementations must embed UnimplementedOrdersManagementSystemServiceServer
// for forward compatibility
type OrdersManagementSystemServiceServer interface {
	// CreateOrder - метод создания заказа
	CreateOrder(context.Context, *CreateOrderRequest) (*CreateOrderResponse, error)
	mustEmbedUnimplementedOrdersManagementSystemServiceServer()
}

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

func (UnimplementedOrdersManagementSystemServiceServer) CreateOrder(context.Context, *CreateOrderRequest) (*CreateOrderResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateOrder not implemented")
}
func (UnimplementedOrdersManagementSystemServiceServer) mustEmbedUnimplementedOrdersManagementSystemServiceServer() {
}

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

func RegisterOrdersManagementSystemServiceServer(s grpc.ServiceRegistrar, srv OrdersManagementSystemServiceServer) {
	s.RegisterService(&OrdersManagementSystemService_ServiceDesc, srv)
}

func _OrdersManagementSystemService_CreateOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateOrderRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OrdersManagementSystemServiceServer).CreateOrder(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: OrdersManagementSystemService_CreateOrder_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OrdersManagementSystemServiceServer).CreateOrder(ctx, req.(*CreateOrderRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// OrdersManagementSystemService_ServiceDesc is the grpc.ServiceDesc for OrdersManagementSystemService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var OrdersManagementSystemService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "github.com.moguchev.microservices.orders_management_system.OrdersManagementSystemService",
	HandlerType: (*OrdersManagementSystemServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateOrder",
			Handler:    _OrdersManagementSystemService_CreateOrder_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/orders_management_system/service.proto",
}
