//                           _       _
// __      _____  __ ___   ___  __ _| |_ ___
// \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \
//  \ V  V /  __/ (_| |\ V /| | (_| | ||  __/
//   \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___|
//
//  Copyright © 2016 - 2026 Weaviate B.V. All rights reserved.
//
//  CONTACT: hello@weaviate.io
//

// Code generated by mockery v2.53.5. DO NOT EDIT.

package replica

import (
	context "context"

	additional "github.com/weaviate/weaviate/entities/additional"

	filters "github.com/weaviate/weaviate/entities/filters"

	hashtree "github.com/weaviate/weaviate/usecases/replica/hashtree"

	mock "github.com/stretchr/testify/mock"

	objects "github.com/weaviate/weaviate/usecases/objects"

	search "github.com/weaviate/weaviate/entities/search"

	strfmt "github.com/go-openapi/strfmt"

	types "github.com/weaviate/weaviate/cluster/router/types"
)

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

type MockRClient_Expecter struct {
	mock *mock.Mock
}

func (_m *MockRClient) EXPECT() *MockRClient_Expecter {
	return &MockRClient_Expecter{mock: &_m.Mock}
}

// DigestObjects provides a mock function with given fields: ctx, host, index, shard, ids, numRetries
func (_m *MockRClient) DigestObjects(ctx context.Context, host string, index string, shard string, ids []strfmt.UUID, numRetries int) ([]types.RepairResponse, error) {
	ret := _m.Called(ctx, host, index, shard, ids, numRetries)

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

	var r0 []types.RepairResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, []strfmt.UUID, int) ([]types.RepairResponse, error)); ok {
		return rf(ctx, host, index, shard, ids, numRetries)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, []strfmt.UUID, int) []types.RepairResponse); ok {
		r0 = rf(ctx, host, index, shard, ids, numRetries)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]types.RepairResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, string, string, []strfmt.UUID, int) error); ok {
		r1 = rf(ctx, host, index, shard, ids, numRetries)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// DigestObjects is a helper method to define mock.On call
//   - ctx context.Context
//   - host string
//   - index string
//   - shard string
//   - ids []strfmt.UUID
//   - numRetries int
func (_e *MockRClient_Expecter) DigestObjects(ctx interface{}, host interface{}, index interface{}, shard interface{}, ids interface{}, numRetries interface{}) *MockRClient_DigestObjects_Call {
	return &MockRClient_DigestObjects_Call{Call: _e.mock.On("DigestObjects", ctx, host, index, shard, ids, numRetries)}
}

func (_c *MockRClient_DigestObjects_Call) Run(run func(ctx context.Context, host string, index string, shard string, ids []strfmt.UUID, numRetries int)) *MockRClient_DigestObjects_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].([]strfmt.UUID), args[5].(int))
	})
	return _c
}

func (_c *MockRClient_DigestObjects_Call) Return(_a0 []types.RepairResponse, _a1 error) *MockRClient_DigestObjects_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockRClient_DigestObjects_Call) RunAndReturn(run func(context.Context, string, string, string, []strfmt.UUID, int) ([]types.RepairResponse, error)) *MockRClient_DigestObjects_Call {
	_c.Call.Return(run)
	return _c
}

