// Code generated by protoc-gen-go-grpc. DO NOT EDIT.

package agent

import (
	context "context"
	common "github.com/alibaba/ilogtail/plugins/input/skywalkingv2/skywalking/apm/network/common"
	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

// RegisterClient is the client API for Register 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 RegisterClient interface {
	DoServiceRegister(ctx context.Context, in *Services, opts ...grpc.CallOption) (*ServiceRegisterMapping, error)
	DoServiceInstanceRegister(ctx context.Context, in *ServiceInstances, opts ...grpc.CallOption) (*ServiceInstanceRegisterMapping, error)
	DoEndpointRegister(ctx context.Context, in *Endpoints, opts ...grpc.CallOption) (*EndpointMapping, error)
	DoNetworkAddressRegister(ctx context.Context, in *NetAddresses, opts ...grpc.CallOption) (*NetAddressMapping, error)
	DoServiceAndNetworkAddressMappingRegister(ctx context.Context, in *ServiceAndNetworkAddressMappings, opts ...grpc.CallOption) (*common.Commands, error)
}

type registerClient struct {
	cc grpc.ClientConnInterface
}

func NewRegisterClient(cc grpc.ClientConnInterface) RegisterClient {
	return &registerClient{cc}
}

func (c *registerClient) DoServiceRegister(ctx context.Context, in *Services, opts ...grpc.CallOption) (*ServiceRegisterMapping, error) {
	out := new(ServiceRegisterMapping)
	err := c.cc.Invoke(ctx, "/Register/doServiceRegister", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *registerClient) DoServiceInstanceRegister(ctx context.Context, in *ServiceInstances, opts ...grpc.CallOption) (*ServiceInstanceRegisterMapping, error) {
	out := new(ServiceInstanceRegisterMapping)
	err := c.cc.Invoke(ctx, "/Register/doServiceInstanceRegister", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *registerClient) DoEndpointRegister(ctx context.Context, in *Endpoints, opts ...grpc.CallOption) (*EndpointMapping, error) {
	out := new(EndpointMapping)
	err := c.cc.Invoke(ctx, "/Register/doEndpointRegister", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *registerClient) DoNetworkAddressRegister(ctx context.Context, in *NetAddresses, opts ...grpc.CallOption) (*NetAddressMapping, error) {
	out := new(NetAddressMapping)
	err := c.cc.Invoke(ctx, "/Register/doNetworkAddressRegister", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *registerClient) DoServiceAndNetworkAddressMappingRegister(ctx context.Context, in *ServiceAndNetworkAddressMappings, opts ...grpc.CallOption) (*common.Commands, error) {
	out := new(common.Commands)
	err := c.cc.Invoke(ctx, "/Register/doServiceAndNetworkAddressMappingRegister", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// RegisterServer is the server API for Register service.
// All implementations should embed UnimplementedRegisterServer
// for forward compatibility
type RegisterServer interface {
	DoServiceRegister(context.Context, *Services) (*ServiceRegisterMapping, error)
	DoServiceInstanceRegister(context.Context, *ServiceInstances) (*ServiceInstanceRegisterMapping, error)
	DoEndpointRegister(context.Context, *Endpoints) (*EndpointMapping, error)
	DoNetworkAddressRegister(context.Context, *NetAddresses) (*NetAddressMapping, error)
	DoServiceAndNetworkAddressMappingRegister(context.Context, *ServiceAndNetworkAddressMappings) (*common.Commands, error)
}

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

func (UnimplementedRegisterServer) DoServiceRegister(context.Context, *Services) (*ServiceRegisterMapping, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DoServiceRegister not implemented")
}
func (UnimplementedRegisterServer) DoServiceInstanceRegister(context.Context, *ServiceInstances) (*ServiceInstanceRegisterMapping, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DoServiceInstanceRegister not implemented")
}
func (UnimplementedRegisterServer) DoEndpointRegister(context.Context, *Endpoints) (*EndpointMapping, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DoEndpointRegister not implemented")
}
func (UnimplementedRegisterServer) DoNetworkAddressRegister(context.Context, *NetAddresses) (*NetAddressMapping, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DoNetworkAddressRegister not implemented")
}
func (UnimplementedRegisterServer) DoServiceAndNetworkAddressMappingRegister(context.Context, *ServiceAndNetworkAddressMappings) (*common.Commands, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DoServiceAndNetworkAddressMappingRegister not implemented")
}

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

func RegisterRegisterServer(s grpc.ServiceRegistrar, srv RegisterServer) {
	s.RegisterService(&Register_ServiceDesc, srv)
}

func _Register_DoServiceRegister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Services)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RegisterServer).DoServiceRegister(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/Register/doServiceRegister",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RegisterServer).DoServiceRegister(ctx, req.(*Services))
	}
	return interceptor(ctx, in, info, handler)
}

func _Register_DoServiceInstanceRegister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ServiceInstances)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RegisterServer).DoServiceInstanceRegister(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/Register/doServiceInstanceRegister",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RegisterServer).DoServiceInstanceRegister(ctx, req.(*ServiceInstances))
	}
	return interceptor(ctx, in, info, handler)
}

func _Register_DoEndpointRegister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Endpoints)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RegisterServer).DoEndpointRegister(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/Register/doEndpointRegister",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RegisterServer).DoEndpointRegister(ctx, req.(*Endpoints))
	}
	return interceptor(ctx, in, info, handler)
}

func _Register_DoNetworkAddressRegister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(NetAddresses)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RegisterServer).DoNetworkAddressRegister(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/Register/doNetworkAddressRegister",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RegisterServer).DoNetworkAddressRegister(ctx, req.(*NetAddresses))
	}
	return interceptor(ctx, in, info, handler)
}

func _Register_DoServiceAndNetworkAddressMappingRegister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ServiceAndNetworkAddressMappings)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RegisterServer).DoServiceAndNetworkAddressMappingRegister(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/Register/doServiceAndNetworkAddressMappingRegister",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RegisterServer).DoServiceAndNetworkAddressMappingRegister(ctx, req.(*ServiceAndNetworkAddressMappings))
	}
	return interceptor(ctx, in, info, handler)
}

// Register_ServiceDesc is the grpc.ServiceDesc for Register service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Register_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Register",
	HandlerType: (*RegisterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "doServiceRegister",
			Handler:    _Register_DoServiceRegister_Handler,
		},
		{
			MethodName: "doServiceInstanceRegister",
			Handler:    _Register_DoServiceInstanceRegister_Handler,
		},
		{
			MethodName: "doEndpointRegister",
			Handler:    _Register_DoEndpointRegister_Handler,
		},
		{
			MethodName: "doNetworkAddressRegister",
			Handler:    _Register_DoNetworkAddressRegister_Handler,
		},
		{
			MethodName: "doServiceAndNetworkAddressMappingRegister",
			Handler:    _Register_DoServiceAndNetworkAddressMappingRegister_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "register/Register.proto",
}
