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

package mocks

import (
	context "context"

	cluster "github.com/caraml-dev/turing/api/turing/cluster"
	batchv1 "k8s.io/api/batch/v1"

	corev1 "k8s.io/api/core/v1"

	io "io"

	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

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

	rbacv1 "k8s.io/api/rbac/v1"

	v1 "k8s.io/api/policy/v1"

	v1beta2 "github.com/GoogleCloudPlatform/spark-on-k8s-operator/pkg/apis/sparkoperator.k8s.io/v1beta2"
)

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

// ApplyConfigMap provides a mock function with given fields: ctx, namespace, configMap
func (_m *Controller) ApplyConfigMap(ctx context.Context, namespace string, configMap *cluster.ConfigMap) error {
	ret := _m.Called(ctx, namespace, configMap)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string, *cluster.ConfigMap) error); ok {
		r0 = rf(ctx, namespace, configMap)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// ApplyIstioVirtualService provides a mock function with given fields: ctx, routerEndpoint
func (_m *Controller) ApplyIstioVirtualService(ctx context.Context, routerEndpoint *cluster.VirtualService) error {
	ret := _m.Called(ctx, routerEndpoint)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, *cluster.VirtualService) error); ok {
		r0 = rf(ctx, routerEndpoint)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// ApplyPodDisruptionBudget provides a mock function with given fields: ctx, pdb
func (_m *Controller) ApplyPodDisruptionBudget(ctx context.Context, pdb cluster.PodDisruptionBudget) (*v1.PodDisruptionBudget, error) {
	ret := _m.Called(ctx, pdb)

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

	var r0 *v1.PodDisruptionBudget
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, cluster.PodDisruptionBudget) (*v1.PodDisruptionBudget, error)); ok {
		return rf(ctx, pdb)
	}
	if rf, ok := ret.Get(0).(func(context.Context, cluster.PodDisruptionBudget) *v1.PodDisruptionBudget); ok {
		r0 = rf(ctx, pdb)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v1.PodDisruptionBudget)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, cluster.PodDisruptionBudget) error); ok {
		r1 = rf(ctx, pdb)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// CreateJob provides a mock function with given fields: ctx, namespace, job
func (_m *Controller) CreateJob(ctx context.Context, namespace string, job cluster.Job) (*batchv1.Job, error) {
	ret := _m.Called(ctx, namespace, job)

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

	var r0 *batchv1.Job
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, cluster.Job) (*batchv1.Job, error)); ok {
		return rf(ctx, namespace, job)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, cluster.Job) *batchv1.Job); ok {
		r0 = rf(ctx, namespace, job)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*batchv1.Job)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, cluster.Job) error); ok {
		r1 = rf(ctx, namespace, job)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// CreateNamespace provides a mock function with given fields: ctx, name
func (_m *Controller) CreateNamespace(ctx context.Context, name string) error {
	ret := _m.Called(ctx, name)

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

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

	return r0
}

// CreateRole provides a mock function with given fields: ctx, namespace, role
func (_m *Controller) CreateRole(ctx context.Context, namespace string, role *cluster.Role) (*rbacv1.Role, error) {
	ret := _m.Called(ctx, namespace, role)

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

	var r0 *rbacv1.Role
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, *cluster.Role) (*rbacv1.Role, error)); ok {
		return rf(ctx, namespace, role)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, *cluster.Role) *rbacv1.Role); ok {
		r0 = rf(ctx, namespace, role)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*rbacv1.Role)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, *cluster.Role) error); ok {
		r1 = rf(ctx, namespace, role)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// CreateRoleBinding provides a mock function with given fields: ctx, namespace, roleBinding
func (_m *Controller) CreateRoleBinding(ctx context.Context, namespace string, roleBinding *cluster.RoleBinding) (*rbacv1.RoleBinding, error) {
	ret := _m.Called(ctx, namespace, roleBinding)

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

	var r0 *rbacv1.RoleBinding
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, *cluster.RoleBinding) (*rbacv1.RoleBinding, error)); ok {
		return rf(ctx, namespace, roleBinding)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, *cluster.RoleBinding) *rbacv1.RoleBinding); ok {
		r0 = rf(ctx, namespace, roleBinding)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*rbacv1.RoleBinding)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, *cluster.RoleBinding) error); ok {
		r1 = rf(ctx, namespace, roleBinding)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// CreateSecret provides a mock function with given fields: ctx, secret
func (_m *Controller) CreateSecret(ctx context.Context, secret *cluster.Secret) error {
	ret := _m.Called(ctx, secret)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, *cluster.Secret) error); ok {
		r0 = rf(ctx, secret)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// CreateServiceAccount provides a mock function with given fields: ctx, namespace, serviceAccount
func (_m *Controller) CreateServiceAccount(ctx context.Context, namespace string, serviceAccount *cluster.ServiceAccount) (*corev1.ServiceAccount, error) {
	ret := _m.Called(ctx, namespace, serviceAccount)

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

	var r0 *corev1.ServiceAccount
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, *cluster.ServiceAccount) (*corev1.ServiceAccount, error)); ok {
		return rf(ctx, namespace, serviceAccount)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, *cluster.ServiceAccount) *corev1.ServiceAccount); ok {
		r0 = rf(ctx, namespace, serviceAccount)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*corev1.ServiceAccount)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, *cluster.ServiceAccount) error); ok {
		r1 = rf(ctx, namespace, serviceAccount)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// CreateSparkApplication provides a mock function with given fields: ctx, namespace, request
func (_m *Controller) CreateSparkApplication(ctx context.Context, namespace string, request *cluster.CreateSparkRequest) (*v1beta2.SparkApplication, error) {
	ret := _m.Called(ctx, namespace, request)

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

	var r0 *v1beta2.SparkApplication
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, *cluster.CreateSparkRequest) (*v1beta2.SparkApplication, error)); ok {
		return rf(ctx, namespace, request)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, *cluster.CreateSparkRequest) *v1beta2.SparkApplication); ok {
		r0 = rf(ctx, namespace, request)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v1beta2.SparkApplication)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, *cluster.CreateSparkRequest) error); ok {
		r1 = rf(ctx, namespace, request)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// DeleteConfigMap provides a mock function with given fields: ctx, name, namespace, ignoreNotFound
func (_m *Controller) DeleteConfigMap(ctx context.Context, name string, namespace string, ignoreNotFound bool) error {
	ret := _m.Called(ctx, name, namespace, ignoreNotFound)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, bool) error); ok {
		r0 = rf(ctx, name, namespace, ignoreNotFound)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// DeleteIstioVirtualService provides a mock function with given fields: ctx, svcName, namespace
func (_m *Controller) DeleteIstioVirtualService(ctx context.Context, svcName string, namespace string) error {
	ret := _m.Called(ctx, svcName, namespace)

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

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

	return r0
}

// DeleteJob provides a mock function with given fields: ctx, namespace, jobName
func (_m *Controller) DeleteJob(ctx context.Context, namespace string, jobName string) error {
	ret := _m.Called(ctx, namespace, jobName)

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

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

	return r0
}

// DeleteKnativeService provides a mock function with given fields: ctx, svcName, namespace, ignoreNotFound
func (_m *Controller) DeleteKnativeService(ctx context.Context, svcName string, namespace string, ignoreNotFound bool) error {
	ret := _m.Called(ctx, svcName, namespace, ignoreNotFound)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, bool) error); ok {
		r0 = rf(ctx, svcName, namespace, ignoreNotFound)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// DeleteKubernetesService provides a mock function with given fields: ctx, svcName, namespace, ignoreNotFound
func (_m *Controller) DeleteKubernetesService(ctx context.Context, svcName string, namespace string, ignoreNotFound bool) error {
	ret := _m.Called(ctx, svcName, namespace, ignoreNotFound)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, bool) error); ok {
		r0 = rf(ctx, svcName, namespace, ignoreNotFound)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// DeleteKubernetesStatefulSet provides a mock function with given fields: ctx, name, namespace, ignoreNotFound
func (_m *Controller) DeleteKubernetesStatefulSet(ctx context.Context, name string, namespace string, ignoreNotFound bool) error {
	ret := _m.Called(ctx, name, namespace, ignoreNotFound)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, bool) error); ok {
		r0 = rf(ctx, name, namespace, ignoreNotFound)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// DeletePVCs provides a mock function with given fields: ctx, listOptions, namespace, ignoreNotFound
func (_m *Controller) DeletePVCs(ctx context.Context, listOptions metav1.ListOptions, namespace string, ignoreNotFound bool) error {
	ret := _m.Called(ctx, listOptions, namespace, ignoreNotFound)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions, string, bool) error); ok {
		r0 = rf(ctx, listOptions, namespace, ignoreNotFound)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// DeletePodDisruptionBudget provides a mock function with given fields: ctx, namespace, pdbName
func (_m *Controller) DeletePodDisruptionBudget(ctx context.Context, namespace string, pdbName string) error {
	ret := _m.Called(ctx, namespace, pdbName)

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

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

	return r0
}

// DeleteSecret provides a mock function with given fields: ctx, secretName, namespace, ignoreNotFound
func (_m *Controller) DeleteSecret(ctx context.Context, secretName string, namespace string, ignoreNotFound bool) error {
	ret := _m.Called(ctx, secretName, namespace, ignoreNotFound)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, bool) error); ok {
		r0 = rf(ctx, secretName, namespace, ignoreNotFound)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// DeleteSparkApplication provides a mock function with given fields: ctx, namespace, appName
func (_m *Controller) DeleteSparkApplication(ctx context.Context, namespace string, appName string) error {
	ret := _m.Called(ctx, namespace, appName)

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

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

	return r0
}

// DeployKnativeService provides a mock function with given fields: ctx, svc
func (_m *Controller) DeployKnativeService(ctx context.Context, svc *cluster.KnativeService) error {
	ret := _m.Called(ctx, svc)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, *cluster.KnativeService) error); ok {
		r0 = rf(ctx, svc)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// DeployKubernetesService provides a mock function with given fields: ctx, svc
func (_m *Controller) DeployKubernetesService(ctx context.Context, svc *cluster.KubernetesService) error {
	ret := _m.Called(ctx, svc)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, *cluster.KubernetesService) error); ok {
		r0 = rf(ctx, svc)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// GetJob provides a mock function with given fields: ctx, namespace, jobName
func (_m *Controller) GetJob(ctx context.Context, namespace string, jobName string) (*batchv1.Job, error) {
	ret := _m.Called(ctx, namespace, jobName)

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

	var r0 *batchv1.Job
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string) (*batchv1.Job, error)); ok {
		return rf(ctx, namespace, jobName)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, string) *batchv1.Job); ok {
		r0 = rf(ctx, namespace, jobName)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*batchv1.Job)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
		r1 = rf(ctx, namespace, jobName)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetKnativeServiceDesiredReplicas provides a mock function with given fields: ctx, svcName, namespace
