// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             v3.15.8
// source: polarrpc.proto

package types

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 (
	PolarisRPCService_NodeState_FullMethodName     = "/types.PolarisRPCService/NodeState"
	PolarisRPCService_Metric_FullMethodName        = "/types.PolarisRPCService/Metric"
	PolarisRPCService_CurrentList_FullMethodName   = "/types.PolarisRPCService/CurrentList"
	PolarisRPCService_WhiteList_FullMethodName     = "/types.PolarisRPCService/WhiteList"
	PolarisRPCService_BlackList_FullMethodName     = "/types.PolarisRPCService/BlackList"
	PolarisRPCService_ListBLEntries_FullMethodName = "/types.PolarisRPCService/ListBLEntries"
	PolarisRPCService_AddBLEntry_FullMethodName    = "/types.PolarisRPCService/AddBLEntry"
	PolarisRPCService_RemoveBLEntry_FullMethodName = "/types.PolarisRPCService/RemoveBLEntry"
)

// PolarisRPCServiceClient is the client API for PolarisRPCService 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 PolarisRPCServiceClient interface {
	// Returns the current state of this node
	NodeState(ctx context.Context, in *NodeReq, opts ...grpc.CallOption) (*SingleBytes, error)
	// Returns node metrics according to request
	Metric(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*Metrics, error)
	CurrentList(ctx context.Context, in *Paginations, opts ...grpc.CallOption) (*PolarisPeerList, error)
	WhiteList(ctx context.Context, in *Paginations, opts ...grpc.CallOption) (*PolarisPeerList, error)
	BlackList(ctx context.Context, in *Paginations, opts ...grpc.CallOption) (*PolarisPeerList, error)
	ListBLEntries(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*BLConfEntries, error)
	AddBLEntry(ctx context.Context, in *AddEntryParams, opts ...grpc.CallOption) (*SingleString, error)
	RemoveBLEntry(ctx context.Context, in *RmEntryParams, opts ...grpc.CallOption) (*SingleString, error)
}

type polarisRPCServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewPolarisRPCServiceClient(cc grpc.ClientConnInterface) PolarisRPCServiceClient {
	return &polarisRPCServiceClient{cc}
}

