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

package core

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 (
	ConfigurationManagementService_ExportSDNConfig_FullMethodName = "/gosdn.configurationmanagement.ConfigurationManagementService/ExportSDNConfig"
	ConfigurationManagementService_ImportSDNConfig_FullMethodName = "/gosdn.configurationmanagement.ConfigurationManagementService/ImportSDNConfig"
)

// ConfigurationManagementServiceClient is the client API for ConfigurationManagementService 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 ConfigurationManagementServiceClient interface {
	// Allows for export of the whole SDN configuration
	ExportSDNConfig(ctx context.Context, in *ExportSDNConfigRequest, opts ...grpc.CallOption) (*ExportSDNConfigResponse, error)
	// Allows for import of the whole SDN configuration
	ImportSDNConfig(ctx context.Context, in *ImportSDNConfigRequest, opts ...grpc.CallOption) (*ImportSDNConfigResponse, error)
}

type configurationManagementServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewConfigurationManagementServiceClient(cc grpc.ClientConnInterface) ConfigurationManagementServiceClient {
	return &configurationManagementServiceClient{cc}
}

func (c *configurationManagementServiceClient) ExportSDNConfig(ctx context.Context, in *ExportSDNConfigRequest, opts ...grpc.CallOption) (*ExportSDNConfigResponse, error) {
	out := new(ExportSDNConfigResponse)
	err := c.cc.Invoke(ctx, ConfigurationManagementService_ExportSDNConfig_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *configurationManagementServiceClient) ImportSDNConfig(ctx context.Context, in *ImportSDNConfigRequest, opts ...grpc.CallOption) (*ImportSDNConfigResponse, error) {
	out := new(ImportSDNConfigResponse)
	err := c.cc.Invoke(ctx, ConfigurationManagementService_ImportSDNConfig_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ConfigurationManagementServiceServer is the server API for ConfigurationManagementService service.
// All implementations must embed UnimplementedConfigurationManagementServiceServer
// for forward compatibility
type ConfigurationManagementServiceServer interface {
	// Allows for export of the whole SDN configuration
	ExportSDNConfig(context.Context, *ExportSDNConfigRequest) (*ExportSDNConfigResponse, error)
	// Allows for import of the whole SDN configuration
	ImportSDNConfig(context.Context, *ImportSDNConfigRequest) (*ImportSDNConfigResponse, error)
	mustEmbedUnimplementedConfigurationManagementServiceServer()
}

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

func (UnimplementedConfigurationManagementServiceServer) ExportSDNConfig(context.Context, *ExportSDNConfigRequest) (*ExportSDNConfigResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ExportSDNConfig not implemented")
}
func (UnimplementedConfigurationManagementServiceServer) ImportSDNConfig(context.Context, *ImportSDNConfigRequest) (*ImportSDNConfigResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ImportSDNConfig not implemented")
}
func (UnimplementedConfigurationManagementServiceServer) mustEmbedUnimplementedConfigurationManagementServiceServer() {
}

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

func RegisterConfigurationManagementServiceServer(s grpc.ServiceRegistrar, srv ConfigurationManagementServiceServer) {
	s.RegisterService(&ConfigurationManagementService_ServiceDesc, srv)
}

func _ConfigurationManagementService_ExportSDNConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ExportSDNConfigRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ConfigurationManagementServiceServer).ExportSDNConfig(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ConfigurationManagementService_ExportSDNConfig_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ConfigurationManagementServiceServer).ExportSDNConfig(ctx, req.(*ExportSDNConfigRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ConfigurationManagementService_ImportSDNConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ImportSDNConfigRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ConfigurationManagementServiceServer).ImportSDNConfig(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ConfigurationManagementService_ImportSDNConfig_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ConfigurationManagementServiceServer).ImportSDNConfig(ctx, req.(*ImportSDNConfigRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// ConfigurationManagementService_ServiceDesc is the grpc.ServiceDesc for ConfigurationManagementService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ConfigurationManagementService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gosdn.configurationmanagement.ConfigurationManagementService",
	HandlerType: (*ConfigurationManagementServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ExportSDNConfig",
			Handler:    _ConfigurationManagementService_ExportSDNConfig_Handler,
		},
		{
			MethodName: "ImportSDNConfig",
			Handler:    _ConfigurationManagementService_ImportSDNConfig_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "gosdn/configurationmanagement/configurationmanagement.proto",
}
