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

package actionsgithubcom

import (
	"context"

	"github.com/actions/actions-runner-controller/apis/actions.github.com/v1alpha1/appconfig"
	"github.com/actions/actions-runner-controller/controllers/actions.github.com/multiclient"
	"github.com/actions/actions-runner-controller/controllers/actions.github.com/object"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type MockSecretResolver_Expecter struct {
	mock *mock.Mock
}

func (_m *MockSecretResolver) EXPECT() *MockSecretResolver_Expecter {
	return &MockSecretResolver_Expecter{mock: &_m.Mock}
}

// GetActionsService provides a mock function for the type MockSecretResolver
func (_mock *MockSecretResolver) GetActionsService(ctx context.Context, obj object.ActionsGitHubObject) (multiclient.Client, error) {
	ret := _mock.Called(ctx, obj)

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

	var r0 multiclient.Client
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, object.ActionsGitHubObject) (multiclient.Client, error)); ok {
		return returnFunc(ctx, obj)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, object.ActionsGitHubObject) multiclient.Client); ok {
		r0 = returnFunc(ctx, obj)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(multiclient.Client)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, object.ActionsGitHubObject) error); ok {
		r1 = returnFunc(ctx, obj)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetActionsService is a helper method to define mock.On call
//   - ctx context.Context
//   - obj object.ActionsGitHubObject
func (_e *MockSecretResolver_Expecter) GetActionsService(ctx interface{}, obj interface{}) *MockSecretResolver_GetActionsService_Call {
	return &MockSecretResolver_GetActionsService_Call{Call: _e.mock.On("GetActionsService", ctx, obj)}
}

func (_c *MockSecretResolver_GetActionsService_Call) Run(run func(ctx context.Context, obj object.ActionsGitHubObject)) *MockSecretResolver_GetActionsService_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 object.ActionsGitHubObject
		if args[1] != nil {
			arg1 = args[1].(object.ActionsGitHubObject)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *MockSecretResolver_GetActionsService_Call) Return(client multiclient.Client, err error) *MockSecretResolver_GetActionsService_Call {
	_c.Call.Return(client, err)
	return _c
}

func (_c *MockSecretResolver_GetActionsService_Call) RunAndReturn(run func(ctx context.Context, obj object.ActionsGitHubObject) (multiclient.Client, error)) *MockSecretResolver_GetActionsService_Call {
	_c.Call.Return(run)
	return _c
}

// GetAppConfig provides a mock function for the type MockSecretResolver
func (_mock *MockSecretResolver) GetAppConfig(ctx context.Context, obj object.ActionsGitHubObject) (*appconfig.AppConfig, error) {
	ret := _mock.Called(ctx, obj)

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

	var r0 *appconfig.AppConfig
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, object.ActionsGitHubObject) (*appconfig.AppConfig, error)); ok {
		return returnFunc(ctx, obj)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, object.ActionsGitHubObject) *appconfig.AppConfig); ok {
		r0 = returnFunc(ctx, obj)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*appconfig.AppConfig)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, object.ActionsGitHubObject) error); ok {
		r1 = returnFunc(ctx, obj)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetAppConfig is a helper method to define mock.On call
//   - ctx context.Context
//   - obj object.ActionsGitHubObject
func (_e *MockSecretResolver_Expecter) GetAppConfig(ctx interface{}, obj interface{}) *MockSecretResolver_GetAppConfig_Call {
	return &MockSecretResolver_GetAppConfig_Call{Call: _e.mock.On("GetAppConfig", ctx, obj)}
}

func (_c *MockSecretResolver_GetAppConfig_Call) Run(run func(ctx context.Context, obj object.ActionsGitHubObject)) *MockSecretResolver_GetAppConfig_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 object.ActionsGitHubObject
		if args[1] != nil {
			arg1 = args[1].(object.ActionsGitHubObject)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *MockSecretResolver_GetAppConfig_Call) Return(appConfig *appconfig.AppConfig, err error) *MockSecretResolver_GetAppConfig_Call {
	_c.Call.Return(appConfig, err)
	return _c
}

func (_c *MockSecretResolver_GetAppConfig_Call) RunAndReturn(run func(ctx context.Context, obj object.ActionsGitHubObject) (*appconfig.AppConfig, error)) *MockSecretResolver_GetAppConfig_Call {
	_c.Call.Return(run)
	return _c
}
