// Copyright 2021-2025 Zenauth Ltd.
// SPDX-License-Identifier: Apache-2.0

// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify

package mocks

import (
	"context"
	"io"

	"github.com/cerbos/cerbos/api/genpb/cerbos/response/v1"
	"github.com/cerbos/cerbos/internal/namer"
	"github.com/cerbos/cerbos/internal/policy"
	"github.com/cerbos/cerbos/internal/storage"
	"github.com/cerbos/cerbos/internal/storage/index"
	mock "github.com/stretchr/testify/mock"
)

// NewIndex creates a new instance of Index. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewIndex(t interface {
	mock.TestingT
	Cleanup(func())
}) *Index {
	mock := &Index{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}

// Index is an autogenerated mock type for the Index type
type Index struct {
	mock.Mock
}

type Index_Expecter struct {
	mock *mock.Mock
}

func (_m *Index) EXPECT() *Index_Expecter {
	return &Index_Expecter{mock: &_m.Mock}
}

// AddOrUpdate provides a mock function for the type Index
func (_mock *Index) AddOrUpdate(entry index.Entry) (storage.Event, error) {
	ret := _mock.Called(entry)

	if len(ret) == 0 {
		panic("no return value specified for AddOrUpdate")
	}

	var r0 storage.Event
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(index.Entry) (storage.Event, error)); ok {
		return returnFunc(entry)
	}
	if returnFunc, ok := ret.Get(0).(func(index.Entry) storage.Event); ok {
		r0 = returnFunc(entry)
	} else {
		r0 = ret.Get(0).(storage.Event)
	}
	if returnFunc, ok := ret.Get(1).(func(index.Entry) error); ok {
		r1 = returnFunc(entry)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

// Index_AddOrUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddOrUpdate'
type Index_AddOrUpdate_Call struct {
	*mock.Call
}

// AddOrUpdate is a helper method to define mock.On call
//   - entry index.Entry
func (_e *Index_Expecter) AddOrUpdate(entry interface{}) *Index_AddOrUpdate_Call {
	return &Index_AddOrUpdate_Call{Call: _e.mock.On("AddOrUpdate", entry)}
}

func (_c *Index_AddOrUpdate_Call) Run(run func(entry index.Entry)) *Index_AddOrUpdate_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 index.Entry
		if args[0] != nil {
			arg0 = args[0].(index.Entry)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *Index_AddOrUpdate_Call) Return(event storage.Event, err error) *Index_AddOrUpdate_Call {
	_c.Call.Return(event, err)
	return _c
}

func (_c *Index_AddOrUpdate_Call) RunAndReturn(run func(entry index.Entry) (storage.Event, error)) *Index_AddOrUpdate_Call {
	_c.Call.Return(run)
	return _c
}

// Clear provides a mock function for the type Index
func (_mock *Index) Clear() error {
	ret := _mock.Called()

	if len(ret) == 0 {
		panic("no return value specified for Clear")
	}

	var r0 error
	if returnFunc, ok := ret.Get(0).(func() error); ok {
		r0 = returnFunc()
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

// Index_Clear_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Clear'
type Index_Clear_Call struct {
	*mock.Call
}

// Clear is a helper method to define mock.On call
func (_e *Index_Expecter) Clear() *Index_Clear_Call {
	return &Index_Clear_Call{Call: _e.mock.On("Clear")}
}

func (_c *Index_Clear_Call) Run(run func()) *Index_Clear_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *Index_Clear_Call) Return(err error) *Index_Clear_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *Index_Clear_Call) RunAndReturn(run func() error) *Index_Clear_Call {
	_c.Call.Return(run)
	return _c
}

// Close provides a mock function for the type Index
func (_mock *Index) Close() error {
	ret := _mock.Called()

	if len(ret) == 0 {
		panic("no return value specified for Close")
	}

	var r0 error
	if returnFunc, ok := ret.Get(0).(func() error); ok {
		r0 = returnFunc()
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

// Index_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
type Index_Close_Call struct {
	*mock.Call
}

// Close is a helper method to define mock.On call
func (_e *Index_Expecter) Close() *Index_Close_Call {
	return &Index_Close_Call{Call: _e.mock.On("Close")}
}

func (_c *Index_Close_Call) Run(run func()) *Index_Close_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *Index_Close_Call) Return(err error) *Index_Close_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *Index_Close_Call) RunAndReturn(run func() error) *Index_Close_Call {
	_c.Call.Return(run)
	return _c
}

// Delete provides a mock function for the type Index
func (_mock *Index) Delete(entry index.Entry) (storage.Event, error) {
	ret := _mock.Called(entry)

	if len(ret) == 0 {
		panic("no return value specified for Delete")
	}

	var r0 storage.Event
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(index.Entry) (storage.Event, error)); ok {
		return returnFunc(entry)
	}
	if returnFunc, ok := ret.Get(0).(func(index.Entry) storage.Event); ok {
		r0 = returnFunc(entry)
	} else {
		r0 = ret.Get(0).(storage.Event)
	}
	if returnFunc, ok := ret.Get(1).(func(index.Entry) error); ok {
		r1 = returnFunc(entry)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

// Index_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
type Index_Delete_Call struct {
	*mock.Call
}

// Delete is a helper method to define mock.On call
//   - entry index.Entry
func (_e *Index_Expecter) Delete(entry interface{}) *Index_Delete_Call {
	return &Index_Delete_Call{Call: _e.mock.On("Delete", entry)}
}

func (_c *Index_Delete_Call) Run(run func(entry index.Entry)) *Index_Delete_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 index.Entry
		if args[0] != nil {
			arg0 = args[0].(index.Entry)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *Index_Delete_Call) Return(event storage.Event, err error) *Index_Delete_Call {
	_c.Call.Return(event, err)
	return _c
}

func (_c *Index_Delete_Call) RunAndReturn(run func(entry index.Entry) (storage.Event, error)) *Index_Delete_Call {
	_c.Call.Return(run)
	return _c
}

// GetAll provides a mock function for the type Index
func (_mock *Index) GetAll(context1 context.Context) ([]*policy.CompilationUnit, error) {
	ret := _mock.Called(context1)

	if len(ret) == 0 {
		panic("no return value specified for GetAll")
	}

	var r0 []*policy.CompilationUnit
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*policy.CompilationUnit, error)); ok {
		return returnFunc(context1)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context) []*policy.CompilationUnit); ok {
		r0 = returnFunc(context1)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*policy.CompilationUnit)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
		r1 = returnFunc(context1)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

// Index_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll'
type Index_GetAll_Call struct {
	*mock.Call
}

// GetAll is a helper method to define mock.On call
//   - context1 context.Context
func (_e *Index_Expecter) GetAll(context1 interface{}) *Index_GetAll_Call {
	return &Index_GetAll_Call{Call: _e.mock.On("GetAll", context1)}
}

func (_c *Index_GetAll_Call) Run(run func(context1 context.Context)) *Index_GetAll_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *Index_GetAll_Call) Return(compilationUnits []*policy.CompilationUnit, err error) *Index_GetAll_Call {
	_c.Call.Return(compilationUnits, err)
	return _c
}