func (_m *Controller) GetKnativeServiceDesiredReplicas(ctx context.Context, svcName string, namespace string) (int, error) {
	ret := _m.Called(ctx, svcName, namespace)

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

	var r0 int
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string) (int, error)); ok {
		return rf(ctx, svcName, namespace)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, string) int); ok {
		r0 = rf(ctx, svcName, namespace)
	} else {
		r0 = ret.Get(0).(int)
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
		r1 = rf(ctx, svcName, namespace)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetKnativeServiceURL provides a mock function with given fields: ctx, svcName, namespace
func (_m *Controller) GetKnativeServiceURL(ctx context.Context, svcName string, namespace string) string {
	ret := _m.Called(ctx, svcName, namespace)

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

	var r0 string
	if rf, ok := ret.Get(0).(func(context.Context, string, string) string); ok {
		r0 = rf(ctx, svcName, namespace)
	} else {
		r0 = ret.Get(0).(string)
	}

	return r0
}

// GetSparkApplication provides a mock function with given fields: ctx, namespace, appName
func (_m *Controller) GetSparkApplication(ctx context.Context, namespace string, appName string) (*v1beta2.SparkApplication, error) {
	ret := _m.Called(ctx, namespace, appName)

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

	var r0 *v1beta2.SparkApplication
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string) (*v1beta2.SparkApplication, error)); ok {
		return rf(ctx, namespace, appName)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, string) *v1beta2.SparkApplication); ok {
		r0 = rf(ctx, namespace, appName)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v1beta2.SparkApplication)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
		r1 = rf(ctx, namespace, appName)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// ListPodLogs provides a mock function with given fields: ctx, namespace, podName, opts
func (_m *Controller) ListPodLogs(ctx context.Context, namespace string, podName string, opts *corev1.PodLogOptions) (io.ReadCloser, error) {
	ret := _m.Called(ctx, namespace, podName, opts)

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

	var r0 io.ReadCloser
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, *corev1.PodLogOptions) (io.ReadCloser, error)); ok {
		return rf(ctx, namespace, podName, opts)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, string, *corev1.PodLogOptions) io.ReadCloser); ok {
		r0 = rf(ctx, namespace, podName, opts)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(io.ReadCloser)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, string, *corev1.PodLogOptions) error); ok {
		r1 = rf(ctx, namespace, podName, opts)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// ListPods provides a mock function with given fields: ctx, namespace, labelSelector
func (_m *Controller) ListPods(ctx context.Context, namespace string, labelSelector string) (*corev1.PodList, error) {
	ret := _m.Called(ctx, namespace, labelSelector)

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

	var r0 *corev1.PodList
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string) (*corev1.PodList, error)); ok {
		return rf(ctx, namespace, labelSelector)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, string) *corev1.PodList); ok {
		r0 = rf(ctx, namespace, labelSelector)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*corev1.PodList)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
		r1 = rf(ctx, namespace, labelSelector)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

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

	return mock
}
