// Code generated by MockGen. DO NOT EDIT.
// Source: gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/internal/module/agent2kas_tunnel/router (interfaces: AgentFinder,TunnelFinder,Tracker,RegistrationBuilder,Querier)
//
// Generated by this command:
//
//	mockgen -typed -self_package gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/internal/module/agent2kas_tunnel/router -destination mock_for_test.go -package router gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/internal/module/agent2kas_tunnel/router AgentFinder,TunnelFinder,Tracker,RegistrationBuilder,Querier
//

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

import (
	context "context"
	reflect "reflect"
	time "time"

	api "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/internal/api"
	nettool "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/internal/tool/nettool"
	tunserver "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/internal/tunnel/tunserver"
	gomock "go.uber.org/mock/gomock"
)

// MockAgentFinder is a mock of AgentFinder interface.
type MockAgentFinder struct {
	ctrl     *gomock.Controller
	recorder *MockAgentFinderMockRecorder
	isgomock struct{}
}

// MockAgentFinderMockRecorder is the mock recorder for MockAgentFinder.
type MockAgentFinderMockRecorder struct {
	mock *MockAgentFinder
}

// NewMockAgentFinder creates a new mock instance.
func NewMockAgentFinder(ctrl *gomock.Controller) *MockAgentFinder {
	mock := &MockAgentFinder{ctrl: ctrl}
	mock.recorder = &MockAgentFinderMockRecorder{mock}
	return mock
}

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

// AgentLastConnected mocks base method.
func (m *MockAgentFinder) AgentLastConnected(ctx context.Context, agentKey api.AgentKey) (time.Time, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "AgentLastConnected", ctx, agentKey)
	ret0, _ := ret[0].(time.Time)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// AgentLastConnected indicates an expected call of AgentLastConnected.
func (mr *MockAgentFinderMockRecorder) AgentLastConnected(ctx, agentKey any) *MockAgentFinderAgentLastConnectedCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentLastConnected", reflect.TypeOf((*MockAgentFinder)(nil).AgentLastConnected), ctx, agentKey)
	return &MockAgentFinderAgentLastConnectedCall{Call: call}
}

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

// Return rewrite *gomock.Call.Return
func (c *MockAgentFinderAgentLastConnectedCall) Return(arg0 time.Time, arg1 error) *MockAgentFinderAgentLastConnectedCall {
	c.Call = c.Call.Return(arg0, arg1)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockAgentFinderAgentLastConnectedCall) Do(f func(context.Context, api.AgentKey) (time.Time, error)) *MockAgentFinderAgentLastConnectedCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockAgentFinderAgentLastConnectedCall) DoAndReturn(f func(context.Context, api.AgentKey) (time.Time, error)) *MockAgentFinderAgentLastConnectedCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// MockTunnelFinder is a mock of TunnelFinder interface.
type MockTunnelFinder struct {
	ctrl     *gomock.Controller
	recorder *MockTunnelFinderMockRecorder
	isgomock struct{}
}

// MockTunnelFinderMockRecorder is the mock recorder for MockTunnelFinder.
type MockTunnelFinderMockRecorder struct {
	mock *MockTunnelFinder
}

// NewMockTunnelFinder creates a new mock instance.
func NewMockTunnelFinder(ctrl *gomock.Controller) *MockTunnelFinder {
	mock := &MockTunnelFinder{ctrl: ctrl}
	mock.recorder = &MockTunnelFinderMockRecorder{mock}
	return mock
}

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

// FindTunnel mocks base method.
func (m *MockTunnelFinder) FindTunnel(ctx context.Context, agentKey api.AgentKey, service, method string) (bool, tunserver.FindHandle) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "FindTunnel", ctx, agentKey, service, method)
	ret0, _ := ret[0].(bool)
	ret1, _ := ret[1].(tunserver.FindHandle)
	return ret0, ret1
}

// FindTunnel indicates an expected call of FindTunnel.
func (mr *MockTunnelFinderMockRecorder) FindTunnel(ctx, agentKey, service, method any) *MockTunnelFinderFindTunnelCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindTunnel", reflect.TypeOf((*MockTunnelFinder)(nil).FindTunnel), ctx, agentKey, service, method)
	return &MockTunnelFinderFindTunnelCall{Call: call}
}

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

// Return rewrite *gomock.Call.Return
func (c *MockTunnelFinderFindTunnelCall) Return(arg0 bool, arg1 tunserver.FindHandle) *MockTunnelFinderFindTunnelCall {
	c.Call = c.Call.Return(arg0, arg1)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockTunnelFinderFindTunnelCall) Do(f func(context.Context, api.AgentKey, string, string) (bool, tunserver.FindHandle)) *MockTunnelFinderFindTunnelCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockTunnelFinderFindTunnelCall) DoAndReturn(f func(context.Context, api.AgentKey, string, string) (bool, tunserver.FindHandle)) *MockTunnelFinderFindTunnelCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// MockTracker is a mock of Tracker interface.
type MockTracker struct {
	ctrl     *gomock.Controller
	recorder *MockTrackerMockRecorder
	isgomock struct{}
}