// DigestObjectsInRange provides a mock function with given fields: ctx, host, index, shard, initialUUID, finalUUID, limit
func (_m *MockRClient) DigestObjectsInRange(ctx context.Context, host string, index string, shard string, initialUUID strfmt.UUID, finalUUID strfmt.UUID, limit int) ([]types.RepairResponse, error) {
	ret := _m.Called(ctx, host, index, shard, initialUUID, finalUUID, limit)

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

	var r0 []types.RepairResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, strfmt.UUID, strfmt.UUID, int) ([]types.RepairResponse, error)); ok {
		return rf(ctx, host, index, shard, initialUUID, finalUUID, limit)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, strfmt.UUID, strfmt.UUID, int) []types.RepairResponse); ok {
		r0 = rf(ctx, host, index, shard, initialUUID, finalUUID, limit)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]types.RepairResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, string, string, strfmt.UUID, strfmt.UUID, int) error); ok {
		r1 = rf(ctx, host, index, shard, initialUUID, finalUUID, limit)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// DigestObjectsInRange is a helper method to define mock.On call
//   - ctx context.Context
//   - host string
//   - index string
//   - shard string
//   - initialUUID strfmt.UUID
//   - finalUUID strfmt.UUID
//   - limit int
func (_e *MockRClient_Expecter) DigestObjectsInRange(ctx interface{}, host interface{}, index interface{}, shard interface{}, initialUUID interface{}, finalUUID interface{}, limit interface{}) *MockRClient_DigestObjectsInRange_Call {
	return &MockRClient_DigestObjectsInRange_Call{Call: _e.mock.On("DigestObjectsInRange", ctx, host, index, shard, initialUUID, finalUUID, limit)}
}

func (_c *MockRClient_DigestObjectsInRange_Call) Run(run func(ctx context.Context, host string, index string, shard string, initialUUID strfmt.UUID, finalUUID strfmt.UUID, limit int)) *MockRClient_DigestObjectsInRange_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(strfmt.UUID), args[5].(strfmt.UUID), args[6].(int))
	})
	return _c
}

func (_c *MockRClient_DigestObjectsInRange_Call) Return(_a0 []types.RepairResponse, _a1 error) *MockRClient_DigestObjectsInRange_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockRClient_DigestObjectsInRange_Call) RunAndReturn(run func(context.Context, string, string, string, strfmt.UUID, strfmt.UUID, int) ([]types.RepairResponse, error)) *MockRClient_DigestObjectsInRange_Call {
	_c.Call.Return(run)
	return _c
}

// FetchObject provides a mock function with given fields: _a0, host, index, shard, id, props, _a6, numRetries
func (_m *MockRClient) FetchObject(_a0 context.Context, host string, index string, shard string, id strfmt.UUID, props search.SelectProperties, _a6 additional.Properties, numRetries int) (Replica, error) {
	ret := _m.Called(_a0, host, index, shard, id, props, _a6, numRetries)

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

	var r0 Replica
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, strfmt.UUID, search.SelectProperties, additional.Properties, int) (Replica, error)); ok {
		return rf(_a0, host, index, shard, id, props, _a6, numRetries)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, strfmt.UUID, search.SelectProperties, additional.Properties, int) Replica); ok {
		r0 = rf(_a0, host, index, shard, id, props, _a6, numRetries)
	} else {
		r0 = ret.Get(0).(Replica)
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, string, string, strfmt.UUID, search.SelectProperties, additional.Properties, int) error); ok {
		r1 = rf(_a0, host, index, shard, id, props, _a6, numRetries)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// FetchObject is a helper method to define mock.On call
//   - _a0 context.Context
//   - host string
//   - index string
//   - shard string
//   - id strfmt.UUID
//   - props search.SelectProperties
//   - _a6 additional.Properties
//   - numRetries int
func (_e *MockRClient_Expecter) FetchObject(_a0 interface{}, host interface{}, index interface{}, shard interface{}, id interface{}, props interface{}, _a6 interface{}, numRetries interface{}) *MockRClient_FetchObject_Call {
	return &MockRClient_FetchObject_Call{Call: _e.mock.On("FetchObject", _a0, host, index, shard, id, props, _a6, numRetries)}
}

func (_c *MockRClient_FetchObject_Call) Run(run func(_a0 context.Context, host string, index string, shard string, id strfmt.UUID, props search.SelectProperties, _a6 additional.Properties, numRetries int)) *MockRClient_FetchObject_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(strfmt.UUID), args[5].(search.SelectProperties), args[6].(additional.Properties), args[7].(int))
	})
	return _c
}

func (_c *MockRClient_FetchObject_Call) Return(_a0 Replica, _a1 error) *MockRClient_FetchObject_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockRClient_FetchObject_Call) RunAndReturn(run func(context.Context, string, string, string, strfmt.UUID, search.SelectProperties, additional.Properties, int) (Replica, error)) *MockRClient_FetchObject_Call {
	_c.Call.Return(run)
	return _c
}

