// Code generated by mockery v1.0.0. DO NOT EDIT.

package instance

import (
	context "context"

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

	provider "github.com/goharbor/harbor/src/pkg/p2p/preheat/models/provider"

	q "github.com/goharbor/harbor/src/lib/q"
)

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

// 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) (*provider.Instance, error) {
	ret := _m.Called(ctx, id)

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

	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, name
func (_m *FakeManager) GetByName(ctx context.Context, name string) (*provider.Instance, error) {
	ret := _m.Called(ctx, name)

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

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

	return r0, r1
}

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

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

	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
}

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

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

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

	return r0, r1
}

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

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

	return r0
}