// MockTrackerMockRecorder is the mock recorder for MockTracker.
type MockTrackerMockRecorder struct {
	mock *MockTracker
}

// NewMockTracker creates a new mock instance.
func NewMockTracker(ctrl *gomock.Controller) *MockTracker {
	mock := &MockTracker{ctrl: ctrl}
	mock.recorder = &MockTrackerMockRecorder{mock}
	return mock
}

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

// GC mocks base method.
func (m *MockTracker) GC(ctx context.Context, agentKeys []api.AgentKey) (int, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GC", ctx, agentKeys)
	ret0, _ := ret[0].(int)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GC indicates an expected call of GC.
func (mr *MockTrackerMockRecorder) GC(ctx, agentKeys any) *MockTrackerGCCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GC", reflect.TypeOf((*MockTracker)(nil).GC), ctx, agentKeys)
	return &MockTrackerGCCall{Call: call}
}

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

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

// Do rewrite *gomock.Call.Do
func (c *MockTrackerGCCall) Do(f func(context.Context, []api.AgentKey) (int, error)) *MockTrackerGCCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockTrackerGCCall) DoAndReturn(f func(context.Context, []api.AgentKey) (int, error)) *MockTrackerGCCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// KASURLsByAgentKey mocks base method.
func (m *MockTracker) KASURLsByAgentKey(ctx context.Context, agentKey api.AgentKey) ([]nettool.MultiURL, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "KASURLsByAgentKey", ctx, agentKey)
	ret0, _ := ret[0].([]nettool.MultiURL)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// KASURLsByAgentKey indicates an expected call of KASURLsByAgentKey.
func (mr *MockTrackerMockRecorder) KASURLsByAgentKey(ctx, agentKey any) *MockTrackerKASURLsByAgentKeyCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KASURLsByAgentKey", reflect.TypeOf((*MockTracker)(nil).KASURLsByAgentKey), ctx, agentKey)
	return &MockTrackerKASURLsByAgentKeyCall{Call: call}
}

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

// Return rewrite *gomock.Call.Return
func (c *MockTrackerKASURLsByAgentKeyCall) Return(arg0 []nettool.MultiURL, arg1 error) *MockTrackerKASURLsByAgentKeyCall {
	c.Call = c.Call.Return(arg0, arg1)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockTrackerKASURLsByAgentKeyCall) Do(f func(context.Context, api.AgentKey) ([]nettool.MultiURL, error)) *MockTrackerKASURLsByAgentKeyCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockTrackerKASURLsByAgentKeyCall) DoAndReturn(f func(context.Context, api.AgentKey) ([]nettool.MultiURL, error)) *MockTrackerKASURLsByAgentKeyCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// RegistrationBuilder mocks base method.
func (m *MockTracker) RegistrationBuilder() RegistrationBuilder {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "RegistrationBuilder")
	ret0, _ := ret[0].(RegistrationBuilder)
	return ret0
}

// RegistrationBuilder indicates an expected call of RegistrationBuilder.
func (mr *MockTrackerMockRecorder) RegistrationBuilder() *MockTrackerRegistrationBuilderCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegistrationBuilder", reflect.TypeOf((*MockTracker)(nil).RegistrationBuilder))
	return &MockTrackerRegistrationBuilderCall{Call: call}
}

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

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

// Do rewrite *gomock.Call.Do
func (c *MockTrackerRegistrationBuilderCall) Do(f func() RegistrationBuilder) *MockTrackerRegistrationBuilderCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockTrackerRegistrationBuilderCall) DoAndReturn(f func() RegistrationBuilder) *MockTrackerRegistrationBuilderCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// MockRegistrationBuilder is a mock of RegistrationBuilder interface.
type MockRegistrationBuilder struct {
	ctrl     *gomock.Controller
	recorder *MockRegistrationBuilderMockRecorder
	isgomock struct{}
}

// MockRegistrationBuilderMockRecorder is the mock recorder for MockRegistrationBuilder.
type MockRegistrationBuilderMockRecorder struct {
	mock *MockRegistrationBuilder
}

// NewMockRegistrationBuilder creates a new mock instance.
func NewMockRegistrationBuilder(ctrl *gomock.Controller) *MockRegistrationBuilder {
	mock := &MockRegistrationBuilder{ctrl: ctrl}
	mock.recorder = &MockRegistrationBuilderMockRecorder{mock}
	return mock
}

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

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

// Do indicates an expected call of Do.
func (mr *MockRegistrationBuilderMockRecorder) Do(arg0 any) *MockRegistrationBuilderDoCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Do", reflect.TypeOf((*MockRegistrationBuilder)(nil).Do), arg0)
	return &MockRegistrationBuilderDoCall{Call: call}
}

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

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

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

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

// Refresh mocks base method.
func (m *MockRegistrationBuilder) Refresh(ttl time.Duration, agentKeys ...api.AgentKey) {
	m.ctrl.T.Helper()
	varargs := []any{ttl}
	for _, a := range agentKeys {
		varargs = append(varargs, a)
	}
	m.ctrl.Call(m, "Refresh", varargs...)
}