// FetchObjects provides a mock function with given fields: _a0, host, index, shard, ids
func (_m *MockRClient) FetchObjects(_a0 context.Context, host string, index string, shard string, ids []strfmt.UUID) ([]Replica, error) {
	ret := _m.Called(_a0, host, index, shard, ids)

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

	var r0 []Replica
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, []strfmt.UUID) ([]Replica, error)); ok {
		return rf(_a0, host, index, shard, ids)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, []strfmt.UUID) []Replica); ok {
		r0 = rf(_a0, host, index, shard, ids)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]Replica)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, string, string, []strfmt.UUID) error); ok {
		r1 = rf(_a0, host, index, shard, ids)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// FetchObjects is a helper method to define mock.On call
//   - _a0 context.Context
//   - host string
//   - index string
//   - shard string
//   - ids []strfmt.UUID
func (_e *MockRClient_Expecter) FetchObjects(_a0 interface{}, host interface{}, index interface{}, shard interface{}, ids interface{}) *MockRClient_FetchObjects_Call {
	return &MockRClient_FetchObjects_Call{Call: _e.mock.On("FetchObjects", _a0, host, index, shard, ids)}
}

func (_c *MockRClient_FetchObjects_Call) Run(run func(_a0 context.Context, host string, index string, shard string, ids []strfmt.UUID)) *MockRClient_FetchObjects_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].([]strfmt.UUID))
	})
	return _c
}

func (_c *MockRClient_FetchObjects_Call) Return(_a0 []Replica, _a1 error) *MockRClient_FetchObjects_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockRClient_FetchObjects_Call) RunAndReturn(run func(context.Context, string, string, string, []strfmt.UUID) ([]Replica, error)) *MockRClient_FetchObjects_Call {
	_c.Call.Return(run)
	return _c
}

// FindUUIDs provides a mock function with given fields: ctx, host, index, shard, _a4
func (_m *MockRClient) FindUUIDs(ctx context.Context, host string, index string, shard string, _a4 *filters.LocalFilter) ([]strfmt.UUID, error) {
	ret := _m.Called(ctx, host, index, shard, _a4)

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

	var r0 []strfmt.UUID
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, *filters.LocalFilter) ([]strfmt.UUID, error)); ok {
		return rf(ctx, host, index, shard, _a4)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, *filters.LocalFilter) []strfmt.UUID); ok {
		r0 = rf(ctx, host, index, shard, _a4)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]strfmt.UUID)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, string, string, *filters.LocalFilter) error); ok {
		r1 = rf(ctx, host, index, shard, _a4)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// FindUUIDs is a helper method to define mock.On call
//   - ctx context.Context
//   - host string
//   - index string
//   - shard string
//   - _a4 *filters.LocalFilter
func (_e *MockRClient_Expecter) FindUUIDs(ctx interface{}, host interface{}, index interface{}, shard interface{}, _a4 interface{}) *MockRClient_FindUUIDs_Call {
	return &MockRClient_FindUUIDs_Call{Call: _e.mock.On("FindUUIDs", ctx, host, index, shard, _a4)}
}

func (_c *MockRClient_FindUUIDs_Call) Run(run func(ctx context.Context, host string, index string, shard string, _a4 *filters.LocalFilter)) *MockRClient_FindUUIDs_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(*filters.LocalFilter))
	})
	return _c
}

func (_c *MockRClient_FindUUIDs_Call) Return(_a0 []strfmt.UUID, _a1 error) *MockRClient_FindUUIDs_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockRClient_FindUUIDs_Call) RunAndReturn(run func(context.Context, string, string, string, *filters.LocalFilter) ([]strfmt.UUID, error)) *MockRClient_FindUUIDs_Call {
	_c.Call.Return(run)
	return _c
}

