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

package mocks

import (
	batchv1 "k8s.io/api/batch/v1"

	context "context"

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

	io "io"

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

	models "github.com/caraml-dev/merlin/models"

	resource "github.com/caraml-dev/merlin/cluster/resource"

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

	v1beta1 "github.com/kserve/kserve/pkg/apis/serving/v1beta1"
)

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

// Delete provides a mock function with given fields: ctx, modelService
func (_m *Controller) Delete(ctx context.Context, modelService *models.Service) (*models.Service, error) {
	ret := _m.Called(ctx, modelService)

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

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

	if rf, ok := ret.Get(1).(func(context.Context, *models.Service) error); ok {
		r1 = rf(ctx, modelService)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

	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, v1.DeleteOptions) error); ok {
		r0 = rf(ctx, namespace, jobName, deleteOptions)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// DeleteJobs provides a mock function with given fields: ctx, namespace, deleteOptions, listOptions
func (_m *Controller) DeleteJobs(ctx context.Context, namespace string, deleteOptions v1.DeleteOptions, listOptions v1.ListOptions) error {
	ret := _m.Called(ctx, namespace, deleteOptions, listOptions)

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

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

	return r0
}

// Deploy provides a mock function with given fields: ctx, modelService, projectID
func (_m *Controller) Deploy(ctx context.Context, modelService *models.Service, projectID int) (*models.Service, error) {
	ret := _m.Called(ctx, modelService, projectID)

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

	var r0 *models.Service
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *models.Service, int) (*models.Service, error)); ok {
		return rf(ctx, modelService, projectID)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *models.Service, int) *models.Service); ok {
		r0 = rf(ctx, modelService, projectID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*models.Service)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *models.Service, int) error); ok {
		r1 = rf(ctx, modelService, projectID)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetContainers provides a mock function with given fields: ctx, namespace, labelSelector
func (_m *Controller) GetContainers(ctx context.Context, namespace string, labelSelector string) ([]*models.Container, error) {
	ret := _m.Called(ctx, namespace, labelSelector)

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

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

	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
}

// GetCurrentDeploymentScale provides a mock function with given fields: ctx, namespace, components
func (_m *Controller) GetCurrentDeploymentScale(ctx context.Context, namespace string, components map[v1beta1.ComponentType]v1beta1.ComponentStatusSpec) resource.DeploymentScale {
	ret := _m.Called(ctx, namespace, components)

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

	var r0 resource.DeploymentScale
	if rf, ok := ret.Get(0).(func(context.Context, string, map[v1beta1.ComponentType]v1beta1.ComponentStatusSpec) resource.DeploymentScale); ok {
		r0 = rf(ctx, namespace, components)
	} else {
		r0 = ret.Get(0).(resource.DeploymentScale)
	}

	return r0
}

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

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

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

	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
}

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

// StreamPodLogs provides a mock function with given fields: ctx, namespace, podName, opts
func (_m *Controller) StreamPodLogs(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 StreamPodLogs")
	}

	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
}

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