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

package pb

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

// MdmServiceClient is the client API for MdmService 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 MdmServiceClient interface {
	GetCountryByID(ctx context.Context, in *GetCountryByIDRequest, opts ...grpc.CallOption) (*GetCountryResponse, error)
	GetCountryByCode(ctx context.Context, in *GetCountryByCodeRequest, opts ...grpc.CallOption) (*GetCountryResponse, error)
}

type mdmServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewMdmServiceClient(cc grpc.ClientConnInterface) MdmServiceClient {
	return &mdmServiceClient{cc}
}

func (c *mdmServiceClient) GetCountryByID(ctx context.Context, in *GetCountryByIDRequest, opts ...grpc.CallOption) (*GetCountryResponse, error) {
	out := new(GetCountryResponse)
	err := c.cc.Invoke(ctx, "/mdmpb.mdmService/GetCountryByID", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *mdmServiceClient) GetCountryByCode(ctx context.Context, in *GetCountryByCodeRequest, opts ...grpc.CallOption) (*GetCountryResponse, error) {
	out := new(GetCountryResponse)
	err := c.cc.Invoke(ctx, "/mdmpb.mdmService/GetCountryByCode", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// MdmServiceServer is the server API for MdmService service.
// All implementations must embed UnimplementedMdmServiceServer
// for forward compatibility
type MdmServiceServer interface {
	GetCountryByID(context.Context, *GetCountryByIDRequest) (*GetCountryResponse, error)
	GetCountryByCode(context.Context, *GetCountryByCodeRequest) (*GetCountryResponse, error)
	mustEmbedUnimplementedMdmServiceServer()
}

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

func (UnimplementedMdmServiceServer) GetCountryByID(context.Context, *GetCountryByIDRequest) (*GetCountryResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetCountryByID not implemented")
}
func (UnimplementedMdmServiceServer) GetCountryByCode(context.Context, *GetCountryByCodeRequest) (*GetCountryResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetCountryByCode not implemented")
}
func (UnimplementedMdmServiceServer) mustEmbedUnimplementedMdmServiceServer() {}

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

func RegisterMdmServiceServer(s grpc.ServiceRegistrar, srv MdmServiceServer) {
	s.RegisterService(&MdmService_ServiceDesc, srv)
}

func _MdmService_GetCountryByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetCountryByIDRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MdmServiceServer).GetCountryByID(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/mdmpb.mdmService/GetCountryByID",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MdmServiceServer).GetCountryByID(ctx, req.(*GetCountryByIDRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _MdmService_GetCountryByCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetCountryByCodeRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MdmServiceServer).GetCountryByCode(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/mdmpb.mdmService/GetCountryByCode",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MdmServiceServer).GetCountryByCode(ctx, req.(*GetCountryByCodeRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// MdmService_ServiceDesc is the grpc.ServiceDesc for MdmService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var MdmService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "mdmpb.mdmService",
	HandlerType: (*MdmServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetCountryByID",
			Handler:    _MdmService_GetCountryByID_Handler,
		},
		{
			MethodName: "GetCountryByCode",
			Handler:    _MdmService_GetCountryByCode_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "mdm.proto",
}
