// Code generated by MockGen. DO NOT EDIT.
// Source: gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/internal/tunnel/tunserver (interfaces: DataCallback,Tunnel,FindHandle,PollingGatewayURLQuerier,RouterPlugin)
//
// Generated by this command:
//
//	mockgen -typed -self_package gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/internal/tunnel/tunserver -destination mock_for_test.go -package tunserver gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/internal/tunnel/tunserver DataCallback,Tunnel,FindHandle,PollingGatewayURLQuerier,RouterPlugin
//

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

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

	api "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/internal/api"
	modshared "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/internal/module/modshared"
	rpc "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/internal/tunnel/rpc"
	gomock "go.uber.org/mock/gomock"
	status "google.golang.org/genproto/googleapis/rpc/status"
	grpc "google.golang.org/grpc"
)

// MockDataCallback is a mock of DataCallback interface.
type MockDataCallback struct {
	ctrl     *gomock.Controller
	recorder *MockDataCallbackMockRecorder
	isgomock struct{}
}

// MockDataCallbackMockRecorder is the mock recorder for MockDataCallback.
type MockDataCallbackMockRecorder struct {
	mock *MockDataCallback
}

// NewMockDataCallback creates a new mock instance.
func NewMockDataCallback(ctrl *gomock.Controller) *MockDataCallback {
	mock := &MockDataCallback{ctrl: ctrl}
	mock.recorder = &MockDataCallbackMockRecorder{mock}
	return mock
}

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

// Error mocks base method.
func (m *MockDataCallback) Error(arg0 *status.Status) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Error", arg0)
	ret0, _ := ret[0].(error)
	return ret0
}

// Error indicates an expected call of Error.
func (mr *MockDataCallbackMockRecorder) Error(arg0 any) *MockDataCallbackErrorCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Error", reflect.TypeOf((*MockDataCallback)(nil).Error), arg0)
	return &MockDataCallbackErrorCall{Call: call}
}

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

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

// Do rewrite *gomock.Call.Do
func (c *MockDataCallbackErrorCall) Do(f func(*status.Status) error) *MockDataCallbackErrorCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockDataCallbackErrorCall) DoAndReturn(f func(*status.Status) error) *MockDataCallbackErrorCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// Header mocks base method.
func (m *MockDataCallback) Header(arg0 []*rpc.MetadataKV) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Header", arg0)
	ret0, _ := ret[0].(error)
	return ret0
}

// Header indicates an expected call of Header.
func (mr *MockDataCallbackMockRecorder) Header(arg0 any) *MockDataCallbackHeaderCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockDataCallback)(nil).Header), arg0)
	return &MockDataCallbackHeaderCall{Call: call}
}

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

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

// Do rewrite *gomock.Call.Do
func (c *MockDataCallbackHeaderCall) Do(f func([]*rpc.MetadataKV) error) *MockDataCallbackHeaderCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockDataCallbackHeaderCall) DoAndReturn(f func([]*rpc.MetadataKV) error) *MockDataCallbackHeaderCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// Message mocks base method.
func (m *MockDataCallback) Message(arg0 []byte) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Message", arg0)
	ret0, _ := ret[0].(error)
	return ret0
}

// Message indicates an expected call of Message.
func (mr *MockDataCallbackMockRecorder) Message(arg0 any) *MockDataCallbackMessageCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Message", reflect.TypeOf((*MockDataCallback)(nil).Message), arg0)
	return &MockDataCallbackMessageCall{Call: call}
}

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

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

// Do rewrite *gomock.Call.Do
func (c *MockDataCallbackMessageCall) Do(f func([]byte) error) *MockDataCallbackMessageCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockDataCallbackMessageCall) DoAndReturn(f func([]byte) error) *MockDataCallbackMessageCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// Trailer mocks base method.
func (m *MockDataCallback) Trailer(arg0 []*rpc.MetadataKV) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Trailer", arg0)
	ret0, _ := ret[0].(error)
	return ret0
}

// Trailer indicates an expected call of Trailer.
func (mr *MockDataCallbackMockRecorder) Trailer(arg0 any) *MockDataCallbackTrailerCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockDataCallback)(nil).Trailer), arg0)
	return &MockDataCallbackTrailerCall{Call: call}
}

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

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

// Do rewrite *gomock.Call.Do
func (c *MockDataCallbackTrailerCall) Do(f func([]*rpc.MetadataKV) error) *MockDataCallbackTrailerCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockDataCallbackTrailerCall) DoAndReturn(f func([]*rpc.MetadataKV) error) *MockDataCallbackTrailerCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// MockTunnel is a mock of Tunnel interface.
type MockTunnel struct {
	ctrl     *gomock.Controller
	recorder *MockTunnelMockRecorder
	isgomock struct{}
}

