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

package cachemock

import (
	"github.com/hashicorp/consul/internal/controller/cache"
	"github.com/hashicorp/consul/internal/controller/cache/index"
	"github.com/hashicorp/consul/proto-public/pbresource"
	mock "github.com/stretchr/testify/mock"
)

// NewCache creates a new instance of Cache. 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 NewCache(t interface {
	mock.TestingT
	Cleanup(func())
}) *Cache {
	mock := &Cache{}
	mock.Mock.Test(t)

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

	return mock
}

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

type Cache_Expecter struct {
	mock *mock.Mock
}

func (_m *Cache) EXPECT() *Cache_Expecter {
	return &Cache_Expecter{mock: &_m.Mock}
}

// AddIndex provides a mock function for the type Cache
func (_mock *Cache) AddIndex(it *pbresource.Type, index1 *index.Index) error {
	ret := _mock.Called(it, index1)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(*pbresource.Type, *index.Index) error); ok {
		r0 = returnFunc(it, index1)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// AddIndex is a helper method to define mock.On call
//   - it *pbresource.Type
//   - index1 *index.Index
func (_e *Cache_Expecter) AddIndex(it interface{}, index1 interface{}) *Cache_AddIndex_Call {
	return &Cache_AddIndex_Call{Call: _e.mock.On("AddIndex", it, index1)}
}

func (_c *Cache_AddIndex_Call) Run(run func(it *pbresource.Type, index1 *index.Index)) *Cache_AddIndex_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *pbresource.Type
		if args[0] != nil {
			arg0 = args[0].(*pbresource.Type)
		}
		var arg1 *index.Index
		if args[1] != nil {
			arg1 = args[1].(*index.Index)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

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

func (_c *Cache_AddIndex_Call) RunAndReturn(run func(it *pbresource.Type, index1 *index.Index) error) *Cache_AddIndex_Call {
	_c.Call.Return(run)
	return _c
}

// AddQuery provides a mock function for the type Cache
func (_mock *Cache) AddQuery(name string, fn cache.Query) error {
	ret := _mock.Called(name, fn)

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

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

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

// AddQuery is a helper method to define mock.On call
//   - name string
//   - fn cache.Query
func (_e *Cache_Expecter) AddQuery(name interface{}, fn interface{}) *Cache_AddQuery_Call {
	return &Cache_AddQuery_Call{Call: _e.mock.On("AddQuery", name, fn)}
}

func (_c *Cache_AddQuery_Call) Run(run func(name string, fn cache.Query)) *Cache_AddQuery_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 string
		if args[0] != nil {
			arg0 = args[0].(string)
		}
		var arg1 cache.Query
		if args[1] != nil {
			arg1 = args[1].(cache.Query)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

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

func (_c *Cache_AddQuery_Call) RunAndReturn(run func(name string, fn cache.Query) error) *Cache_AddQuery_Call {
	_c.Call.Return(run)
	return _c
}

// AddType provides a mock function for the type Cache
func (_mock *Cache) AddType(it *pbresource.Type) {
	_mock.Called(it)
	return
}

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

// AddType is a helper method to define mock.On call
//   - it *pbresource.Type
func (_e *Cache_Expecter) AddType(it interface{}) *Cache_AddType_Call {
	return &Cache_AddType_Call{Call: _e.mock.On("AddType", it)}
}

func (_c *Cache_AddType_Call) Run(run func(it *pbresource.Type)) *Cache_AddType_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *pbresource.Type
		if args[0] != nil {
			arg0 = args[0].(*pbresource.Type)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *Cache_AddType_Call) Return() *Cache_AddType_Call {
	_c.Call.Return()
	return _c
}

func (_c *Cache_AddType_Call) RunAndReturn(run func(it *pbresource.Type)) *Cache_AddType_Call {
	_c.Run(run)
	return _c
}

// Delete provides a mock function for the type Cache
func (_mock *Cache) Delete(r *pbresource.Resource) error {
	ret := _mock.Called(r)

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

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

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

// Delete is a helper method to define mock.On call
//   - r *pbresource.Resource
func (_e *Cache_Expecter) Delete(r interface{}) *Cache_Delete_Call {
	return &Cache_Delete_Call{Call: _e.mock.On("Delete", r)}
}

func (_c *Cache_Delete_Call) Run(run func(r *pbresource.Resource)) *Cache_Delete_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *pbresource.Resource
		if args[0] != nil {
			arg0 = args[0].(*pbresource.Resource)
		}
		run(
			arg0,
		)
	})
	return _c
}

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

func (_c *Cache_Delete_Call) RunAndReturn(run func(r *pbresource.Resource) error) *Cache_Delete_Call {
	_c.Call.Return(run)
	return _c
}

// Get provides a mock function for the type Cache
func (_mock *Cache) Get(it *pbresource.Type, indexName string, args ...any) (*pbresource.Resource, error) {
	var _ca []interface{}
	_ca = append(_ca, it, indexName)
	_ca = append(_ca, args...)
	ret := _mock.Called(_ca...)

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

	var r0 *pbresource.Resource
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(*pbresource.Type, string, ...any) (*pbresource.Resource, error)); ok {
		return returnFunc(it, indexName, args...)
	}
	if returnFunc, ok := ret.Get(0).(func(*pbresource.Type, string, ...any) *pbresource.Resource); ok {
		r0 = returnFunc(it, indexName, args...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*pbresource.Resource)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(*pbresource.Type, string, ...any) error); ok {
		r1 = returnFunc(it, indexName, args...)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Get is a helper method to define mock.On call
//   - it *pbresource.Type
//   - indexName string
//   - args ...any
func (_e *Cache_Expecter) Get(it interface{}, indexName interface{}, args ...interface{}) *Cache_Get_Call {
	return &Cache_Get_Call{Call: _e.mock.On("Get",
		append([]interface{}{it, indexName}, args...)...)}
}

func (_c *Cache_Get_Call) Run(run func(it *pbresource.Type, indexName string, args ...any)) *Cache_Get_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *pbresource.Type
		if args[0] != nil {
			arg0 = args[0].(*pbresource.Type)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 []any
		variadicArgs := make([]any, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(any)
			}
		}
		arg2 = variadicArgs
		run(
			arg0,
			arg1,
			arg2...,
		)
	})
	return _c
}

