// 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 (
	"github.com/cerbos/cerbos/internal/storage/hub"
	"github.com/cerbos/cloud-api/bundle"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type ClientProvider_Expecter struct {
	mock *mock.Mock
}

func (_m *ClientProvider) EXPECT() *ClientProvider_Expecter {
	return &ClientProvider_Expecter{mock: &_m.Mock}
}

// V1 provides a mock function for the type ClientProvider
func (_mock *ClientProvider) V1(clientConf bundle.ClientConf) (hub.ClientV1, error) {
	ret := _mock.Called(clientConf)

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

	var r0 hub.ClientV1
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(bundle.ClientConf) (hub.ClientV1, error)); ok {
		return returnFunc(clientConf)
	}
	if returnFunc, ok := ret.Get(0).(func(bundle.ClientConf) hub.ClientV1); ok {
		r0 = returnFunc(clientConf)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(hub.ClientV1)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(bundle.ClientConf) error); ok {
		r1 = returnFunc(clientConf)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// V1 is a helper method to define mock.On call
//   - clientConf bundle.ClientConf
func (_e *ClientProvider_Expecter) V1(clientConf interface{}) *ClientProvider_V1_Call {
	return &ClientProvider_V1_Call{Call: _e.mock.On("V1", clientConf)}
}

func (_c *ClientProvider_V1_Call) Run(run func(clientConf bundle.ClientConf)) *ClientProvider_V1_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 bundle.ClientConf
		if args[0] != nil {
			arg0 = args[0].(bundle.ClientConf)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *ClientProvider_V1_Call) Return(clientV1 hub.ClientV1, err error) *ClientProvider_V1_Call {
	_c.Call.Return(clientV1, err)
	return _c
}

func (_c *ClientProvider_V1_Call) RunAndReturn(run func(clientConf bundle.ClientConf) (hub.ClientV1, error)) *ClientProvider_V1_Call {
	_c.Call.Return(run)
	return _c
}

// V2 provides a mock function for the type ClientProvider
func (_mock *ClientProvider) V2(clientConf bundle.ClientConf) (hub.ClientV2, error) {
	ret := _mock.Called(clientConf)

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

	var r0 hub.ClientV2
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(bundle.ClientConf) (hub.ClientV2, error)); ok {
		return returnFunc(clientConf)
	}
	if returnFunc, ok := ret.Get(0).(func(bundle.ClientConf) hub.ClientV2); ok {
		r0 = returnFunc(clientConf)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(hub.ClientV2)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(bundle.ClientConf) error); ok {
		r1 = returnFunc(clientConf)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// V2 is a helper method to define mock.On call
//   - clientConf bundle.ClientConf
func (_e *ClientProvider_Expecter) V2(clientConf interface{}) *ClientProvider_V2_Call {
	return &ClientProvider_V2_Call{Call: _e.mock.On("V2", clientConf)}
}

func (_c *ClientProvider_V2_Call) Run(run func(clientConf bundle.ClientConf)) *ClientProvider_V2_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 bundle.ClientConf
		if args[0] != nil {
			arg0 = args[0].(bundle.ClientConf)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *ClientProvider_V2_Call) Return(clientV2 hub.ClientV2, err error) *ClientProvider_V2_Call {
	_c.Call.Return(clientV2, err)
	return _c
}

func (_c *ClientProvider_V2_Call) RunAndReturn(run func(clientConf bundle.ClientConf) (hub.ClientV2, error)) *ClientProvider_V2_Call {
	_c.Call.Return(run)
	return _c
}