// MockTunnelMockRecorder is the mock recorder for MockTunnel.
type MockTunnelMockRecorder struct {
	mock *MockTunnel
}

// NewMockTunnel creates a new mock instance.
func NewMockTunnel(ctrl *gomock.Controller) *MockTunnel {
	mock := &MockTunnel{ctrl: ctrl}
	mock.recorder = &MockTunnelMockRecorder{mock}
	return mock
}

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

// Done mocks base method.
func (m *MockTunnel) Done(ctx context.Context) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "Done", ctx)
}

// Done indicates an expected call of Done.
func (mr *MockTunnelMockRecorder) Done(ctx any) *MockTunnelDoneCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockTunnel)(nil).Done), ctx)
	return &MockTunnelDoneCall{Call: call}
}

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

// Return rewrite *gomock.Call.Return
func (c *MockTunnelDoneCall) Return() *MockTunnelDoneCall {
	c.Call = c.Call.Return()
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockTunnelDoneCall) Do(f func(context.Context)) *MockTunnelDoneCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockTunnelDoneCall) DoAndReturn(f func(context.Context)) *MockTunnelDoneCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

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

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

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

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

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

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

// MockFindHandle is a mock of FindHandle interface.
type MockFindHandle struct {
	ctrl     *gomock.Controller
	recorder *MockFindHandleMockRecorder
	isgomock struct{}
}

// MockFindHandleMockRecorder is the mock recorder for MockFindHandle.
type MockFindHandleMockRecorder struct {
	mock *MockFindHandle
}

// NewMockFindHandle creates a new mock instance.
func NewMockFindHandle(ctrl *gomock.Controller) *MockFindHandle {
	mock := &MockFindHandle{ctrl: ctrl}
	mock.recorder = &MockFindHandleMockRecorder{mock}
	return mock
}

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

// Done mocks base method.
func (m *MockFindHandle) Done(ctx context.Context) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "Done", ctx)
}

// Done indicates an expected call of Done.
func (mr *MockFindHandleMockRecorder) Done(ctx any) *MockFindHandleDoneCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockFindHandle)(nil).Done), ctx)
	return &MockFindHandleDoneCall{Call: call}
}

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

// Return rewrite *gomock.Call.Return
func (c *MockFindHandleDoneCall) Return() *MockFindHandleDoneCall {
	c.Call = c.Call.Return()
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockFindHandleDoneCall) Do(f func(context.Context)) *MockFindHandleDoneCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockFindHandleDoneCall) DoAndReturn(f func(context.Context)) *MockFindHandleDoneCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// Get mocks base method.
func (m *MockFindHandle) Get(ctx context.Context) (Tunnel, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Get", ctx)
	ret0, _ := ret[0].(Tunnel)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Get indicates an expected call of Get.
func (mr *MockFindHandleMockRecorder) Get(ctx any) *MockFindHandleGetCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockFindHandle)(nil).Get), ctx)
	return &MockFindHandleGetCall{Call: call}
}

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

// Return rewrite *gomock.Call.Return
func (c *MockFindHandleGetCall) Return(arg0 Tunnel, arg1 error) *MockFindHandleGetCall {
	c.Call = c.Call.Return(arg0, arg1)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockFindHandleGetCall) Do(f func(context.Context) (Tunnel, error)) *MockFindHandleGetCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockFindHandleGetCall) DoAndReturn(f func(context.Context) (Tunnel, error)) *MockFindHandleGetCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// MockPollingGatewayURLQuerier is a mock of PollingGatewayURLQuerier interface.
type MockPollingGatewayURLQuerier[T Target] struct {
	ctrl     *gomock.Controller
	recorder *MockPollingGatewayURLQuerierMockRecorder[T]
	isgomock struct{}
}

// MockPollingGatewayURLQuerierMockRecorder is the mock recorder for MockPollingGatewayURLQuerier.
type MockPollingGatewayURLQuerierMockRecorder[T Target] struct {
	mock *MockPollingGatewayURLQuerier[T]
}

// NewMockPollingGatewayURLQuerier creates a new mock instance.
func NewMockPollingGatewayURLQuerier[T Target](ctrl *gomock.Controller) *MockPollingGatewayURLQuerier[T] {
	mock := &MockPollingGatewayURLQuerier[T]{ctrl: ctrl}
	mock.recorder = &MockPollingGatewayURLQuerierMockRecorder[T]{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockPollingGatewayURLQuerier[T]) EXPECT() *MockPollingGatewayURLQuerierMockRecorder[T] {
	return m.recorder
}

// CachedGatewayURLs mocks base method.
func (m *MockPollingGatewayURLQuerier[T]) CachedGatewayURLs(agentKey api.AgentKey) []T {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "CachedGatewayURLs", agentKey)
	ret0, _ := ret[0].([]T)
	return ret0
}