func (_c *Cache_Get_Call) Return(resource *pbresource.Resource, err error) *Cache_Get_Call {
	_c.Call.Return(resource, err)
	return _c
}

func (_c *Cache_Get_Call) RunAndReturn(run func(it *pbresource.Type, indexName string, args ...any) (*pbresource.Resource, error)) *Cache_Get_Call {
	_c.Call.Return(run)
	return _c
}

// Insert provides a mock function for the type Cache
func (_mock *Cache) Insert(r *pbresource.Resource) error {
	ret := _mock.Called(r)

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

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

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

// Insert is a helper method to define mock.On call
//   - r *pbresource.Resource
func (_e *Cache_Expecter) Insert(r interface{}) *Cache_Insert_Call {
	return &Cache_Insert_Call{Call: _e.mock.On("Insert", r)}
}

func (_c *Cache_Insert_Call) Run(run func(r *pbresource.Resource)) *Cache_Insert_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *pbresource.Resource
		if args[0] != nil {
			arg0 = args[0].(*pbresource.Resource)
		}
		run(
			arg0,
		)
	})
	return _c
}

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

func (_c *Cache_Insert_Call) RunAndReturn(run func(r *pbresource.Resource) error) *Cache_Insert_Call {
	_c.Call.Return(run)
	return _c
}

// List provides a mock function for the type Cache
func (_mock *Cache) List(it *pbresource.Type, indexName string, args ...any) ([]*pbresource.Resource, error) {
	var _ca []interface{}
	_ca = append(_ca, it, indexName)
	_ca = append(_ca, args...)
	ret := _mock.Called(_ca...)

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

	var r0 []*pbresource.Resource
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(*pbresource.Type, string, ...any) ([]*pbresource.Resource, error)); ok {
		return returnFunc(it, indexName, args...)
	}
	if returnFunc, ok := ret.Get(0).(func(*pbresource.Type, string, ...any) []*pbresource.Resource); ok {
		r0 = returnFunc(it, indexName, args...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*pbresource.Resource)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(*pbresource.Type, string, ...any) error); ok {
		r1 = returnFunc(it, indexName, args...)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// List is a helper method to define mock.On call
//   - it *pbresource.Type
//   - indexName string
//   - args ...any
func (_e *Cache_Expecter) List(it interface{}, indexName interface{}, args ...interface{}) *Cache_List_Call {
	return &Cache_List_Call{Call: _e.mock.On("List",
		append([]interface{}{it, indexName}, args...)...)}
}

func (_c *Cache_List_Call) Run(run func(it *pbresource.Type, indexName string, args ...any)) *Cache_List_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *pbresource.Type
		if args[0] != nil {
			arg0 = args[0].(*pbresource.Type)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 []any
		variadicArgs := make([]any, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(any)
			}
		}
		arg2 = variadicArgs
		run(
			arg0,
			arg1,
			arg2...,
		)
	})
	return _c
}

