// 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"

	"github.com/cerbos/cloud-api/bundle"
	"github.com/cerbos/cloud-api/bundle/v2"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type ClientV2_Expecter struct {
	mock *mock.Mock
}

func (_m *ClientV2) EXPECT() *ClientV2_Expecter {
	return &ClientV2_Expecter{mock: &_m.Mock}
}

// BootstrapBundle provides a mock function for the type ClientV2
func (_mock *ClientV2) BootstrapBundle(context1 context.Context, source v2.Source) (string, []byte, error) {
	ret := _mock.Called(context1, source)

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

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

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

// BootstrapBundle is a helper method to define mock.On call
//   - context1 context.Context
//   - source v2.Source
func (_e *ClientV2_Expecter) BootstrapBundle(context1 interface{}, source interface{}) *ClientV2_BootstrapBundle_Call {
	return &ClientV2_BootstrapBundle_Call{Call: _e.mock.On("BootstrapBundle", context1, source)}
}

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

func (_c *ClientV2_BootstrapBundle_Call) Return(s string, bytes []byte, err error) *ClientV2_BootstrapBundle_Call {
	_c.Call.Return(s, bytes, err)
	return _c
}

func (_c *ClientV2_BootstrapBundle_Call) RunAndReturn(run func(context1 context.Context, source v2.Source) (string, []byte, error)) *ClientV2_BootstrapBundle_Call {
	_c.Call.Return(run)
	return _c
}

// GetBundle provides a mock function for the type ClientV2
func (_mock *ClientV2) GetBundle(context1 context.Context, source v2.Source) (string, []byte, error) {
	ret := _mock.Called(context1, source)

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

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

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

// GetBundle is a helper method to define mock.On call
//   - context1 context.Context
//   - source v2.Source
func (_e *ClientV2_Expecter) GetBundle(context1 interface{}, source interface{}) *ClientV2_GetBundle_Call {
	return &ClientV2_GetBundle_Call{Call: _e.mock.On("GetBundle", context1, source)}
}

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

func (_c *ClientV2_GetBundle_Call) Return(s string, bytes []byte, err error) *ClientV2_GetBundle_Call {
	_c.Call.Return(s, bytes, err)
	return _c
}

func (_c *ClientV2_GetBundle_Call) RunAndReturn(run func(context1 context.Context, source v2.Source) (string, []byte, error)) *ClientV2_GetBundle_Call {
	_c.Call.Return(run)
	return _c
}

// GetCachedBundle provides a mock function for the type ClientV2
func (_mock *ClientV2) GetCachedBundle(source v2.Source) (string, error) {
	ret := _mock.Called(source)

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

	var r0 string
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(v2.Source) (string, error)); ok {
		return returnFunc(source)
	}
	if returnFunc, ok := ret.Get(0).(func(v2.Source) string); ok {
		r0 = returnFunc(source)
	} else {
		r0 = ret.Get(0).(string)
	}
	if returnFunc, ok := ret.Get(1).(func(v2.Source) error); ok {
		r1 = returnFunc(source)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetCachedBundle is a helper method to define mock.On call
//   - source v2.Source
func (_e *ClientV2_Expecter) GetCachedBundle(source interface{}) *ClientV2_GetCachedBundle_Call {
	return &ClientV2_GetCachedBundle_Call{Call: _e.mock.On("GetCachedBundle", source)}
}

func (_c *ClientV2_GetCachedBundle_Call) Run(run func(source v2.Source)) *ClientV2_GetCachedBundle_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 v2.Source
		if args[0] != nil {
			arg0 = args[0].(v2.Source)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *ClientV2_GetCachedBundle_Call) Return(s string, err error) *ClientV2_GetCachedBundle_Call {
	_c.Call.Return(s, err)
	return _c
}

func (_c *ClientV2_GetCachedBundle_Call) RunAndReturn(run func(source v2.Source) (string, error)) *ClientV2_GetCachedBundle_Call {
	_c.Call.Return(run)
	return _c
}

// WatchBundle provides a mock function for the type ClientV2
func (_mock *ClientV2) WatchBundle(context1 context.Context, source v2.Source) (bundle.WatchHandle, error) {
	ret := _mock.Called(context1, source)

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

	var r0 bundle.WatchHandle
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, v2.Source) (bundle.WatchHandle, error)); ok {
		return returnFunc(context1, source)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, v2.Source) bundle.WatchHandle); ok {
		r0 = returnFunc(context1, source)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(bundle.WatchHandle)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, v2.Source) error); ok {
		r1 = returnFunc(context1, source)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// WatchBundle is a helper method to define mock.On call
//   - context1 context.Context
//   - source v2.Source
func (_e *ClientV2_Expecter) WatchBundle(context1 interface{}, source interface{}) *ClientV2_WatchBundle_Call {
	return &ClientV2_WatchBundle_Call{Call: _e.mock.On("WatchBundle", context1, source)}
}

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

func (_c *ClientV2_WatchBundle_Call) Return(watchHandle bundle.WatchHandle, err error) *ClientV2_WatchBundle_Call {
	_c.Call.Return(watchHandle, err)
	return _c
}

func (_c *ClientV2_WatchBundle_Call) RunAndReturn(run func(context1 context.Context, source v2.Source) (bundle.WatchHandle, error)) *ClientV2_WatchBundle_Call {
	_c.Call.Return(run)
	return _c
}