// CachedGatewayURLs indicates an expected call of CachedGatewayURLs.
func (mr *MockPollingGatewayURLQuerierMockRecorder[T]) CachedGatewayURLs(agentKey any) *MockPollingGatewayURLQuerierCachedGatewayURLsCall[T] {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CachedGatewayURLs", reflect.TypeOf((*MockPollingGatewayURLQuerier[T])(nil).CachedGatewayURLs), agentKey)
	return &MockPollingGatewayURLQuerierCachedGatewayURLsCall[T]{Call: call}
}

// MockPollingGatewayURLQuerierCachedGatewayURLsCall wrap *gomock.Call
type MockPollingGatewayURLQuerierCachedGatewayURLsCall[T Target] struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockPollingGatewayURLQuerierCachedGatewayURLsCall[T]) Return(arg0 []T) *MockPollingGatewayURLQuerierCachedGatewayURLsCall[T] {
	c.Call = c.Call.Return(arg0)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockPollingGatewayURLQuerierCachedGatewayURLsCall[T]) Do(f func(api.AgentKey) []T) *MockPollingGatewayURLQuerierCachedGatewayURLsCall[T] {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockPollingGatewayURLQuerierCachedGatewayURLsCall[T]) DoAndReturn(f func(api.AgentKey) []T) *MockPollingGatewayURLQuerierCachedGatewayURLsCall[T] {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// PollGatewayURLs mocks base method.
func (m *MockPollingGatewayURLQuerier[T]) PollGatewayURLs(ctx context.Context, agentKey api.AgentKey, cb PollGatewayURLsCallback[T]) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "PollGatewayURLs", ctx, agentKey, cb)
}

// PollGatewayURLs indicates an expected call of PollGatewayURLs.
func (mr *MockPollingGatewayURLQuerierMockRecorder[T]) PollGatewayURLs(ctx, agentKey, cb any) *MockPollingGatewayURLQuerierPollGatewayURLsCall[T] {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PollGatewayURLs", reflect.TypeOf((*MockPollingGatewayURLQuerier[T])(nil).PollGatewayURLs), ctx, agentKey, cb)
	return &MockPollingGatewayURLQuerierPollGatewayURLsCall[T]{Call: call}
}

// MockPollingGatewayURLQuerierPollGatewayURLsCall wrap *gomock.Call
type MockPollingGatewayURLQuerierPollGatewayURLsCall[T Target] struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockPollingGatewayURLQuerierPollGatewayURLsCall[T]) Return() *MockPollingGatewayURLQuerierPollGatewayURLsCall[T] {
	c.Call = c.Call.Return()
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockPollingGatewayURLQuerierPollGatewayURLsCall[T]) Do(f func(context.Context, api.AgentKey, PollGatewayURLsCallback[T])) *MockPollingGatewayURLQuerierPollGatewayURLsCall[T] {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockPollingGatewayURLQuerierPollGatewayURLsCall[T]) DoAndReturn(f func(context.Context, api.AgentKey, PollGatewayURLsCallback[T])) *MockPollingGatewayURLQuerierPollGatewayURLsCall[T] {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// MockRouterPlugin is a mock of RouterPlugin interface.
type MockRouterPlugin[T Target] struct {
	ctrl     *gomock.Controller
	recorder *MockRouterPluginMockRecorder[T]
	isgomock struct{}
}

// MockRouterPluginMockRecorder is the mock recorder for MockRouterPlugin.
type MockRouterPluginMockRecorder[T Target] struct {
	mock *MockRouterPlugin[T]
}

// NewMockRouterPlugin creates a new mock instance.
func NewMockRouterPlugin[T Target](ctrl *gomock.Controller) *MockRouterPlugin[T] {
	mock := &MockRouterPlugin[T]{ctrl: ctrl}
	mock.recorder = &MockRouterPluginMockRecorder[T]{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockRouterPlugin[T]) EXPECT() *MockRouterPluginMockRecorder[T] {
	return m.recorder
}

// FindReadyGateway mocks base method.
func (m *MockRouterPlugin[T]) FindReadyGateway(ctx context.Context, log *slog.Logger, method string) (ReadyGateway[T], *slog.Logger, api.AgentKey, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "FindReadyGateway", ctx, log, method)
	ret0, _ := ret[0].(ReadyGateway[T])
	ret1, _ := ret[1].(*slog.Logger)
	ret2, _ := ret[2].(api.AgentKey)
	ret3, _ := ret[3].(error)
	return ret0, ret1, ret2, ret3
}

// FindReadyGateway indicates an expected call of FindReadyGateway.
func (mr *MockRouterPluginMockRecorder[T]) FindReadyGateway(ctx, log, method any) *MockRouterPluginFindReadyGatewayCall[T] {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindReadyGateway", reflect.TypeOf((*MockRouterPlugin[T])(nil).FindReadyGateway), ctx, log, method)
	return &MockRouterPluginFindReadyGatewayCall[T]{Call: call}
}

// MockRouterPluginFindReadyGatewayCall wrap *gomock.Call
type MockRouterPluginFindReadyGatewayCall[T Target] struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockRouterPluginFindReadyGatewayCall[T]) Return(arg0 ReadyGateway[T], arg1 *slog.Logger, arg2 api.AgentKey, arg3 error) *MockRouterPluginFindReadyGatewayCall[T] {
	c.Call = c.Call.Return(arg0, arg1, arg2, arg3)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockRouterPluginFindReadyGatewayCall[T]) Do(f func(context.Context, *slog.Logger, string) (ReadyGateway[T], *slog.Logger, api.AgentKey, error)) *MockRouterPluginFindReadyGatewayCall[T] {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockRouterPluginFindReadyGatewayCall[T]) DoAndReturn(f func(context.Context, *slog.Logger, string) (ReadyGateway[T], *slog.Logger, api.AgentKey, error)) *MockRouterPluginFindReadyGatewayCall[T] {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// FindTunnel mocks base method.
func (m *MockRouterPlugin[T]) FindTunnel(arg0 grpc.ServerStream, arg1 modshared.RPCAPI) (bool, *slog.Logger, FindHandle, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "FindTunnel", arg0, arg1)
	ret0, _ := ret[0].(bool)
	ret1, _ := ret[1].(*slog.Logger)
	ret2, _ := ret[2].(FindHandle)
	ret3, _ := ret[3].(error)
	return ret0, ret1, ret2, ret3
}

