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

package scan

import (
	context "context"

	artifact "github.com/goharbor/harbor/src/controller/artifact"

	controllerscan "github.com/goharbor/harbor/src/controller/scan"

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

	models "github.com/goharbor/harbor/src/pkg/allowlist/models"

	scan "github.com/goharbor/harbor/src/pkg/scan/dao/scan"
)

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

// GetReport provides a mock function with given fields: ctx, _a1, mimeTypes
func (_m *Controller) GetReport(ctx context.Context, _a1 *artifact.Artifact, mimeTypes []string) ([]*scan.Report, error) {
	ret := _m.Called(ctx, _a1, mimeTypes)

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

	var r0 []*scan.Report
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, []string) ([]*scan.Report, error)); ok {
		return rf(ctx, _a1, mimeTypes)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, []string) []*scan.Report); ok {
		r0 = rf(ctx, _a1, mimeTypes)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*scan.Report)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *artifact.Artifact, []string) error); ok {
		r1 = rf(ctx, _a1, mimeTypes)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetScanLog provides a mock function with given fields: ctx, art, uuid
func (_m *Controller) GetScanLog(ctx context.Context, art *artifact.Artifact, uuid string) ([]byte, error) {
	ret := _m.Called(ctx, art, uuid)

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

	var r0 []byte
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, string) ([]byte, error)); ok {
		return rf(ctx, art, uuid)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, string) []byte); ok {
		r0 = rf(ctx, art, uuid)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]byte)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *artifact.Artifact, string) error); ok {
		r1 = rf(ctx, art, uuid)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetSummary provides a mock function with given fields: ctx, _a1, scanType, mimeTypes
func (_m *Controller) GetSummary(ctx context.Context, _a1 *artifact.Artifact, scanType string, mimeTypes []string) (map[string]interface{}, error) {
	ret := _m.Called(ctx, _a1, scanType, mimeTypes)

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

	var r0 map[string]interface{}
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, string, []string) (map[string]interface{}, error)); ok {
		return rf(ctx, _a1, scanType, mimeTypes)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, string, []string) map[string]interface{}); ok {
		r0 = rf(ctx, _a1, scanType, mimeTypes)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(map[string]interface{})
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *artifact.Artifact, string, []string) error); ok {
		r1 = rf(ctx, _a1, scanType, mimeTypes)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetVulnerable provides a mock function with given fields: ctx, _a1, allowlist, allowlistIsExpired
func (_m *Controller) GetVulnerable(ctx context.Context, _a1 *artifact.Artifact, allowlist models.CVESet, allowlistIsExpired bool) (*controllerscan.Vulnerable, error) {
	ret := _m.Called(ctx, _a1, allowlist, allowlistIsExpired)

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

	var r0 *controllerscan.Vulnerable
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, models.CVESet, bool) (*controllerscan.Vulnerable, error)); ok {
		return rf(ctx, _a1, allowlist, allowlistIsExpired)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, models.CVESet, bool) *controllerscan.Vulnerable); ok {
		r0 = rf(ctx, _a1, allowlist, allowlistIsExpired)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*controllerscan.Vulnerable)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *artifact.Artifact, models.CVESet, bool) error); ok {
		r1 = rf(ctx, _a1, allowlist, allowlistIsExpired)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Scan provides a mock function with given fields: ctx, _a1, options
func (_m *Controller) Scan(ctx context.Context, _a1 *artifact.Artifact, options ...controllerscan.Option) error {
	_va := make([]interface{}, len(options))
	for _i := range options {
		_va[_i] = options[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx, _a1)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, ...controllerscan.Option) error); ok {
		r0 = rf(ctx, _a1, options...)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// ScanAll provides a mock function with given fields: ctx, trigger, async
func (_m *Controller) ScanAll(ctx context.Context, trigger string, async bool) (int64, error) {
	ret := _m.Called(ctx, trigger, async)

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

	var r0 int64
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, bool) (int64, error)); ok {
		return rf(ctx, trigger, async)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, bool) int64); ok {
		r0 = rf(ctx, trigger, async)
	} else {
		r0 = ret.Get(0).(int64)
	}

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

	return r0, r1
}

// Stop provides a mock function with given fields: ctx, _a1, capType
func (_m *Controller) Stop(ctx context.Context, _a1 *artifact.Artifact, capType string) error {
	ret := _m.Called(ctx, _a1, capType)

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

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

	return r0
}

// StopScanAll provides a mock function with given fields: ctx, executionID, async
func (_m *Controller) StopScanAll(ctx context.Context, executionID int64, async bool) error {
	ret := _m.Called(ctx, executionID, async)

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

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

	return r0
}

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