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

package ssosettingstests

import (
	context "context"

	identity "github.com/grafana/grafana/pkg/apimachinery/identity"
	mock "github.com/stretchr/testify/mock"

	models "github.com/grafana/grafana/pkg/services/ssosettings/models"

	ssosettings "github.com/grafana/grafana/pkg/services/ssosettings"
)

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

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

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

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

	return r0
}

// GetForProvider provides a mock function with given fields: ctx, provider
func (_m *MockService) GetForProvider(ctx context.Context, provider string) (*models.SSOSettings, error) {
	ret := _m.Called(ctx, provider)

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

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

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

	return r0, r1
}

// GetForProviderFromCache provides a mock function with given fields: ctx, provider
func (_m *MockService) GetForProviderFromCache(ctx context.Context, provider string) (*models.SSOSettings, error) {
	ret := _m.Called(ctx, provider)

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

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

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

	return r0, r1
}

// GetForProviderWithRedactedSecrets provides a mock function with given fields: ctx, provider
func (_m *MockService) GetForProviderWithRedactedSecrets(ctx context.Context, provider string) (*models.SSOSettings, error) {
	ret := _m.Called(ctx, provider)

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

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

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

	return r0, r1
}

// List provides a mock function with given fields: ctx
func (_m *MockService) List(ctx context.Context) ([]*models.SSOSettings, error) {
	ret := _m.Called(ctx)

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

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

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

	return r0, r1
}

// ListWithRedactedSecrets provides a mock function with given fields: ctx
func (_m *MockService) ListWithRedactedSecrets(ctx context.Context) ([]*models.SSOSettings, error) {
	ret := _m.Called(ctx)

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

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

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

	return r0, r1
}

// Patch provides a mock function with given fields: ctx, provider, data
func (_m *MockService) Patch(ctx context.Context, provider string, data map[string]interface{}) error {
	ret := _m.Called(ctx, provider, data)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string, map[string]interface{}) error); ok {
		r0 = rf(ctx, provider, data)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// RegisterReloadable provides a mock function with given fields: provider, reloadable
func (_m *MockService) RegisterReloadable(provider string, reloadable ssosettings.Reloadable) {
	_m.Called(provider, reloadable)
}

// Reload provides a mock function with given fields: ctx, provider
func (_m *MockService) Reload(ctx context.Context, provider string) {
	_m.Called(ctx, provider)
}

// Upsert provides a mock function with given fields: ctx, settings, requester
func (_m *MockService) Upsert(ctx context.Context, settings *models.SSOSettings, requester identity.Requester) error {
	ret := _m.Called(ctx, settings, requester)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, *models.SSOSettings, identity.Requester) error); ok {
		r0 = rf(ctx, settings, requester)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

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

	return mock
}