// FindTunnel indicates an expected call of FindTunnel.
func (mr *MockRouterPluginMockRecorder[T]) FindTunnel(arg0, arg1 any) *MockRouterPluginFindTunnelCall[T] {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindTunnel", reflect.TypeOf((*MockRouterPlugin[T])(nil).FindTunnel), arg0, arg1)
	return &MockRouterPluginFindTunnelCall[T]{Call: call}
}

// MockRouterPluginFindTunnelCall wrap *gomock.Call
type MockRouterPluginFindTunnelCall[T Target] struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockRouterPluginFindTunnelCall[T]) Return(arg0 bool, arg1 *slog.Logger, arg2 FindHandle, arg3 error) *MockRouterPluginFindTunnelCall[T] {
	c.Call = c.Call.Return(arg0, arg1, arg2, arg3)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockRouterPluginFindTunnelCall[T]) Do(f func(grpc.ServerStream, modshared.RPCAPI) (bool, *slog.Logger, FindHandle, error)) *MockRouterPluginFindTunnelCall[T] {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockRouterPluginFindTunnelCall[T]) DoAndReturn(f func(grpc.ServerStream, modshared.RPCAPI) (bool, *slog.Logger, FindHandle, error)) *MockRouterPluginFindTunnelCall[T] {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// PrepareStreamForForwarding mocks base method.
func (m *MockRouterPlugin[T]) PrepareStreamForForwarding(stream grpc.ServerStream) (grpc.ServerStream, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "PrepareStreamForForwarding", stream)
	ret0, _ := ret[0].(grpc.ServerStream)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// PrepareStreamForForwarding indicates an expected call of PrepareStreamForForwarding.
func (mr *MockRouterPluginMockRecorder[T]) PrepareStreamForForwarding(stream any) *MockRouterPluginPrepareStreamForForwardingCall[T] {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareStreamForForwarding", reflect.TypeOf((*MockRouterPlugin[T])(nil).PrepareStreamForForwarding), stream)
	return &MockRouterPluginPrepareStreamForForwardingCall[T]{Call: call}
}

// MockRouterPluginPrepareStreamForForwardingCall wrap *gomock.Call
type MockRouterPluginPrepareStreamForForwardingCall[T Target] struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockRouterPluginPrepareStreamForForwardingCall[T]) Return(arg0 grpc.ServerStream, arg1 error) *MockRouterPluginPrepareStreamForForwardingCall[T] {
	c.Call = c.Call.Return(arg0, arg1)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockRouterPluginPrepareStreamForForwardingCall[T]) Do(f func(grpc.ServerStream) (grpc.ServerStream, error)) *MockRouterPluginPrepareStreamForForwardingCall[T] {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockRouterPluginPrepareStreamForForwardingCall[T]) DoAndReturn(f func(grpc.ServerStream) (grpc.ServerStream, error)) *MockRouterPluginPrepareStreamForForwardingCall[T] {
	c.Call = c.Call.DoAndReturn(f)
	return c
}