func (_c *Index_GetAll_Call) RunAndReturn(run func(context1 context.Context) ([]*policy.CompilationUnit, error)) *Index_GetAll_Call {
	_c.Call.Return(run)
	return _c
}

// GetAllCompilationUnits provides a mock function for the type Index
func (_mock *Index) GetAllCompilationUnits(context1 context.Context) <-chan *policy.CompilationUnit {
	ret := _mock.Called(context1)

	if len(ret) == 0 {
		panic("no return value specified for GetAllCompilationUnits")
	}

	var r0 <-chan *policy.CompilationUnit
	if returnFunc, ok := ret.Get(0).(func(context.Context) <-chan *policy.CompilationUnit); ok {
		r0 = returnFunc(context1)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(<-chan *policy.CompilationUnit)
		}
	}
	return r0
}

// Index_GetAllCompilationUnits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllCompilationUnits'
type Index_GetAllCompilationUnits_Call struct {
	*mock.Call
}

// GetAllCompilationUnits is a helper method to define mock.On call
//   - context1 context.Context
func (_e *Index_Expecter) GetAllCompilationUnits(context1 interface{}) *Index_GetAllCompilationUnits_Call {
	return &Index_GetAllCompilationUnits_Call{Call: _e.mock.On("GetAllCompilationUnits", context1)}
}

