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

package scan

import (
	context "context"

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

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

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

// Create provides a mock function with given fields: ctx, vr
func (_m *VulnerabilityRecordDao) Create(ctx context.Context, vr *scan.VulnerabilityRecord) (int64, error) {
	ret := _m.Called(ctx, vr)

	var r0 int64
	if rf, ok := ret.Get(0).(func(context.Context, *scan.VulnerabilityRecord) int64); ok {
		r0 = rf(ctx, vr)
	} else {
		r0 = ret.Get(0).(int64)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, *scan.VulnerabilityRecord) error); ok {
		r1 = rf(ctx, vr)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Delete provides a mock function with given fields: ctx, vr
func (_m *VulnerabilityRecordDao) Delete(ctx context.Context, vr *scan.VulnerabilityRecord) error {
	ret := _m.Called(ctx, vr)

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

	return r0
}

// DeleteForDigests provides a mock function with given fields: ctx, digests
func (_m *VulnerabilityRecordDao) DeleteForDigests(ctx context.Context, digests ...string) (int64, error) {
	_va := make([]interface{}, len(digests))
	for _i := range digests {
		_va[_i] = digests[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

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

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

	return r0, r1
}

// DeleteForReport provides a mock function with given fields: ctx, reportUUID
func (_m *VulnerabilityRecordDao) DeleteForReport(ctx context.Context, reportUUID string) (int64, error) {
	ret := _m.Called(ctx, reportUUID)

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

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

	return r0, r1
}

// DeleteForScanner provides a mock function with given fields: ctx, registrationUUID
func (_m *VulnerabilityRecordDao) DeleteForScanner(ctx context.Context, registrationUUID string) (int64, error) {
	ret := _m.Called(ctx, registrationUUID)

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

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

	return r0, r1
}

// GetForReport provides a mock function with given fields: ctx, reportUUID
func (_m *VulnerabilityRecordDao) GetForReport(ctx context.Context, reportUUID string) ([]*scan.VulnerabilityRecord, error) {
	ret := _m.Called(ctx, reportUUID)

	var r0 []*scan.VulnerabilityRecord
	if rf, ok := ret.Get(0).(func(context.Context, string) []*scan.VulnerabilityRecord); ok {
		r0 = rf(ctx, reportUUID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*scan.VulnerabilityRecord)
		}
	}

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

	return r0, r1
}

// GetForScanner provides a mock function with given fields: ctx, registrationUUID
func (_m *VulnerabilityRecordDao) GetForScanner(ctx context.Context, registrationUUID string) ([]*scan.VulnerabilityRecord, error) {
	ret := _m.Called(ctx, registrationUUID)

	var r0 []*scan.VulnerabilityRecord
	if rf, ok := ret.Get(0).(func(context.Context, string) []*scan.VulnerabilityRecord); ok {
		r0 = rf(ctx, registrationUUID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*scan.VulnerabilityRecord)
		}
	}

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

	return r0, r1
}

// GetRecordIdsForScanner provides a mock function with given fields: ctx, registrationUUID
func (_m *VulnerabilityRecordDao) GetRecordIdsForScanner(ctx context.Context, registrationUUID string) ([]int, error) {
	ret := _m.Called(ctx, registrationUUID)

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

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

	return r0, r1
}

// InsertForReport provides a mock function with given fields: ctx, reportUUID, vulnerabilityRecordIDs
func (_m *VulnerabilityRecordDao) InsertForReport(ctx context.Context, reportUUID string, vulnerabilityRecordIDs ...int64) error {
	_va := make([]interface{}, len(vulnerabilityRecordIDs))
	for _i := range vulnerabilityRecordIDs {
		_va[_i] = vulnerabilityRecordIDs[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx, reportUUID)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

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

	return r0
}

// List provides a mock function with given fields: ctx, query
func (_m *VulnerabilityRecordDao) List(ctx context.Context, query *q.Query) ([]*scan.VulnerabilityRecord, error) {
	ret := _m.Called(ctx, query)

	var r0 []*scan.VulnerabilityRecord
	if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*scan.VulnerabilityRecord); ok {
		r0 = rf(ctx, query)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*scan.VulnerabilityRecord)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
		r1 = rf(ctx, query)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Update provides a mock function with given fields: ctx, vr, cols
func (_m *VulnerabilityRecordDao) Update(ctx context.Context, vr *scan.VulnerabilityRecord, cols ...string) error {
	_va := make([]interface{}, len(cols))
	for _i := range cols {
		_va[_i] = cols[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx, vr)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

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

	return r0
}
