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

package policy

import (
	context "context"

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

	q "github.com/goharbor/harbor/src/lib/q"
	modelspolicy "github.com/goharbor/harbor/src/pkg/p2p/preheat/models/policy"
)

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

// Count provides a mock function with given fields: ctx, query
func (_m *FakeManager) Count(ctx context.Context, query *q.Query) (int64, error) {
	ret := _m.Called(ctx, query)

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

	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
}

// Create provides a mock function with given fields: ctx, schema
func (_m *FakeManager) Create(ctx context.Context, schema *modelspolicy.Schema) (int64, error) {
	ret := _m.Called(ctx, schema)

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

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

	return r0, r1
}

// Delete provides a mock function with given fields: ctx, id
func (_m *FakeManager) Delete(ctx context.Context, id int64) error {
	ret := _m.Called(ctx, id)

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

	return r0
}

// Get provides a mock function with given fields: ctx, id
func (_m *FakeManager) Get(ctx context.Context, id int64) (*modelspolicy.Schema, error) {
	ret := _m.Called(ctx, id)

	var r0 *modelspolicy.Schema
	if rf, ok := ret.Get(0).(func(context.Context, int64) *modelspolicy.Schema); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*modelspolicy.Schema)
		}
	}

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

	return r0, r1
}

// GetByName provides a mock function with given fields: ctx, projectId, name
func (_m *FakeManager) GetByName(ctx context.Context, projectId int64, name string) (*modelspolicy.Schema, error) {
	ret := _m.Called(ctx, projectId, name)

	var r0 *modelspolicy.Schema
	if rf, ok := ret.Get(0).(func(context.Context, int64, string) *modelspolicy.Schema); ok {
		r0 = rf(ctx, projectId, name)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*modelspolicy.Schema)
		}
	}

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

	return r0, r1
}

// ListPolicies provides a mock function with given fields: ctx, query
func (_m *FakeManager) ListPolicies(ctx context.Context, query *q.Query) ([]*modelspolicy.Schema, error) {
	ret := _m.Called(ctx, query)

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

	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
}

// ListPoliciesByProject provides a mock function with given fields: ctx, project, query
func (_m *FakeManager) ListPoliciesByProject(ctx context.Context, project int64, query *q.Query) ([]*modelspolicy.Schema, error) {
	ret := _m.Called(ctx, project, query)

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

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

	return r0, r1
}

// Update provides a mock function with given fields: ctx, schema, props
func (_m *FakeManager) Update(ctx context.Context, schema *modelspolicy.Schema, props ...string) error {
	_va := make([]interface{}, len(props))
	for _i := range props {
		_va[_i] = props[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx, schema)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

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

	return r0
}