func (_c *Index_GetAllCompilationUnits_Call) Run(run func(context1 context.Context)) *Index_GetAllCompilationUnits_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *Index_GetAllCompilationUnits_Call) Return(compilationUnitCh <-chan *policy.CompilationUnit) *Index_GetAllCompilationUnits_Call {
	_c.Call.Return(compilationUnitCh)
	return _c
}

func (_c *Index_GetAllCompilationUnits_Call) RunAndReturn(run func(context1 context.Context) <-chan *policy.CompilationUnit) *Index_GetAllCompilationUnits_Call {
	_c.Call.Return(run)
	return _c
}

// GetAllMatching provides a mock function for the type Index
func (_mock *Index) GetAllMatching(moduleIDs []namer.ModuleID) ([]*policy.CompilationUnit, error) {
	ret := _mock.Called(moduleIDs)

	if len(ret) == 0 {
		panic("no return value specified for GetAllMatching")
	}

	var r0 []*policy.CompilationUnit
	var r1 error
	if returnFunc, ok := ret.Get(0).(func([]namer.ModuleID) ([]*policy.CompilationUnit, error)); ok {
		return returnFunc(moduleIDs)
	}
	if returnFunc, ok := ret.Get(0).(func([]namer.ModuleID) []*policy.CompilationUnit); ok {
		r0 = returnFunc(moduleIDs)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*policy.CompilationUnit)
		}
	}
	if returnFunc, ok := ret.Get(1).(func([]namer.ModuleID) error); ok {
		r1 = returnFunc(moduleIDs)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

// Index_GetAllMatching_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllMatching'
type Index_GetAllMatching_Call struct {
	*mock.Call
}

// GetAllMatching is a helper method to define mock.On call
//   - moduleIDs []namer.ModuleID
func (_e *Index_Expecter) GetAllMatching(moduleIDs interface{}) *Index_GetAllMatching_Call {
	return &Index_GetAllMatching_Call{Call: _e.mock.On("GetAllMatching", moduleIDs)}
}

func (_c *Index_GetAllMatching_Call) Run(run func(moduleIDs []namer.ModuleID)) *Index_GetAllMatching_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 []namer.ModuleID
		if args[0] != nil {
			arg0 = args[0].([]namer.ModuleID)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *Index_GetAllMatching_Call) Return(compilationUnits []*policy.CompilationUnit, err error) *Index_GetAllMatching_Call {
	_c.Call.Return(compilationUnits, err)
	return _c
}

func (_c *Index_GetAllMatching_Call) RunAndReturn(run func(moduleIDs []namer.ModuleID) ([]*policy.CompilationUnit, error)) *Index_GetAllMatching_Call {
	_c.Call.Return(run)
	return _c
}

// GetCompilationUnits provides a mock function for the type Index
func (_mock *Index) GetCompilationUnits(moduleIDs ...namer.ModuleID) (map[namer.ModuleID]*policy.CompilationUnit, error) {
	var tmpRet mock.Arguments
	if len(moduleIDs) > 0 {
		tmpRet = _mock.Called(moduleIDs)
	} else {
		tmpRet = _mock.Called()
	}
	ret := tmpRet

	if len(ret) == 0 {
		panic("no return value specified for GetCompilationUnits")
	}

	var r0 map[namer.ModuleID]*policy.CompilationUnit
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(...namer.ModuleID) (map[namer.ModuleID]*policy.CompilationUnit, error)); ok {
		return returnFunc(moduleIDs...)
	}
	if returnFunc, ok := ret.Get(0).(func(...namer.ModuleID) map[namer.ModuleID]*policy.CompilationUnit); ok {
		r0 = returnFunc(moduleIDs...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(map[namer.ModuleID]*policy.CompilationUnit)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(...namer.ModuleID) error); ok {
		r1 = returnFunc(moduleIDs...)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

// Index_GetCompilationUnits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCompilationUnits'
type Index_GetCompilationUnits_Call struct {
	*mock.Call
}

// GetCompilationUnits is a helper method to define mock.On call
//   - moduleIDs ...namer.ModuleID
func (_e *Index_Expecter) GetCompilationUnits(moduleIDs ...interface{}) *Index_GetCompilationUnits_Call {
	return &Index_GetCompilationUnits_Call{Call: _e.mock.On("GetCompilationUnits",
		append([]interface{}{}, moduleIDs...)...)}
}

func (_c *Index_GetCompilationUnits_Call) Run(run func(moduleIDs ...namer.ModuleID)) *Index_GetCompilationUnits_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 []namer.ModuleID
		var variadicArgs []namer.ModuleID
		if len(args) > 0 {
			variadicArgs = args[0].([]namer.ModuleID)
		}
		arg0 = variadicArgs
		run(
			arg0...,
		)
	})
	return _c
}

