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

package mlbctl

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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8

const (
	Control_GetHello_FullMethodName        = "/mlbctl.Control/getHello"
	Control_CreateForwarder_FullMethodName = "/mlbctl.Control/createForwarder"
	Control_ListForwarders_FullMethodName  = "/mlbctl.Control/listForwarders"
	Control_DeleteForwarder_FullMethodName = "/mlbctl.Control/deleteForwarder"
)

// ControlClient is the client API for Control 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 ControlClient interface {
	GetHello(ctx context.Context, in *GetHelloParams, opts ...grpc.CallOption) (*GetHelloResult, error)
	CreateForwarder(ctx context.Context, in *CreateForwarderParams, opts ...grpc.CallOption) (*CreateForwarderResult, error)
	ListForwarders(ctx context.Context, in *ListForwardersParams, opts ...grpc.CallOption) (*ListForwardersResult, error)
	DeleteForwarder(ctx context.Context, in *DeleteForwarderParams, opts ...grpc.CallOption) (*DeleteForwarderResult, error)
}

type controlClient struct {
	cc grpc.ClientConnInterface
}

func NewControlClient(cc grpc.ClientConnInterface) ControlClient {
	return &controlClient{cc}
}

func (c *controlClient) GetHello(ctx context.Context, in *GetHelloParams, opts ...grpc.CallOption) (*GetHelloResult, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetHelloResult)
	err := c.cc.Invoke(ctx, Control_GetHello_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *controlClient) CreateForwarder(ctx context.Context, in *CreateForwarderParams, opts ...grpc.CallOption) (*CreateForwarderResult, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CreateForwarderResult)
	err := c.cc.Invoke(ctx, Control_CreateForwarder_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *controlClient) ListForwarders(ctx context.Context, in *ListForwardersParams, opts ...grpc.CallOption) (*ListForwardersResult, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListForwardersResult)
	err := c.cc.Invoke(ctx, Control_ListForwarders_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *controlClient) DeleteForwarder(ctx context.Context, in *DeleteForwarderParams, opts ...grpc.CallOption) (*DeleteForwarderResult, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DeleteForwarderResult)
	err := c.cc.Invoke(ctx, Control_DeleteForwarder_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ControlServer is the server API for Control service.
// All implementations must embed UnimplementedControlServer
// for forward compatibility
type ControlServer interface {
	GetHello(context.Context, *GetHelloParams) (*GetHelloResult, error)
	CreateForwarder(context.Context, *CreateForwarderParams) (*CreateForwarderResult, error)
	ListForwarders(context.Context, *ListForwardersParams) (*ListForwardersResult, error)
	DeleteForwarder(context.Context, *DeleteForwarderParams) (*DeleteForwarderResult, error)
	mustEmbedUnimplementedControlServer()
}

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

func (UnimplementedControlServer) GetHello(context.Context, *GetHelloParams) (*GetHelloResult, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetHello not implemented")
}
func (UnimplementedControlServer) CreateForwarder(context.Context, *CreateForwarderParams) (*CreateForwarderResult, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateForwarder not implemented")
}
func (UnimplementedControlServer) ListForwarders(context.Context, *ListForwardersParams) (*ListForwardersResult, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListForwarders not implemented")
}
func (UnimplementedControlServer) DeleteForwarder(context.Context, *DeleteForwarderParams) (*DeleteForwarderResult, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteForwarder not implemented")
}
func (UnimplementedControlServer) mustEmbedUnimplementedControlServer() {}

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

func RegisterControlServer(s grpc.ServiceRegistrar, srv ControlServer) {
	s.RegisterService(&Control_ServiceDesc, srv)
}

func _Control_GetHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetHelloParams)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ControlServer).GetHello(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Control_GetHello_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ControlServer).GetHello(ctx, req.(*GetHelloParams))
	}
	return interceptor(ctx, in, info, handler)
}

func _Control_CreateForwarder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateForwarderParams)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ControlServer).CreateForwarder(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Control_CreateForwarder_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ControlServer).CreateForwarder(ctx, req.(*CreateForwarderParams))
	}
	return interceptor(ctx, in, info, handler)
}

func _Control_ListForwarders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListForwardersParams)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ControlServer).ListForwarders(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Control_ListForwarders_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ControlServer).ListForwarders(ctx, req.(*ListForwardersParams))
	}
	return interceptor(ctx, in, info, handler)
}

func _Control_DeleteForwarder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteForwarderParams)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ControlServer).DeleteForwarder(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Control_DeleteForwarder_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ControlServer).DeleteForwarder(ctx, req.(*DeleteForwarderParams))
	}
	return interceptor(ctx, in, info, handler)
}

// Control_ServiceDesc is the grpc.ServiceDesc for Control service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Control_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "mlbctl.Control",
	HandlerType: (*ControlServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "getHello",
			Handler:    _Control_GetHello_Handler,
		},
		{
			MethodName: "createForwarder",
			Handler:    _Control_CreateForwarder_Handler,
		},
		{
			MethodName: "listForwarders",
			Handler:    _Control_ListForwarders_Handler,
		},
		{
			MethodName: "deleteForwarder",
			Handler:    _Control_DeleteForwarder_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "mlbctl.proto",
}
