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

package mocks

import (
	context "context"

	config "github.com/caraml-dev/merlin/config"

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

	models "github.com/caraml-dev/merlin/models"

	service "github.com/caraml-dev/merlin/service"
)

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

// Delete provides a mock function with given fields: version
func (_m *VersionsService) Delete(version *models.Version) error {
	ret := _m.Called(version)

	var r0 error
	if rf, ok := ret.Get(0).(func(*models.Version) error); ok {
		r0 = rf(version)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// FindByID provides a mock function with given fields: ctx, modelID, versionID, monitoringConfig
func (_m *VersionsService) FindByID(ctx context.Context, modelID models.ID, versionID models.ID, monitoringConfig config.MonitoringConfig) (*models.Version, error) {
	ret := _m.Called(ctx, modelID, versionID, monitoringConfig)

	var r0 *models.Version
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, models.ID, models.ID, config.MonitoringConfig) (*models.Version, error)); ok {
		return rf(ctx, modelID, versionID, monitoringConfig)
	}
	if rf, ok := ret.Get(0).(func(context.Context, models.ID, models.ID, config.MonitoringConfig) *models.Version); ok {
		r0 = rf(ctx, modelID, versionID, monitoringConfig)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*models.Version)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, models.ID, models.ID, config.MonitoringConfig) error); ok {
		r1 = rf(ctx, modelID, versionID, monitoringConfig)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// ListVersions provides a mock function with given fields: ctx, modelID, monitoringConfig, query
func (_m *VersionsService) ListVersions(ctx context.Context, modelID models.ID, monitoringConfig config.MonitoringConfig, query service.VersionQuery) ([]*models.Version, string, error) {
	ret := _m.Called(ctx, modelID, monitoringConfig, query)

	var r0 []*models.Version
	var r1 string
	var r2 error
	if rf, ok := ret.Get(0).(func(context.Context, models.ID, config.MonitoringConfig, service.VersionQuery) ([]*models.Version, string, error)); ok {
		return rf(ctx, modelID, monitoringConfig, query)
	}
	if rf, ok := ret.Get(0).(func(context.Context, models.ID, config.MonitoringConfig, service.VersionQuery) []*models.Version); ok {
		r0 = rf(ctx, modelID, monitoringConfig, query)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*models.Version)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, models.ID, config.MonitoringConfig, service.VersionQuery) string); ok {
		r1 = rf(ctx, modelID, monitoringConfig, query)
	} else {
		r1 = ret.Get(1).(string)
	}

	if rf, ok := ret.Get(2).(func(context.Context, models.ID, config.MonitoringConfig, service.VersionQuery) error); ok {
		r2 = rf(ctx, modelID, monitoringConfig, query)
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}

// Save provides a mock function with given fields: ctx, version, monitoringConfig
func (_m *VersionsService) Save(ctx context.Context, version *models.Version, monitoringConfig config.MonitoringConfig) (*models.Version, error) {
	ret := _m.Called(ctx, version, monitoringConfig)

	var r0 *models.Version
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *models.Version, config.MonitoringConfig) (*models.Version, error)); ok {
		return rf(ctx, version, monitoringConfig)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *models.Version, config.MonitoringConfig) *models.Version); ok {
		r0 = rf(ctx, version, monitoringConfig)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*models.Version)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *models.Version, config.MonitoringConfig) error); ok {
		r1 = rf(ctx, version, monitoringConfig)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

type mockConstructorTestingTNewVersionsService interface {
	mock.TestingT
	Cleanup(func())
}

// NewVersionsService creates a new instance of VersionsService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewVersionsService(t mockConstructorTestingTNewVersionsService) *VersionsService {
	mock := &VersionsService{}
	mock.Mock.Test(t)

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

	return mock
}