func (_c *Index_GetCompilationUnits_Call) Return(moduleIDToCompilationUnit map[namer.ModuleID]*policy.CompilationUnit, err error) *Index_GetCompilationUnits_Call {
	_c.Call.Return(moduleIDToCompilationUnit, err)
	return _c
}

func (_c *Index_GetCompilationUnits_Call) RunAndReturn(run func(moduleIDs ...namer.ModuleID) (map[namer.ModuleID]*policy.CompilationUnit, error)) *Index_GetCompilationUnits_Call {
	_c.Call.Return(run)
	return _c
}

// GetDependents provides a mock function for the type Index
func (_mock *Index) GetDependents(moduleIDs ...namer.ModuleID) (map[namer.ModuleID][]namer.ModuleID, error) {
	var tmpRet mock.Arguments
	if len(moduleIDs) > 0 {
		tmpRet = _mock.Called(moduleIDs)
	} else {
		tmpRet = _mock.Called()
	}
	ret := tmpRet

	if len(ret) == 0 {
		panic("no return value specified for GetDependents")
	}

	var r0 map[namer.ModuleID][]namer.ModuleID
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(...namer.ModuleID) (map[namer.ModuleID][]namer.ModuleID, error)); ok {
		return returnFunc(moduleIDs...)
	}
	if returnFunc, ok := ret.Get(0).(func(...namer.ModuleID) map[namer.ModuleID][]namer.ModuleID); ok {
		r0 = returnFunc(moduleIDs...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(map[namer.ModuleID][]namer.ModuleID)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(...namer.ModuleID) error); ok {
		r1 = returnFunc(moduleIDs...)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

// Index_GetDependents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDependents'
type Index_GetDependents_Call struct {
	*mock.Call
}

// GetDependents is a helper method to define mock.On call
//   - moduleIDs ...namer.ModuleID
func (_e *Index_Expecter) GetDependents(moduleIDs ...interface{}) *Index_GetDependents_Call {
	return &Index_GetDependents_Call{Call: _e.mock.On("GetDependents",
		append([]interface{}{}, moduleIDs...)...)}
}

func (_c *Index_GetDependents_Call) Run(run func(moduleIDs ...namer.ModuleID)) *Index_GetDependents_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 []namer.ModuleID
		var variadicArgs []namer.ModuleID
		if len(args) > 0 {
			variadicArgs = args[0].([]namer.ModuleID)
		}
		arg0 = variadicArgs
		run(
			arg0...,
		)
	})
	return _c
}

