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

package scan

import (
	context "context"

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

	job "github.com/goharbor/harbor/src/jobservice/job"

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

	model "github.com/goharbor/harbor/src/pkg/robot/model"

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

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

	time "time"

	types "github.com/goharbor/harbor/src/pkg/permission/types"

	v1 "github.com/goharbor/harbor/src/pkg/scan/rest/v1"
)

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

// GetPlaceHolder provides a mock function with given fields: ctx, artRepo, artDigest, scannerUUID, mimeType
func (_m *Handler) GetPlaceHolder(ctx context.Context, artRepo string, artDigest string, scannerUUID string, mimeType string) (*scan.Report, error) {
	ret := _m.Called(ctx, artRepo, artDigest, scannerUUID, mimeType)

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

	var r0 *scan.Report
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) (*scan.Report, error)); ok {
		return rf(ctx, artRepo, artDigest, scannerUUID, mimeType)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) *scan.Report); ok {
		r0 = rf(ctx, artRepo, artDigest, scannerUUID, mimeType)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*scan.Report)
		}
	}

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

	return r0, r1
}

// GetSummary provides a mock function with given fields: ctx, ar, mimeTypes
func (_m *Handler) GetSummary(ctx context.Context, ar *artifact.Artifact, mimeTypes []string) (map[string]interface{}, error) {
	ret := _m.Called(ctx, ar, 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) (map[string]interface{}, error)); ok {
		return rf(ctx, ar, mimeTypes)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *artifact.Artifact, []string) map[string]interface{}); ok {
		r0 = rf(ctx, ar, 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) error); ok {
		r1 = rf(ctx, ar, mimeTypes)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// JobVendorType provides a mock function with no fields
func (_m *Handler) JobVendorType() string {
	ret := _m.Called()

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

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

	return r0
}

// MakePlaceHolder provides a mock function with given fields: ctx, art, r
func (_m *Handler) MakePlaceHolder(ctx context.Context, art *artifact.Artifact, r *scanner.Registration) ([]*scan.Report, error) {
	ret := _m.Called(ctx, art, r)

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

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

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

	return r0, r1
}

// PostScan provides a mock function with given fields: ctx, sr, rp, rawReport, startTime, robot
func (_m *Handler) PostScan(ctx job.Context, sr *v1.ScanRequest, rp *scan.Report, rawReport string, startTime time.Time, robot *model.Robot) (string, error) {
	ret := _m.Called(ctx, sr, rp, rawReport, startTime, robot)

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

	var r0 string
	var r1 error
	if rf, ok := ret.Get(0).(func(job.Context, *v1.ScanRequest, *scan.Report, string, time.Time, *model.Robot) (string, error)); ok {
		return rf(ctx, sr, rp, rawReport, startTime, robot)
	}
	if rf, ok := ret.Get(0).(func(job.Context, *v1.ScanRequest, *scan.Report, string, time.Time, *model.Robot) string); ok {
		r0 = rf(ctx, sr, rp, rawReport, startTime, robot)
	} else {
		r0 = ret.Get(0).(string)
	}

	if rf, ok := ret.Get(1).(func(job.Context, *v1.ScanRequest, *scan.Report, string, time.Time, *model.Robot) error); ok {
		r1 = rf(ctx, sr, rp, rawReport, startTime, robot)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// RequestParameters provides a mock function with no fields
func (_m *Handler) RequestParameters() map[string]interface{} {
	ret := _m.Called()

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

	var r0 map[string]interface{}
	if rf, ok := ret.Get(0).(func() map[string]interface{}); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(map[string]interface{})
		}
	}

	return r0
}

// RequestProducesMineTypes provides a mock function with no fields
func (_m *Handler) RequestProducesMineTypes() []string {
	ret := _m.Called()

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

	var r0 []string
	if rf, ok := ret.Get(0).(func() []string); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]string)
		}
	}

	return r0
}

// RequiredPermissions provides a mock function with no fields
func (_m *Handler) RequiredPermissions() []*types.Policy {
	ret := _m.Called()

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

	var r0 []*types.Policy
	if rf, ok := ret.Get(0).(func() []*types.Policy); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*types.Policy)
		}
	}

	return r0
}

// URLParameter provides a mock function with given fields: sr
func (_m *Handler) URLParameter(sr *v1.ScanRequest) (string, error) {
	ret := _m.Called(sr)

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

	var r0 string
	var r1 error
	if rf, ok := ret.Get(0).(func(*v1.ScanRequest) (string, error)); ok {
		return rf(sr)
	}
	if rf, ok := ret.Get(0).(func(*v1.ScanRequest) string); ok {
		r0 = rf(sr)
	} else {
		r0 = ret.Get(0).(string)
	}

	if rf, ok := ret.Get(1).(func(*v1.ScanRequest) error); ok {
		r1 = rf(sr)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Update provides a mock function with given fields: ctx, uuid, report
func (_m *Handler) Update(ctx context.Context, uuid string, report string) error {
	ret := _m.Called(ctx, uuid, report)

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

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

	return r0
}

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

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

	return mock
}
