// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             (unknown)
// source: gosdn/topology/routingTable.proto

package topology

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 (
	RoutingTableService_AddRoutingTable_FullMethodName = "/gosdn.topology.RoutingTableService/AddRoutingTable"
	RoutingTableService_GetRoutes_FullMethodName       = "/gosdn.topology.RoutingTableService/GetRoutes"
	RoutingTableService_DeleteRoute_FullMethodName     = "/gosdn.topology.RoutingTableService/DeleteRoute"
)

// RoutingTableServiceClient is the client API for RoutingTableService 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 RoutingTableServiceClient interface {
	AddRoutingTable(ctx context.Context, in *AddRoutingTableRequest, opts ...grpc.CallOption) (*AddRoutingTableResponse, error)
	GetRoutes(ctx context.Context, in *GetRoutesRequest, opts ...grpc.CallOption) (*GetRoutesResponse, error)
	DeleteRoute(ctx context.Context, in *DeleteRoutesRequest, opts ...grpc.CallOption) (*DeleteRoutesResponse, error)
}

type routingTableServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewRoutingTableServiceClient(cc grpc.ClientConnInterface) RoutingTableServiceClient {
	return &routingTableServiceClient{cc}
}

func (c *routingTableServiceClient) AddRoutingTable(ctx context.Context, in *AddRoutingTableRequest, opts ...grpc.CallOption) (*AddRoutingTableResponse, error) {
	out := new(AddRoutingTableResponse)
	err := c.cc.Invoke(ctx, RoutingTableService_AddRoutingTable_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *routingTableServiceClient) GetRoutes(ctx context.Context, in *GetRoutesRequest, opts ...grpc.CallOption) (*GetRoutesResponse, error) {
	out := new(GetRoutesResponse)
	err := c.cc.Invoke(ctx, RoutingTableService_GetRoutes_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *routingTableServiceClient) DeleteRoute(ctx context.Context, in *DeleteRoutesRequest, opts ...grpc.CallOption) (*DeleteRoutesResponse, error) {
	out := new(DeleteRoutesResponse)
	err := c.cc.Invoke(ctx, RoutingTableService_DeleteRoute_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// RoutingTableServiceServer is the server API for RoutingTableService service.
// All implementations must embed UnimplementedRoutingTableServiceServer
// for forward compatibility
type RoutingTableServiceServer interface {
	AddRoutingTable(context.Context, *AddRoutingTableRequest) (*AddRoutingTableResponse, error)
	GetRoutes(context.Context, *GetRoutesRequest) (*GetRoutesResponse, error)
	DeleteRoute(context.Context, *DeleteRoutesRequest) (*DeleteRoutesResponse, error)
	mustEmbedUnimplementedRoutingTableServiceServer()
}

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

func (UnimplementedRoutingTableServiceServer) AddRoutingTable(context.Context, *AddRoutingTableRequest) (*AddRoutingTableResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method AddRoutingTable not implemented")
}
func (UnimplementedRoutingTableServiceServer) GetRoutes(context.Context, *GetRoutesRequest) (*GetRoutesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetRoutes not implemented")
}
func (UnimplementedRoutingTableServiceServer) DeleteRoute(context.Context, *DeleteRoutesRequest) (*DeleteRoutesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteRoute not implemented")
}
func (UnimplementedRoutingTableServiceServer) mustEmbedUnimplementedRoutingTableServiceServer() {}

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

func RegisterRoutingTableServiceServer(s grpc.ServiceRegistrar, srv RoutingTableServiceServer) {
	s.RegisterService(&RoutingTableService_ServiceDesc, srv)
}

func _RoutingTableService_AddRoutingTable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AddRoutingTableRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RoutingTableServiceServer).AddRoutingTable(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RoutingTableService_AddRoutingTable_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RoutingTableServiceServer).AddRoutingTable(ctx, req.(*AddRoutingTableRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RoutingTableService_GetRoutes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetRoutesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RoutingTableServiceServer).GetRoutes(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RoutingTableService_GetRoutes_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RoutingTableServiceServer).GetRoutes(ctx, req.(*GetRoutesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RoutingTableService_DeleteRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteRoutesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RoutingTableServiceServer).DeleteRoute(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RoutingTableService_DeleteRoute_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RoutingTableServiceServer).DeleteRoute(ctx, req.(*DeleteRoutesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// RoutingTableService_ServiceDesc is the grpc.ServiceDesc for RoutingTableService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var RoutingTableService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gosdn.topology.RoutingTableService",
	HandlerType: (*RoutingTableServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddRoutingTable",
			Handler:    _RoutingTableService_AddRoutingTable_Handler,
		},
		{
			MethodName: "GetRoutes",
			Handler:    _RoutingTableService_GetRoutes_Handler,
		},
		{
			MethodName: "DeleteRoute",
			Handler:    _RoutingTableService_DeleteRoute_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "gosdn/topology/routingTable.proto",
}