func (_c *Index_GetDependents_Call) Return(moduleIDToModuleIDs map[namer.ModuleID][]namer.ModuleID, err error) *Index_GetDependents_Call {
	_c.Call.Return(moduleIDToModuleIDs, err)
	return _c
}

func (_c *Index_GetDependents_Call) RunAndReturn(run func(moduleIDs ...namer.ModuleID) (map[namer.ModuleID][]namer.ModuleID, error)) *Index_GetDependents_Call {
	_c.Call.Return(run)
	return _c
}

// GetFiles provides a mock function for the type Index
func (_mock *Index) GetFiles() []string {
	ret := _mock.Called()

	if len(ret) == 0 {
		panic("no return value specified for GetFiles")
	}

	var r0 []string
	if returnFunc, ok := ret.Get(0).(func() []string); ok {
		r0 = returnFunc()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]string)
		}
	}
	return r0
}

// Index_GetFiles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFiles'
type Index_GetFiles_Call struct {
	*mock.Call
}

// GetFiles is a helper method to define mock.On call
func (_e *Index_Expecter) GetFiles() *Index_GetFiles_Call {
	return &Index_GetFiles_Call{Call: _e.mock.On("GetFiles")}
}

func (_c *Index_GetFiles_Call) Run(run func()) *Index_GetFiles_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *Index_GetFiles_Call) Return(strings []string) *Index_GetFiles_Call {
	_c.Call.Return(strings)
	return _c
}

func (_c *Index_GetFiles_Call) RunAndReturn(run func() []string) *Index_GetFiles_Call {
	_c.Call.Return(run)
	return _c
}

// GetFirstMatch provides a mock function for the type Index
func (_mock *Index) GetFirstMatch(moduleIDs []namer.ModuleID) (*policy.CompilationUnit, error) {
	ret := _mock.Called(moduleIDs)

	if len(ret) == 0 {
		panic("no return value specified for GetFirstMatch")
	}

	var r0 *policy.CompilationUnit
	var r1 error
	if returnFunc, ok := ret.Get(0).(func([]namer.ModuleID) (*policy.CompilationUnit, error)); ok {
		return returnFunc(moduleIDs)
	}
	if returnFunc, ok := ret.Get(0).(func([]namer.ModuleID) *policy.CompilationUnit); ok {
		r0 = returnFunc(moduleIDs)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*policy.CompilationUnit)
		}
	}
	if returnFunc, ok := ret.Get(1).(func([]namer.ModuleID) error); ok {
		r1 = returnFunc(moduleIDs)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

// Index_GetFirstMatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFirstMatch'
type Index_GetFirstMatch_Call struct {
	*mock.Call
}

// GetFirstMatch is a helper method to define mock.On call
//   - moduleIDs []namer.ModuleID
func (_e *Index_Expecter) GetFirstMatch(moduleIDs interface{}) *Index_GetFirstMatch_Call {
	return &Index_GetFirstMatch_Call{Call: _e.mock.On("GetFirstMatch", moduleIDs)}
}

func (_c *Index_GetFirstMatch_Call) Run(run func(moduleIDs []namer.ModuleID)) *Index_GetFirstMatch_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 []namer.ModuleID
		if args[0] != nil {
			arg0 = args[0].([]namer.ModuleID)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *Index_GetFirstMatch_Call) Return(compilationUnit *policy.CompilationUnit, err error) *Index_GetFirstMatch_Call {
	_c.Call.Return(compilationUnit, err)
	return _c
}

func (_c *Index_GetFirstMatch_Call) RunAndReturn(run func(moduleIDs []namer.ModuleID) (*policy.CompilationUnit, error)) *Index_GetFirstMatch_Call {
	_c.Call.Return(run)
	return _c
}

// InspectPolicies provides a mock function for the type Index
func (_mock *Index) InspectPolicies(context1 context.Context, strings ...string) (map[string]*responsev1.InspectPoliciesResponse_Result, error) {
	var tmpRet mock.Arguments
	if len(strings) > 0 {
		tmpRet = _mock.Called(context1, strings)
	} else {
		tmpRet = _mock.Called(context1)
	}
	ret := tmpRet

	if len(ret) == 0 {
		panic("no return value specified for InspectPolicies")
	}

	var r0 map[string]*responsev1.InspectPoliciesResponse_Result
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, ...string) (map[string]*responsev1.InspectPoliciesResponse_Result, error)); ok {
		return returnFunc(context1, strings...)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, ...string) map[string]*responsev1.InspectPoliciesResponse_Result); ok {
		r0 = returnFunc(context1, strings...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(map[string]*responsev1.InspectPoliciesResponse_Result)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, ...string) error); ok {
		r1 = returnFunc(context1, strings...)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

// Index_InspectPolicies_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InspectPolicies'
type Index_InspectPolicies_Call struct {
	*mock.Call
}

// InspectPolicies is a helper method to define mock.On call
//   - context1 context.Context
//   - strings ...string
func (_e *Index_Expecter) InspectPolicies(context1 interface{}, strings ...interface{}) *Index_InspectPolicies_Call {
	return &Index_InspectPolicies_Call{Call: _e.mock.On("InspectPolicies",
		append([]interface{}{context1}, strings...)...)}
}

func (_c *Index_InspectPolicies_Call) Run(run func(context1 context.Context, strings ...string)) *Index_InspectPolicies_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 []string
		var variadicArgs []string
		if len(args) > 1 {
			variadicArgs = args[1].([]string)
		}
		arg1 = variadicArgs
		run(
			arg0,
			arg1...,
		)
	})
	return _c
}

