// Code generated by MockGen. DO NOT EDIT.
// Source: ../../../module/agent2kas_tunnel/router/registry.go
//
// Generated by this command:
//
//	mockgen -typed -source ../../../module/agent2kas_tunnel/router/registry.go -destination registry.go -package mock_agent2kas_router
//

// Package mock_agent2kas_router is a generated GoMock package.
package mock_agent2kas_router

import (
	context "context"
	slog "log/slog"
	reflect "reflect"

	api "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/internal/api"
	router "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/internal/module/agent2kas_tunnel/router"
	tunserver "gitlab.com/gitlab-org/cluster-integration/tunnel/tunserver"
	gomock "go.uber.org/mock/gomock"
	grpc "google.golang.org/grpc"
)

// MockHandler is a mock of Handler interface.
type MockHandler struct {
	ctrl     *gomock.Controller
	recorder *MockHandlerMockRecorder
	isgomock struct{}
}

// MockHandlerMockRecorder is the mock recorder for MockHandler.
type MockHandlerMockRecorder struct {
	mock *MockHandler
}

// NewMockHandler creates a new mock instance.
func NewMockHandler(ctrl *gomock.Controller) *MockHandler {
	mock := &MockHandler{ctrl: ctrl}
	mock.recorder = &MockHandlerMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockHandler) EXPECT() *MockHandlerMockRecorder {
	return m.recorder
}

// HandleTunnel mocks base method.
func (m *MockHandler) HandleTunnel(ctx, ageCtx context.Context, agentKey api.AgentKey, forwarderFactory router.ForwarderFactory) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "HandleTunnel", ctx, ageCtx, agentKey, forwarderFactory)
	ret0, _ := ret[0].(error)
	return ret0
}

// HandleTunnel indicates an expected call of HandleTunnel.
func (mr *MockHandlerMockRecorder) HandleTunnel(ctx, ageCtx, agentKey, forwarderFactory any) *MockHandlerHandleTunnelCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleTunnel", reflect.TypeOf((*MockHandler)(nil).HandleTunnel), ctx, ageCtx, agentKey, forwarderFactory)
	return &MockHandlerHandleTunnelCall{Call: call}
}

// MockHandlerHandleTunnelCall wrap *gomock.Call
type MockHandlerHandleTunnelCall struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockHandlerHandleTunnelCall) Return(arg0 error) *MockHandlerHandleTunnelCall {
	c.Call = c.Call.Return(arg0)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockHandlerHandleTunnelCall) Do(f func(context.Context, context.Context, api.AgentKey, router.ForwarderFactory) error) *MockHandlerHandleTunnelCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockHandlerHandleTunnelCall) DoAndReturn(f func(context.Context, context.Context, api.AgentKey, router.ForwarderFactory) error) *MockHandlerHandleTunnelCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// MockForwarder is a mock of Forwarder interface.
type MockForwarder struct {
	ctrl     *gomock.Controller
	recorder *MockForwarderMockRecorder
	isgomock struct{}
}

// MockForwarderMockRecorder is the mock recorder for MockForwarder.
type MockForwarderMockRecorder struct {
	mock *MockForwarder
}

// NewMockForwarder creates a new mock instance.
func NewMockForwarder(ctrl *gomock.Controller) *MockForwarder {
	mock := &MockForwarder{ctrl: ctrl}
	mock.recorder = &MockForwarderMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockForwarder) EXPECT() *MockForwarderMockRecorder {
	return m.recorder
}

// ForwardStream mocks base method.
func (m *MockForwarder) ForwardStream(log *slog.Logger, incomingStream grpc.ServerStream, cb tunserver.DataCallback) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ForwardStream", log, incomingStream, cb)
	ret0, _ := ret[0].(error)
	return ret0
}

// ForwardStream indicates an expected call of ForwardStream.
func (mr *MockForwarderMockRecorder) ForwardStream(log, incomingStream, cb any) *MockForwarderForwardStreamCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForwardStream", reflect.TypeOf((*MockForwarder)(nil).ForwardStream), log, incomingStream, cb)
	return &MockForwarderForwardStreamCall{Call: call}
}

// MockForwarderForwardStreamCall wrap *gomock.Call
type MockForwarderForwardStreamCall struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockForwarderForwardStreamCall) Return(arg0 error) *MockForwarderForwardStreamCall {
	c.Call = c.Call.Return(arg0)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockForwarderForwardStreamCall) Do(f func(*slog.Logger, grpc.ServerStream, tunserver.DataCallback) error) *MockForwarderForwardStreamCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockForwarderForwardStreamCall) DoAndReturn(f func(*slog.Logger, grpc.ServerStream, tunserver.DataCallback) error) *MockForwarderForwardStreamCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// SupportsServiceAndMethod mocks base method.
func (m *MockForwarder) SupportsServiceAndMethod(service, method string) bool {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "SupportsServiceAndMethod", service, method)
	ret0, _ := ret[0].(bool)
	return ret0
}

// SupportsServiceAndMethod indicates an expected call of SupportsServiceAndMethod.
func (mr *MockForwarderMockRecorder) SupportsServiceAndMethod(service, method any) *MockForwarderSupportsServiceAndMethodCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsServiceAndMethod", reflect.TypeOf((*MockForwarder)(nil).SupportsServiceAndMethod), service, method)
	return &MockForwarderSupportsServiceAndMethodCall{Call: call}
}

// MockForwarderSupportsServiceAndMethodCall wrap *gomock.Call
type MockForwarderSupportsServiceAndMethodCall struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockForwarderSupportsServiceAndMethodCall) Return(arg0 bool) *MockForwarderSupportsServiceAndMethodCall {
	c.Call = c.Call.Return(arg0)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockForwarderSupportsServiceAndMethodCall) Do(f func(string, string) bool) *MockForwarderSupportsServiceAndMethodCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockForwarderSupportsServiceAndMethodCall) DoAndReturn(f func(string, string) bool) *MockForwarderSupportsServiceAndMethodCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}