func (_c *Cache_List_Call) Return(resources []*pbresource.Resource, err error) *Cache_List_Call {
	_c.Call.Return(resources, err)
	return _c
}

func (_c *Cache_List_Call) RunAndReturn(run func(it *pbresource.Type, indexName string, args ...any) ([]*pbresource.Resource, error)) *Cache_List_Call {
	_c.Call.Return(run)
	return _c
}

// ListIterator provides a mock function for the type Cache
func (_mock *Cache) ListIterator(it *pbresource.Type, indexName string, args ...any) (cache.ResourceIterator, error) {
	var _ca []interface{}
	_ca = append(_ca, it, indexName)
	_ca = append(_ca, args...)
	ret := _mock.Called(_ca...)

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

	var r0 cache.ResourceIterator
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(*pbresource.Type, string, ...any) (cache.ResourceIterator, error)); ok {
		return returnFunc(it, indexName, args...)
	}
	if returnFunc, ok := ret.Get(0).(func(*pbresource.Type, string, ...any) cache.ResourceIterator); ok {
		r0 = returnFunc(it, indexName, args...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(cache.ResourceIterator)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(*pbresource.Type, string, ...any) error); ok {
		r1 = returnFunc(it, indexName, args...)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// ListIterator is a helper method to define mock.On call
//   - it *pbresource.Type
//   - indexName string
//   - args ...any
func (_e *Cache_Expecter) ListIterator(it interface{}, indexName interface{}, args ...interface{}) *Cache_ListIterator_Call {
	return &Cache_ListIterator_Call{Call: _e.mock.On("ListIterator",
		append([]interface{}{it, indexName}, args...)...)}
}

func (_c *Cache_ListIterator_Call) Run(run func(it *pbresource.Type, indexName string, args ...any)) *Cache_ListIterator_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *pbresource.Type
		if args[0] != nil {
			arg0 = args[0].(*pbresource.Type)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 []any
		variadicArgs := make([]any, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(any)
			}
		}
		arg2 = variadicArgs
		run(
			arg0,
			arg1,
			arg2...,
		)
	})
	return _c
}

func (_c *Cache_ListIterator_Call) Return(resourceIterator cache.ResourceIterator, err error) *Cache_ListIterator_Call {
	_c.Call.Return(resourceIterator, err)
	return _c
}

func (_c *Cache_ListIterator_Call) RunAndReturn(run func(it *pbresource.Type, indexName string, args ...any) (cache.ResourceIterator, error)) *Cache_ListIterator_Call {
	_c.Call.Return(run)
	return _c
}

// Parents provides a mock function for the type Cache
func (_mock *Cache) Parents(it *pbresource.Type, indexName string, args ...any) ([]*pbresource.Resource, error) {
	var _ca []interface{}
	_ca = append(_ca, it, indexName)
	_ca = append(_ca, args...)
	ret := _mock.Called(_ca...)

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

	var r0 []*pbresource.Resource
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(*pbresource.Type, string, ...any) ([]*pbresource.Resource, error)); ok {
		return returnFunc(it, indexName, args...)
	}
	if returnFunc, ok := ret.Get(0).(func(*pbresource.Type, string, ...any) []*pbresource.Resource); ok {
		r0 = returnFunc(it, indexName, args...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*pbresource.Resource)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(*pbresource.Type, string, ...any) error); ok {
		r1 = returnFunc(it, indexName, args...)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Parents is a helper method to define mock.On call
//   - it *pbresource.Type
//   - indexName string
//   - args ...any
func (_e *Cache_Expecter) Parents(it interface{}, indexName interface{}, args ...interface{}) *Cache_Parents_Call {
	return &Cache_Parents_Call{Call: _e.mock.On("Parents",
		append([]interface{}{it, indexName}, args...)...)}
}

func (_c *Cache_Parents_Call) Run(run func(it *pbresource.Type, indexName string, args ...any)) *Cache_Parents_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *pbresource.Type
		if args[0] != nil {
			arg0 = args[0].(*pbresource.Type)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 []any
		variadicArgs := make([]any, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(any)
			}
		}
		arg2 = variadicArgs
		run(
			arg0,
			arg1,
			arg2...,
		)
	})
	return _c
}