func (c *polarisRPCServiceClient) NodeState(ctx context.Context, in *NodeReq, opts ...grpc.CallOption) (*SingleBytes, error) {
	out := new(SingleBytes)
	err := c.cc.Invoke(ctx, PolarisRPCService_NodeState_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *polarisRPCServiceClient) Metric(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*Metrics, error) {
	out := new(Metrics)
	err := c.cc.Invoke(ctx, PolarisRPCService_Metric_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *polarisRPCServiceClient) CurrentList(ctx context.Context, in *Paginations, opts ...grpc.CallOption) (*PolarisPeerList, error) {
	out := new(PolarisPeerList)
	err := c.cc.Invoke(ctx, PolarisRPCService_CurrentList_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *polarisRPCServiceClient) WhiteList(ctx context.Context, in *Paginations, opts ...grpc.CallOption) (*PolarisPeerList, error) {
	out := new(PolarisPeerList)
	err := c.cc.Invoke(ctx, PolarisRPCService_WhiteList_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *polarisRPCServiceClient) BlackList(ctx context.Context, in *Paginations, opts ...grpc.CallOption) (*PolarisPeerList, error) {
	out := new(PolarisPeerList)
	err := c.cc.Invoke(ctx, PolarisRPCService_BlackList_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *polarisRPCServiceClient) ListBLEntries(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*BLConfEntries, error) {
	out := new(BLConfEntries)
	err := c.cc.Invoke(ctx, PolarisRPCService_ListBLEntries_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *polarisRPCServiceClient) AddBLEntry(ctx context.Context, in *AddEntryParams, opts ...grpc.CallOption) (*SingleString, error) {
	out := new(SingleString)
	err := c.cc.Invoke(ctx, PolarisRPCService_AddBLEntry_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *polarisRPCServiceClient) RemoveBLEntry(ctx context.Context, in *RmEntryParams, opts ...grpc.CallOption) (*SingleString, error) {
	out := new(SingleString)
	err := c.cc.Invoke(ctx, PolarisRPCService_RemoveBLEntry_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// PolarisRPCServiceServer is the server API for PolarisRPCService service.
// All implementations must embed UnimplementedPolarisRPCServiceServer
// for forward compatibility
type PolarisRPCServiceServer interface {
	// Returns the current state of this node
	NodeState(context.Context, *NodeReq) (*SingleBytes, error)
	// Returns node metrics according to request
	Metric(context.Context, *MetricsRequest) (*Metrics, error)
	CurrentList(context.Context, *Paginations) (*PolarisPeerList, error)
	WhiteList(context.Context, *Paginations) (*PolarisPeerList, error)
	BlackList(context.Context, *Paginations) (*PolarisPeerList, error)
	ListBLEntries(context.Context, *Empty) (*BLConfEntries, error)
	AddBLEntry(context.Context, *AddEntryParams) (*SingleString, error)
	RemoveBLEntry(context.Context, *RmEntryParams) (*SingleString, error)
	mustEmbedUnimplementedPolarisRPCServiceServer()
}

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

func (UnimplementedPolarisRPCServiceServer) NodeState(context.Context, *NodeReq) (*SingleBytes, error) {
	return nil, status.Errorf(codes.Unimplemented, "method NodeState not implemented")
}
func (UnimplementedPolarisRPCServiceServer) Metric(context.Context, *MetricsRequest) (*Metrics, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Metric not implemented")
}
func (UnimplementedPolarisRPCServiceServer) CurrentList(context.Context, *Paginations) (*PolarisPeerList, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CurrentList not implemented")
}
func (UnimplementedPolarisRPCServiceServer) WhiteList(context.Context, *Paginations) (*PolarisPeerList, error) {
	return nil, status.Errorf(codes.Unimplemented, "method WhiteList not implemented")
}
func (UnimplementedPolarisRPCServiceServer) BlackList(context.Context, *Paginations) (*PolarisPeerList, error) {
	return nil, status.Errorf(codes.Unimplemented, "method BlackList not implemented")
}
func (UnimplementedPolarisRPCServiceServer) ListBLEntries(context.Context, *Empty) (*BLConfEntries, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListBLEntries not implemented")
}
func (UnimplementedPolarisRPCServiceServer) AddBLEntry(context.Context, *AddEntryParams) (*SingleString, error) {
	return nil, status.Errorf(codes.Unimplemented, "method AddBLEntry not implemented")
}
func (UnimplementedPolarisRPCServiceServer) RemoveBLEntry(context.Context, *RmEntryParams) (*SingleString, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RemoveBLEntry not implemented")
}
func (UnimplementedPolarisRPCServiceServer) mustEmbedUnimplementedPolarisRPCServiceServer() {}

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

func RegisterPolarisRPCServiceServer(s grpc.ServiceRegistrar, srv PolarisRPCServiceServer) {
	s.RegisterService(&PolarisRPCService_ServiceDesc, srv)
}

func _PolarisRPCService_NodeState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(NodeReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PolarisRPCServiceServer).NodeState(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PolarisRPCService_NodeState_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PolarisRPCServiceServer).NodeState(ctx, req.(*NodeReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _PolarisRPCService_Metric_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(MetricsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PolarisRPCServiceServer).Metric(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PolarisRPCService_Metric_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PolarisRPCServiceServer).Metric(ctx, req.(*MetricsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _PolarisRPCService_CurrentList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Paginations)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PolarisRPCServiceServer).CurrentList(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PolarisRPCService_CurrentList_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PolarisRPCServiceServer).CurrentList(ctx, req.(*Paginations))
	}
	return interceptor(ctx, in, info, handler)
}

func _PolarisRPCService_WhiteList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Paginations)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PolarisRPCServiceServer).WhiteList(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PolarisRPCService_WhiteList_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PolarisRPCServiceServer).WhiteList(ctx, req.(*Paginations))
	}
	return interceptor(ctx, in, info, handler)
}

func _PolarisRPCService_BlackList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Paginations)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PolarisRPCServiceServer).BlackList(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PolarisRPCService_BlackList_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PolarisRPCServiceServer).BlackList(ctx, req.(*Paginations))
	}
	return interceptor(ctx, in, info, handler)
}

func _PolarisRPCService_ListBLEntries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PolarisRPCServiceServer).ListBLEntries(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PolarisRPCService_ListBLEntries_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PolarisRPCServiceServer).ListBLEntries(ctx, req.(*Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _PolarisRPCService_AddBLEntry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AddEntryParams)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PolarisRPCServiceServer).AddBLEntry(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PolarisRPCService_AddBLEntry_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PolarisRPCServiceServer).AddBLEntry(ctx, req.(*AddEntryParams))
	}
	return interceptor(ctx, in, info, handler)
}

func _PolarisRPCService_RemoveBLEntry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RmEntryParams)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PolarisRPCServiceServer).RemoveBLEntry(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PolarisRPCService_RemoveBLEntry_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PolarisRPCServiceServer).RemoveBLEntry(ctx, req.(*RmEntryParams))
	}
	return interceptor(ctx, in, info, handler)
}

// PolarisRPCService_ServiceDesc is the grpc.ServiceDesc for PolarisRPCService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PolarisRPCService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "types.PolarisRPCService",
	HandlerType: (*PolarisRPCServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "NodeState",
			Handler:    _PolarisRPCService_NodeState_Handler,
		},
		{
			MethodName: "Metric",
			Handler:    _PolarisRPCService_Metric_Handler,
		},
		{
			MethodName: "CurrentList",
			Handler:    _PolarisRPCService_CurrentList_Handler,
		},
		{
			MethodName: "WhiteList",
			Handler:    _PolarisRPCService_WhiteList_Handler,
		},
		{
			MethodName: "BlackList",
			Handler:    _PolarisRPCService_BlackList_Handler,
		},
		{
			MethodName: "ListBLEntries",
			Handler:    _PolarisRPCService_ListBLEntries_Handler,
		},
		{
			MethodName: "AddBLEntry",
			Handler:    _PolarisRPCService_AddBLEntry_Handler,
		},
		{
			MethodName: "RemoveBLEntry",
			Handler:    _PolarisRPCService_RemoveBLEntry_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "polarrpc.proto",
}