// HashTreeLevel provides a mock function with given fields: ctx, host, index, shard, level, discriminant
func (_m *MockRClient) HashTreeLevel(ctx context.Context, host string, index string, shard string, level int, discriminant *hashtree.Bitset) ([]hashtree.Digest, error) {
	ret := _m.Called(ctx, host, index, shard, level, discriminant)

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

	var r0 []hashtree.Digest
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, int, *hashtree.Bitset) ([]hashtree.Digest, error)); ok {
		return rf(ctx, host, index, shard, level, discriminant)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, int, *hashtree.Bitset) []hashtree.Digest); ok {
		r0 = rf(ctx, host, index, shard, level, discriminant)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]hashtree.Digest)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, string, string, int, *hashtree.Bitset) error); ok {
		r1 = rf(ctx, host, index, shard, level, discriminant)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// HashTreeLevel is a helper method to define mock.On call
//   - ctx context.Context
//   - host string
//   - index string
//   - shard string
//   - level int
//   - discriminant *hashtree.Bitset
func (_e *MockRClient_Expecter) HashTreeLevel(ctx interface{}, host interface{}, index interface{}, shard interface{}, level interface{}, discriminant interface{}) *MockRClient_HashTreeLevel_Call {
	return &MockRClient_HashTreeLevel_Call{Call: _e.mock.On("HashTreeLevel", ctx, host, index, shard, level, discriminant)}
}

func (_c *MockRClient_HashTreeLevel_Call) Run(run func(ctx context.Context, host string, index string, shard string, level int, discriminant *hashtree.Bitset)) *MockRClient_HashTreeLevel_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(int), args[5].(*hashtree.Bitset))
	})
	return _c
}

func (_c *MockRClient_HashTreeLevel_Call) Return(digests []hashtree.Digest, err error) *MockRClient_HashTreeLevel_Call {
	_c.Call.Return(digests, err)
	return _c
}

func (_c *MockRClient_HashTreeLevel_Call) RunAndReturn(run func(context.Context, string, string, string, int, *hashtree.Bitset) ([]hashtree.Digest, error)) *MockRClient_HashTreeLevel_Call {
	_c.Call.Return(run)
	return _c
}

// OverwriteObjects provides a mock function with given fields: _a0, host, index, shard, _a4
func (_m *MockRClient) OverwriteObjects(_a0 context.Context, host string, index string, shard string, _a4 []*objects.VObject) ([]types.RepairResponse, error) {
	ret := _m.Called(_a0, host, index, shard, _a4)

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

	var r0 []types.RepairResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, []*objects.VObject) ([]types.RepairResponse, error)); ok {
		return rf(_a0, host, index, shard, _a4)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, []*objects.VObject) []types.RepairResponse); ok {
		r0 = rf(_a0, host, index, shard, _a4)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]types.RepairResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, string, string, []*objects.VObject) error); ok {
		r1 = rf(_a0, host, index, shard, _a4)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// OverwriteObjects is a helper method to define mock.On call
//   - _a0 context.Context
//   - host string
//   - index string
//   - shard string
//   - _a4 []*objects.VObject
func (_e *MockRClient_Expecter) OverwriteObjects(_a0 interface{}, host interface{}, index interface{}, shard interface{}, _a4 interface{}) *MockRClient_OverwriteObjects_Call {
	return &MockRClient_OverwriteObjects_Call{Call: _e.mock.On("OverwriteObjects", _a0, host, index, shard, _a4)}
}

func (_c *MockRClient_OverwriteObjects_Call) Run(run func(_a0 context.Context, host string, index string, shard string, _a4 []*objects.VObject)) *MockRClient_OverwriteObjects_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].([]*objects.VObject))
	})
	return _c
}

func (_c *MockRClient_OverwriteObjects_Call) Return(_a0 []types.RepairResponse, _a1 error) *MockRClient_OverwriteObjects_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockRClient_OverwriteObjects_Call) RunAndReturn(run func(context.Context, string, string, string, []*objects.VObject) ([]types.RepairResponse, error)) *MockRClient_OverwriteObjects_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
