// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             (unknown)
// source: gosdn/topology/topology.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 (
	TopologyService_AddLink_FullMethodName     = "/gosdn.topology.TopologyService/AddLink"
	TopologyService_GetTopology_FullMethodName = "/gosdn.topology.TopologyService/GetTopology"
	TopologyService_UpdateLink_FullMethodName  = "/gosdn.topology.TopologyService/UpdateLink"
	TopologyService_DeleteLink_FullMethodName  = "/gosdn.topology.TopologyService/DeleteLink"
)

// TopologyServiceClient is the client API for TopologyService 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 TopologyServiceClient interface {
	AddLink(ctx context.Context, in *AddLinkRequest, opts ...grpc.CallOption) (*AddLinkResponse, error)
	GetTopology(ctx context.Context, in *GetTopologyRequest, opts ...grpc.CallOption) (*GetTopologyResponse, error)
	UpdateLink(ctx context.Context, in *UpdateLinkRequest, opts ...grpc.CallOption) (*UpdateLinkResponse, error)
	DeleteLink(ctx context.Context, in *DeleteLinkRequest, opts ...grpc.CallOption) (*DeleteLinkResponse, error)
}

type topologyServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewTopologyServiceClient(cc grpc.ClientConnInterface) TopologyServiceClient {
	return &topologyServiceClient{cc}
}

func (c *topologyServiceClient) AddLink(ctx context.Context, in *AddLinkRequest, opts ...grpc.CallOption) (*AddLinkResponse, error) {
	out := new(AddLinkResponse)
	err := c.cc.Invoke(ctx, TopologyService_AddLink_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *topologyServiceClient) GetTopology(ctx context.Context, in *GetTopologyRequest, opts ...grpc.CallOption) (*GetTopologyResponse, error) {
	out := new(GetTopologyResponse)
	err := c.cc.Invoke(ctx, TopologyService_GetTopology_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *topologyServiceClient) UpdateLink(ctx context.Context, in *UpdateLinkRequest, opts ...grpc.CallOption) (*UpdateLinkResponse, error) {
	out := new(UpdateLinkResponse)
	err := c.cc.Invoke(ctx, TopologyService_UpdateLink_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *topologyServiceClient) DeleteLink(ctx context.Context, in *DeleteLinkRequest, opts ...grpc.CallOption) (*DeleteLinkResponse, error) {
	out := new(DeleteLinkResponse)
	err := c.cc.Invoke(ctx, TopologyService_DeleteLink_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// TopologyServiceServer is the server API for TopologyService service.
// All implementations must embed UnimplementedTopologyServiceServer
// for forward compatibility
type TopologyServiceServer interface {
	AddLink(context.Context, *AddLinkRequest) (*AddLinkResponse, error)
	GetTopology(context.Context, *GetTopologyRequest) (*GetTopologyResponse, error)
	UpdateLink(context.Context, *UpdateLinkRequest) (*UpdateLinkResponse, error)
	DeleteLink(context.Context, *DeleteLinkRequest) (*DeleteLinkResponse, error)
	mustEmbedUnimplementedTopologyServiceServer()
}

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

func (UnimplementedTopologyServiceServer) AddLink(context.Context, *AddLinkRequest) (*AddLinkResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method AddLink not implemented")
}
func (UnimplementedTopologyServiceServer) GetTopology(context.Context, *GetTopologyRequest) (*GetTopologyResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetTopology not implemented")
}
func (UnimplementedTopologyServiceServer) UpdateLink(context.Context, *UpdateLinkRequest) (*UpdateLinkResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateLink not implemented")
}
func (UnimplementedTopologyServiceServer) DeleteLink(context.Context, *DeleteLinkRequest) (*DeleteLinkResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteLink not implemented")
}
func (UnimplementedTopologyServiceServer) mustEmbedUnimplementedTopologyServiceServer() {}

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

func RegisterTopologyServiceServer(s grpc.ServiceRegistrar, srv TopologyServiceServer) {
	s.RegisterService(&TopologyService_ServiceDesc, srv)
}

func _TopologyService_AddLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AddLinkRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TopologyServiceServer).AddLink(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: TopologyService_AddLink_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TopologyServiceServer).AddLink(ctx, req.(*AddLinkRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TopologyService_GetTopology_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetTopologyRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TopologyServiceServer).GetTopology(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: TopologyService_GetTopology_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TopologyServiceServer).GetTopology(ctx, req.(*GetTopologyRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TopologyService_UpdateLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateLinkRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TopologyServiceServer).UpdateLink(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: TopologyService_UpdateLink_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TopologyServiceServer).UpdateLink(ctx, req.(*UpdateLinkRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TopologyService_DeleteLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteLinkRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TopologyServiceServer).DeleteLink(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: TopologyService_DeleteLink_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TopologyServiceServer).DeleteLink(ctx, req.(*DeleteLinkRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// TopologyService_ServiceDesc is the grpc.ServiceDesc for TopologyService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var TopologyService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gosdn.topology.TopologyService",
	HandlerType: (*TopologyServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddLink",
			Handler:    _TopologyService_AddLink_Handler,
		},
		{
			MethodName: "GetTopology",
			Handler:    _TopologyService_GetTopology_Handler,
		},
		{
			MethodName: "UpdateLink",
			Handler:    _TopologyService_UpdateLink_Handler,
		},
		{
			MethodName: "DeleteLink",
			Handler:    _TopologyService_DeleteLink_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "gosdn/topology/topology.proto",
}