func (_c *Cache_Parents_Call) Return(resources []*pbresource.Resource, err error) *Cache_Parents_Call {
	_c.Call.Return(resources, err)
	return _c
}

func (_c *Cache_Parents_Call) RunAndReturn(run func(it *pbresource.Type, indexName string, args ...any) ([]*pbresource.Resource, error)) *Cache_Parents_Call {
	_c.Call.Return(run)
	return _c
}

// ParentsIterator provides a mock function for the type Cache
func (_mock *Cache) ParentsIterator(it *pbresource.Type, indexName string, args ...any) (cache.ResourceIterator, error) {
	var _ca []interface{}
	_ca = append(_ca, it, indexName)
	_ca = append(_ca, args...)
	ret := _mock.Called(_ca...)

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

	var r0 cache.ResourceIterator
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(*pbresource.Type, string, ...any) (cache.ResourceIterator, error)); ok {
		return returnFunc(it, indexName, args...)
	}
	if returnFunc, ok := ret.Get(0).(func(*pbresource.Type, string, ...any) cache.ResourceIterator); ok {
		r0 = returnFunc(it, indexName, args...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(cache.ResourceIterator)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(*pbresource.Type, string, ...any) error); ok {
		r1 = returnFunc(it, indexName, args...)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// ParentsIterator is a helper method to define mock.On call
//   - it *pbresource.Type
//   - indexName string
//   - args ...any
func (_e *Cache_Expecter) ParentsIterator(it interface{}, indexName interface{}, args ...interface{}) *Cache_ParentsIterator_Call {
	return &Cache_ParentsIterator_Call{Call: _e.mock.On("ParentsIterator",
		append([]interface{}{it, indexName}, args...)...)}
}

func (_c *Cache_ParentsIterator_Call) Run(run func(it *pbresource.Type, indexName string, args ...any)) *Cache_ParentsIterator_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *pbresource.Type
		if args[0] != nil {
			arg0 = args[0].(*pbresource.Type)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 []any
		variadicArgs := make([]any, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(any)
			}
		}
		arg2 = variadicArgs
		run(
			arg0,
			arg1,
			arg2...,
		)
	})
	return _c
}

func (_c *Cache_ParentsIterator_Call) Return(resourceIterator cache.ResourceIterator, err error) *Cache_ParentsIterator_Call {
	_c.Call.Return(resourceIterator, err)
	return _c
}

func (_c *Cache_ParentsIterator_Call) RunAndReturn(run func(it *pbresource.Type, indexName string, args ...any) (cache.ResourceIterator, error)) *Cache_ParentsIterator_Call {
	_c.Call.Return(run)
	return _c
}

// Query provides a mock function for the type Cache
func (_mock *Cache) Query(name string, args ...any) (cache.ResourceIterator, error) {
	var _ca []interface{}
	_ca = append(_ca, name)
	_ca = append(_ca, args...)
	ret := _mock.Called(_ca...)

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

	var r0 cache.ResourceIterator
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(string, ...any) (cache.ResourceIterator, error)); ok {
		return returnFunc(name, args...)
	}
	if returnFunc, ok := ret.Get(0).(func(string, ...any) cache.ResourceIterator); ok {
		r0 = returnFunc(name, args...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(cache.ResourceIterator)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(string, ...any) error); ok {
		r1 = returnFunc(name, args...)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Query is a helper method to define mock.On call
//   - name string
//   - args ...any
func (_e *Cache_Expecter) Query(name interface{}, args ...interface{}) *Cache_Query_Call {
	return &Cache_Query_Call{Call: _e.mock.On("Query",
		append([]interface{}{name}, args...)...)}
}

func (_c *Cache_Query_Call) Run(run func(name string, args ...any)) *Cache_Query_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 string
		if args[0] != nil {
			arg0 = args[0].(string)
		}
		var arg1 []any
		variadicArgs := make([]any, len(args)-1)
		for i, a := range args[1:] {
			if a != nil {
				variadicArgs[i] = a.(any)
			}
		}
		arg1 = variadicArgs
		run(
			arg0,
			arg1...,
		)
	})
	return _c
}

func (_c *Cache_Query_Call) Return(resourceIterator cache.ResourceIterator, err error) *Cache_Query_Call {
	_c.Call.Return(resourceIterator, err)
	return _c
}

func (_c *Cache_Query_Call) RunAndReturn(run func(name string, args ...any) (cache.ResourceIterator, error)) *Cache_Query_Call {
	_c.Call.Return(run)
	return _c
}