func (_c *Index_InspectPolicies_Call) Return(stringToInspectPoliciesResponse_Result map[string]*responsev1.InspectPoliciesResponse_Result, err error) *Index_InspectPolicies_Call {
	_c.Call.Return(stringToInspectPoliciesResponse_Result, err)
	return _c
}

func (_c *Index_InspectPolicies_Call) RunAndReturn(run func(context1 context.Context, strings ...string) (map[string]*responsev1.InspectPoliciesResponse_Result, error)) *Index_InspectPolicies_Call {
	_c.Call.Return(run)
	return _c
}

// ListPolicyIDs provides a mock function for the type Index
func (_mock *Index) ListPolicyIDs(context1 context.Context, strings ...string) ([]string, error) {
	var tmpRet mock.Arguments
	if len(strings) > 0 {
		tmpRet = _mock.Called(context1, strings)
	} else {
		tmpRet = _mock.Called(context1)
	}
	ret := tmpRet

	if len(ret) == 0 {
		panic("no return value specified for ListPolicyIDs")
	}

	var r0 []string
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, ...string) ([]string, error)); ok {
		return returnFunc(context1, strings...)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, ...string) []string); ok {
		r0 = returnFunc(context1, strings...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]string)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, ...string) error); ok {
		r1 = returnFunc(context1, strings...)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

// Index_ListPolicyIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPolicyIDs'
type Index_ListPolicyIDs_Call struct {
	*mock.Call
}

// ListPolicyIDs is a helper method to define mock.On call
//   - context1 context.Context
//   - strings ...string
func (_e *Index_Expecter) ListPolicyIDs(context1 interface{}, strings ...interface{}) *Index_ListPolicyIDs_Call {
	return &Index_ListPolicyIDs_Call{Call: _e.mock.On("ListPolicyIDs",
		append([]interface{}{context1}, strings...)...)}
}

func (_c *Index_ListPolicyIDs_Call) Run(run func(context1 context.Context, strings ...string)) *Index_ListPolicyIDs_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 []string
		var variadicArgs []string
		if len(args) > 1 {
			variadicArgs = args[1].([]string)
		}
		arg1 = variadicArgs
		run(
			arg0,
			arg1...,
		)
	})
	return _c
}

func (_c *Index_ListPolicyIDs_Call) Return(strings1 []string, err error) *Index_ListPolicyIDs_Call {
	_c.Call.Return(strings1, err)
	return _c
}

