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

package mocks

import (
	context "context"

	models "github.com/caraml-dev/merlin/models"
	mock "github.com/stretchr/testify/mock"
)

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

// Delete provides a mock function with given fields: ctx, modelSchema
func (_m *ModelSchemaStorage) Delete(ctx context.Context, modelSchema *models.ModelSchema) error {
	ret := _m.Called(ctx, modelSchema)

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

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

	return r0
}

// FindAll provides a mock function with given fields: ctx, modelID
func (_m *ModelSchemaStorage) FindAll(ctx context.Context, modelID models.ID) ([]*models.ModelSchema, error) {
	ret := _m.Called(ctx, modelID)

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

	var r0 []*models.ModelSchema
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, models.ID) ([]*models.ModelSchema, error)); ok {
		return rf(ctx, modelID)
	}
	if rf, ok := ret.Get(0).(func(context.Context, models.ID) []*models.ModelSchema); ok {
		r0 = rf(ctx, modelID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*models.ModelSchema)
		}
	}

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

	return r0, r1
}

// FindByID provides a mock function with given fields: ctx, modelSchemaID, modelID
func (_m *ModelSchemaStorage) FindByID(ctx context.Context, modelSchemaID models.ID, modelID models.ID) (*models.ModelSchema, error) {
	ret := _m.Called(ctx, modelSchemaID, modelID)

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

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

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

	return r0, r1
}

// Save provides a mock function with given fields: ctx, modelSchema
func (_m *ModelSchemaStorage) Save(ctx context.Context, modelSchema *models.ModelSchema) (*models.ModelSchema, error) {
	ret := _m.Called(ctx, modelSchema)

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

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

	if rf, ok := ret.Get(1).(func(context.Context, *models.ModelSchema) error); ok {
		r1 = rf(ctx, modelSchema)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

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

	return mock
}