// Refresh indicates an expected call of Refresh.
func (mr *MockRegistrationBuilderMockRecorder) Refresh(ttl any, agentKeys ...any) *MockRegistrationBuilderRefreshCall {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{ttl}, agentKeys...)
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockRegistrationBuilder)(nil).Refresh), varargs...)
	return &MockRegistrationBuilderRefreshCall{Call: call}
}

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

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

// Do rewrite *gomock.Call.Do
func (c *MockRegistrationBuilderRefreshCall) Do(f func(time.Duration, ...api.AgentKey)) *MockRegistrationBuilderRefreshCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockRegistrationBuilderRefreshCall) DoAndReturn(f func(time.Duration, ...api.AgentKey)) *MockRegistrationBuilderRefreshCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// Register mocks base method.
func (m *MockRegistrationBuilder) Register(ttl time.Duration, agentKeys ...api.AgentKey) {
	m.ctrl.T.Helper()
	varargs := []any{ttl}
	for _, a := range agentKeys {
		varargs = append(varargs, a)
	}
	m.ctrl.Call(m, "Register", varargs...)
}

// Register indicates an expected call of Register.
func (mr *MockRegistrationBuilderMockRecorder) Register(ttl any, agentKeys ...any) *MockRegistrationBuilderRegisterCall {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{ttl}, agentKeys...)
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockRegistrationBuilder)(nil).Register), varargs...)
	return &MockRegistrationBuilderRegisterCall{Call: call}
}

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

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

// Do rewrite *gomock.Call.Do
func (c *MockRegistrationBuilderRegisterCall) Do(f func(time.Duration, ...api.AgentKey)) *MockRegistrationBuilderRegisterCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockRegistrationBuilderRegisterCall) DoAndReturn(f func(time.Duration, ...api.AgentKey)) *MockRegistrationBuilderRegisterCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// Unregister mocks base method.
func (m *MockRegistrationBuilder) Unregister(agentKeys ...api.AgentKey) {
	m.ctrl.T.Helper()
	varargs := []any{}
	for _, a := range agentKeys {
		varargs = append(varargs, a)
	}
	m.ctrl.Call(m, "Unregister", varargs...)
}

// Unregister indicates an expected call of Unregister.
func (mr *MockRegistrationBuilderMockRecorder) Unregister(agentKeys ...any) *MockRegistrationBuilderUnregisterCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unregister", reflect.TypeOf((*MockRegistrationBuilder)(nil).Unregister), agentKeys...)
	return &MockRegistrationBuilderUnregisterCall{Call: call}
}

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

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

// Do rewrite *gomock.Call.Do
func (c *MockRegistrationBuilderUnregisterCall) Do(f func(...api.AgentKey)) *MockRegistrationBuilderUnregisterCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockRegistrationBuilderUnregisterCall) DoAndReturn(f func(...api.AgentKey)) *MockRegistrationBuilderUnregisterCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// MockQuerier is a mock of Querier interface.
type MockQuerier struct {
	ctrl     *gomock.Controller
	recorder *MockQuerierMockRecorder
	isgomock struct{}
}

// MockQuerierMockRecorder is the mock recorder for MockQuerier.
type MockQuerierMockRecorder struct {
	mock *MockQuerier
}

// NewMockQuerier creates a new mock instance.
func NewMockQuerier(ctrl *gomock.Controller) *MockQuerier {
	mock := &MockQuerier{ctrl: ctrl}
	mock.recorder = &MockQuerierMockRecorder{mock}
	return mock
}

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

// KASURLsByAgentKey mocks base method.
func (m *MockQuerier) KASURLsByAgentKey(ctx context.Context, agentKey api.AgentKey) ([]nettool.MultiURL, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "KASURLsByAgentKey", ctx, agentKey)
	ret0, _ := ret[0].([]nettool.MultiURL)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// KASURLsByAgentKey indicates an expected call of KASURLsByAgentKey.
func (mr *MockQuerierMockRecorder) KASURLsByAgentKey(ctx, agentKey any) *MockQuerierKASURLsByAgentKeyCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KASURLsByAgentKey", reflect.TypeOf((*MockQuerier)(nil).KASURLsByAgentKey), ctx, agentKey)
	return &MockQuerierKASURLsByAgentKeyCall{Call: call}
}

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

// Return rewrite *gomock.Call.Return
func (c *MockQuerierKASURLsByAgentKeyCall) Return(arg0 []nettool.MultiURL, arg1 error) *MockQuerierKASURLsByAgentKeyCall {
	c.Call = c.Call.Return(arg0, arg1)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockQuerierKASURLsByAgentKeyCall) Do(f func(context.Context, api.AgentKey) ([]nettool.MultiURL, error)) *MockQuerierKASURLsByAgentKeyCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQuerierKASURLsByAgentKeyCall) DoAndReturn(f func(context.Context, api.AgentKey) ([]nettool.MultiURL, error)) *MockQuerierKASURLsByAgentKeyCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}
