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

package secret

import (
	context "context"

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

	v0alpha1 "github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1"
)

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

type MockInlineSecureValueSupport_Expecter struct {
	mock *mock.Mock
}

func (_m *MockInlineSecureValueSupport) EXPECT() *MockInlineSecureValueSupport_Expecter {
	return &MockInlineSecureValueSupport_Expecter{mock: &_m.Mock}
}

// CanReference provides a mock function with given fields: ctx, owner, names
func (_m *MockInlineSecureValueSupport) CanReference(ctx context.Context, owner v0alpha1.ObjectReference, names ...string) error {
	_va := make([]interface{}, len(names))
	for _i := range names {
		_va[_i] = names[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx, owner)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, v0alpha1.ObjectReference, ...string) error); ok {
		r0 = rf(ctx, owner, names...)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// CanReference is a helper method to define mock.On call
//   - ctx context.Context
//   - owner v0alpha1.ObjectReference
//   - names ...string
func (_e *MockInlineSecureValueSupport_Expecter) CanReference(ctx interface{}, owner interface{}, names ...interface{}) *MockInlineSecureValueSupport_CanReference_Call {
	return &MockInlineSecureValueSupport_CanReference_Call{Call: _e.mock.On("CanReference",
		append([]interface{}{ctx, owner}, names...)...)}
}

func (_c *MockInlineSecureValueSupport_CanReference_Call) Run(run func(ctx context.Context, owner v0alpha1.ObjectReference, names ...string)) *MockInlineSecureValueSupport_CanReference_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]string, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(string)
			}
		}
		run(args[0].(context.Context), args[1].(v0alpha1.ObjectReference), variadicArgs...)
	})
	return _c
}

func (_c *MockInlineSecureValueSupport_CanReference_Call) Return(_a0 error) *MockInlineSecureValueSupport_CanReference_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockInlineSecureValueSupport_CanReference_Call) RunAndReturn(run func(context.Context, v0alpha1.ObjectReference, ...string) error) *MockInlineSecureValueSupport_CanReference_Call {
	_c.Call.Return(run)
	return _c
}

// CreateInline provides a mock function with given fields: ctx, owner, value
func (_m *MockInlineSecureValueSupport) CreateInline(ctx context.Context, owner v0alpha1.ObjectReference, value v0alpha1.RawSecureValue) (string, error) {
	ret := _m.Called(ctx, owner, value)

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

	var r0 string
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, v0alpha1.ObjectReference, v0alpha1.RawSecureValue) (string, error)); ok {
		return rf(ctx, owner, value)
	}
	if rf, ok := ret.Get(0).(func(context.Context, v0alpha1.ObjectReference, v0alpha1.RawSecureValue) string); ok {
		r0 = rf(ctx, owner, value)
	} else {
		r0 = ret.Get(0).(string)
	}

	if rf, ok := ret.Get(1).(func(context.Context, v0alpha1.ObjectReference, v0alpha1.RawSecureValue) error); ok {
		r1 = rf(ctx, owner, value)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// CreateInline is a helper method to define mock.On call
//   - ctx context.Context
//   - owner v0alpha1.ObjectReference
//   - value v0alpha1.RawSecureValue
func (_e *MockInlineSecureValueSupport_Expecter) CreateInline(ctx interface{}, owner interface{}, value interface{}) *MockInlineSecureValueSupport_CreateInline_Call {
	return &MockInlineSecureValueSupport_CreateInline_Call{Call: _e.mock.On("CreateInline", ctx, owner, value)}
}

func (_c *MockInlineSecureValueSupport_CreateInline_Call) Run(run func(ctx context.Context, owner v0alpha1.ObjectReference, value v0alpha1.RawSecureValue)) *MockInlineSecureValueSupport_CreateInline_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(v0alpha1.ObjectReference), args[2].(v0alpha1.RawSecureValue))
	})
	return _c
}

func (_c *MockInlineSecureValueSupport_CreateInline_Call) Return(_a0 string, _a1 error) *MockInlineSecureValueSupport_CreateInline_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockInlineSecureValueSupport_CreateInline_Call) RunAndReturn(run func(context.Context, v0alpha1.ObjectReference, v0alpha1.RawSecureValue) (string, error)) *MockInlineSecureValueSupport_CreateInline_Call {
	_c.Call.Return(run)
	return _c
}

// DeleteWhenOwnedByResource provides a mock function with given fields: ctx, owner, names
func (_m *MockInlineSecureValueSupport) DeleteWhenOwnedByResource(ctx context.Context, owner v0alpha1.ObjectReference, names ...string) error {
	_va := make([]interface{}, len(names))
	for _i := range names {
		_va[_i] = names[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx, owner)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, v0alpha1.ObjectReference, ...string) error); ok {
		r0 = rf(ctx, owner, names...)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// DeleteWhenOwnedByResource is a helper method to define mock.On call
//   - ctx context.Context
//   - owner v0alpha1.ObjectReference
//   - names ...string
func (_e *MockInlineSecureValueSupport_Expecter) DeleteWhenOwnedByResource(ctx interface{}, owner interface{}, names ...interface{}) *MockInlineSecureValueSupport_DeleteWhenOwnedByResource_Call {
	return &MockInlineSecureValueSupport_DeleteWhenOwnedByResource_Call{Call: _e.mock.On("DeleteWhenOwnedByResource",
		append([]interface{}{ctx, owner}, names...)...)}
}

func (_c *MockInlineSecureValueSupport_DeleteWhenOwnedByResource_Call) Run(run func(ctx context.Context, owner v0alpha1.ObjectReference, names ...string)) *MockInlineSecureValueSupport_DeleteWhenOwnedByResource_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]string, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(string)
			}
		}
		run(args[0].(context.Context), args[1].(v0alpha1.ObjectReference), variadicArgs...)
	})
	return _c
}

func (_c *MockInlineSecureValueSupport_DeleteWhenOwnedByResource_Call) Return(_a0 error) *MockInlineSecureValueSupport_DeleteWhenOwnedByResource_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockInlineSecureValueSupport_DeleteWhenOwnedByResource_Call) RunAndReturn(run func(context.Context, v0alpha1.ObjectReference, ...string) error) *MockInlineSecureValueSupport_DeleteWhenOwnedByResource_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