func (_c *Index_ListPolicyIDs_Call) RunAndReturn(run func(context1 context.Context, strings ...string) ([]string, error)) *Index_ListPolicyIDs_Call {
	_c.Call.Return(run)
	return _c
}

// ListSchemaIDs provides a mock function for the type Index
func (_mock *Index) ListSchemaIDs(context1 context.Context) ([]string, error) {
	ret := _mock.Called(context1)

	if len(ret) == 0 {
		panic("no return value specified for ListSchemaIDs")
	}

	var r0 []string
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok {
		return returnFunc(context1)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context) []string); ok {
		r0 = returnFunc(context1)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]string)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
		r1 = returnFunc(context1)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

// Index_ListSchemaIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSchemaIDs'
type Index_ListSchemaIDs_Call struct {
	*mock.Call
}

// ListSchemaIDs is a helper method to define mock.On call
//   - context1 context.Context
func (_e *Index_Expecter) ListSchemaIDs(context1 interface{}) *Index_ListSchemaIDs_Call {
	return &Index_ListSchemaIDs_Call{Call: _e.mock.On("ListSchemaIDs", context1)}
}

func (_c *Index_ListSchemaIDs_Call) Run(run func(context1 context.Context)) *Index_ListSchemaIDs_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *Index_ListSchemaIDs_Call) Return(strings []string, err error) *Index_ListSchemaIDs_Call {
	_c.Call.Return(strings, err)
	return _c
}

func (_c *Index_ListSchemaIDs_Call) RunAndReturn(run func(context1 context.Context) ([]string, error)) *Index_ListSchemaIDs_Call {
	_c.Call.Return(run)
	return _c
}

// LoadPolicy provides a mock function for the type Index
func (_mock *Index) LoadPolicy(context1 context.Context, strings ...string) ([]*policy.Wrapper, error) {
	var tmpRet mock.Arguments
	if len(strings) > 0 {
		tmpRet = _mock.Called(context1, strings)
	} else {
		tmpRet = _mock.Called(context1)
	}
	ret := tmpRet

	if len(ret) == 0 {
		panic("no return value specified for LoadPolicy")
	}

	var r0 []*policy.Wrapper
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, ...string) ([]*policy.Wrapper, error)); ok {
		return returnFunc(context1, strings...)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, ...string) []*policy.Wrapper); ok {
		r0 = returnFunc(context1, strings...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*policy.Wrapper)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, ...string) error); ok {
		r1 = returnFunc(context1, strings...)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

// Index_LoadPolicy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadPolicy'
type Index_LoadPolicy_Call struct {
	*mock.Call
}

// LoadPolicy is a helper method to define mock.On call
//   - context1 context.Context
//   - strings ...string
func (_e *Index_Expecter) LoadPolicy(context1 interface{}, strings ...interface{}) *Index_LoadPolicy_Call {
	return &Index_LoadPolicy_Call{Call: _e.mock.On("LoadPolicy",
		append([]interface{}{context1}, strings...)...)}
}

func (_c *Index_LoadPolicy_Call) Run(run func(context1 context.Context, strings ...string)) *Index_LoadPolicy_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 []string
		var variadicArgs []string
		if len(args) > 1 {
			variadicArgs = args[1].([]string)
		}
		arg1 = variadicArgs
		run(
			arg0,
			arg1...,
		)
	})
	return _c
}

func (_c *Index_LoadPolicy_Call) Return(wrappers []*policy.Wrapper, err error) *Index_LoadPolicy_Call {
	_c.Call.Return(wrappers, err)
	return _c
}

func (_c *Index_LoadPolicy_Call) RunAndReturn(run func(context1 context.Context, strings ...string) ([]*policy.Wrapper, error)) *Index_LoadPolicy_Call {
	_c.Call.Return(run)
	return _c
}

// LoadSchema provides a mock function for the type Index
func (_mock *Index) LoadSchema(context1 context.Context, s string) (io.ReadCloser, error) {
	ret := _mock.Called(context1, s)

	if len(ret) == 0 {
		panic("no return value specified for LoadSchema")
	}

	var r0 io.ReadCloser
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (io.ReadCloser, error)); ok {
		return returnFunc(context1, s)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) io.ReadCloser); ok {
		r0 = returnFunc(context1, s)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(io.ReadCloser)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = returnFunc(context1, s)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

// Index_LoadSchema_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadSchema'
type Index_LoadSchema_Call struct {
	*mock.Call
}

// LoadSchema is a helper method to define mock.On call
//   - context1 context.Context
//   - s string
func (_e *Index_Expecter) LoadSchema(context1 interface{}, s interface{}) *Index_LoadSchema_Call {
	return &Index_LoadSchema_Call{Call: _e.mock.On("LoadSchema", context1, s)}
}

func (_c *Index_LoadSchema_Call) Run(run func(context1 context.Context, s string)) *Index_LoadSchema_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Index_LoadSchema_Call) Return(readCloser io.ReadCloser, err error) *Index_LoadSchema_Call {
	_c.Call.Return(readCloser, err)
	return _c
}

func (_c *Index_LoadSchema_Call) RunAndReturn(run func(context1 context.Context, s string) (io.ReadCloser, error)) *Index_LoadSchema_Call {
	_c.Call.Return(run)
	return _c
}

// Reload provides a mock function for the type Index
func (_mock *Index) Reload(context1 context.Context) ([]storage.Event, error) {
	ret := _mock.Called(context1)

	if len(ret) == 0 {
		panic("no return value specified for Reload")
	}

	var r0 []storage.Event
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context) ([]storage.Event, error)); ok {
		return returnFunc(context1)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context) []storage.Event); ok {
		r0 = returnFunc(context1)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]storage.Event)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
		r1 = returnFunc(context1)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

// Index_Reload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reload'
type Index_Reload_Call struct {
	*mock.Call
}

// Reload is a helper method to define mock.On call
//   - context1 context.Context
func (_e *Index_Expecter) Reload(context1 interface{}) *Index_Reload_Call {
	return &Index_Reload_Call{Call: _e.mock.On("Reload", context1)}
}

func (_c *Index_Reload_Call) Run(run func(context1 context.Context)) *Index_Reload_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *Index_Reload_Call) Return(events []storage.Event, err error) *Index_Reload_Call {
	_c.Call.Return(events, err)
	return _c
}

func (_c *Index_Reload_Call) RunAndReturn(run func(context1 context.Context) ([]storage.Event, error)) *Index_Reload_Call {
	_c.Call.Return(run)
	return _c
}

// RepoStats provides a mock function for the type Index
func (_mock *Index) RepoStats(context1 context.Context) storage.RepoStats {
	ret := _mock.Called(context1)

	if len(ret) == 0 {
		panic("no return value specified for RepoStats")
	}

	var r0 storage.RepoStats
	if returnFunc, ok := ret.Get(0).(func(context.Context) storage.RepoStats); ok {
		r0 = returnFunc(context1)
	} else {
		r0 = ret.Get(0).(storage.RepoStats)
	}
	return r0
}

// Index_RepoStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RepoStats'
type Index_RepoStats_Call struct {
	*mock.Call
}

// RepoStats is a helper method to define mock.On call
//   - context1 context.Context
func (_e *Index_Expecter) RepoStats(context1 interface{}) *Index_RepoStats_Call {
	return &Index_RepoStats_Call{Call: _e.mock.On("RepoStats", context1)}
}

func (_c *Index_RepoStats_Call) Run(run func(context1 context.Context)) *Index_RepoStats_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *Index_RepoStats_Call) Return(repoStats storage.RepoStats) *Index_RepoStats_Call {
	_c.Call.Return(repoStats)
	return _c
}

func (_c *Index_RepoStats_Call) RunAndReturn(run func(context1 context.Context) storage.RepoStats) *Index_RepoStats_Call {
	_c.Call.Return(run)
	return _c
}
