// Code generated by mockery. DO NOT EDIT.

package mock_objectid

import (
	context "context"

	common "github.com/anyproto/anytype-heart/core/block/import/common"

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

	objectorigin "github.com/anyproto/anytype-heart/core/domain/objectorigin"

	smartblock "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock"

	time "time"

	treestorage "github.com/anyproto/any-sync/commonspace/object/tree/treestorage"
)

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

type MockIdAndKeyProvider_Expecter struct {
	mock *mock.Mock
}

func (_m *MockIdAndKeyProvider) EXPECT() *MockIdAndKeyProvider_Expecter {
	return &MockIdAndKeyProvider_Expecter{mock: &_m.Mock}
}

// GetIDAndPayload provides a mock function with given fields: ctx, spaceID, sn, createdTime, getExisting, origin
func (_m *MockIdAndKeyProvider) GetIDAndPayload(ctx context.Context, spaceID string, sn *common.Snapshot, createdTime time.Time, getExisting bool, origin objectorigin.ObjectOrigin) (string, treestorage.TreeStorageCreatePayload, error) {
	ret := _m.Called(ctx, spaceID, sn, createdTime, getExisting, origin)

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

	var r0 string
	var r1 treestorage.TreeStorageCreatePayload
	var r2 error
	if rf, ok := ret.Get(0).(func(context.Context, string, *common.Snapshot, time.Time, bool, objectorigin.ObjectOrigin) (string, treestorage.TreeStorageCreatePayload, error)); ok {
		return rf(ctx, spaceID, sn, createdTime, getExisting, origin)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, *common.Snapshot, time.Time, bool, objectorigin.ObjectOrigin) string); ok {
		r0 = rf(ctx, spaceID, sn, createdTime, getExisting, origin)
	} else {
		r0 = ret.Get(0).(string)
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, *common.Snapshot, time.Time, bool, objectorigin.ObjectOrigin) treestorage.TreeStorageCreatePayload); ok {
		r1 = rf(ctx, spaceID, sn, createdTime, getExisting, origin)
	} else {
		r1 = ret.Get(1).(treestorage.TreeStorageCreatePayload)
	}

	if rf, ok := ret.Get(2).(func(context.Context, string, *common.Snapshot, time.Time, bool, objectorigin.ObjectOrigin) error); ok {
		r2 = rf(ctx, spaceID, sn, createdTime, getExisting, origin)
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}

// MockIdAndKeyProvider_GetIDAndPayload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetIDAndPayload'
type MockIdAndKeyProvider_GetIDAndPayload_Call struct {
	*mock.Call
}

// GetIDAndPayload is a helper method to define mock.On call
//   - ctx context.Context
//   - spaceID string
//   - sn *common.Snapshot
//   - createdTime time.Time
//   - getExisting bool
//   - origin objectorigin.ObjectOrigin
func (_e *MockIdAndKeyProvider_Expecter) GetIDAndPayload(ctx interface{}, spaceID interface{}, sn interface{}, createdTime interface{}, getExisting interface{}, origin interface{}) *MockIdAndKeyProvider_GetIDAndPayload_Call {
	return &MockIdAndKeyProvider_GetIDAndPayload_Call{Call: _e.mock.On("GetIDAndPayload", ctx, spaceID, sn, createdTime, getExisting, origin)}
}

func (_c *MockIdAndKeyProvider_GetIDAndPayload_Call) Run(run func(ctx context.Context, spaceID string, sn *common.Snapshot, createdTime time.Time, getExisting bool, origin objectorigin.ObjectOrigin)) *MockIdAndKeyProvider_GetIDAndPayload_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(*common.Snapshot), args[3].(time.Time), args[4].(bool), args[5].(objectorigin.ObjectOrigin))
	})
	return _c
}

func (_c *MockIdAndKeyProvider_GetIDAndPayload_Call) Return(_a0 string, _a1 treestorage.TreeStorageCreatePayload, _a2 error) *MockIdAndKeyProvider_GetIDAndPayload_Call {
	_c.Call.Return(_a0, _a1, _a2)
	return _c
}

func (_c *MockIdAndKeyProvider_GetIDAndPayload_Call) RunAndReturn(run func(context.Context, string, *common.Snapshot, time.Time, bool, objectorigin.ObjectOrigin) (string, treestorage.TreeStorageCreatePayload, error)) *MockIdAndKeyProvider_GetIDAndPayload_Call {
	_c.Call.Return(run)
	return _c
}

// GetInternalKey provides a mock function with given fields: sbType
func (_m *MockIdAndKeyProvider) GetInternalKey(sbType smartblock.SmartBlockType) string {
	ret := _m.Called(sbType)

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

	var r0 string
	if rf, ok := ret.Get(0).(func(smartblock.SmartBlockType) string); ok {
		r0 = rf(sbType)
	} else {
		r0 = ret.Get(0).(string)
	}

	return r0
}

// MockIdAndKeyProvider_GetInternalKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetInternalKey'
type MockIdAndKeyProvider_GetInternalKey_Call struct {
	*mock.Call
}

// GetInternalKey is a helper method to define mock.On call
//   - sbType smartblock.SmartBlockType
func (_e *MockIdAndKeyProvider_Expecter) GetInternalKey(sbType interface{}) *MockIdAndKeyProvider_GetInternalKey_Call {
	return &MockIdAndKeyProvider_GetInternalKey_Call{Call: _e.mock.On("GetInternalKey", sbType)}
}

func (_c *MockIdAndKeyProvider_GetInternalKey_Call) Run(run func(sbType smartblock.SmartBlockType)) *MockIdAndKeyProvider_GetInternalKey_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(smartblock.SmartBlockType))
	})
	return _c
}

func (_c *MockIdAndKeyProvider_GetInternalKey_Call) Return(_a0 string) *MockIdAndKeyProvider_GetInternalKey_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockIdAndKeyProvider_GetInternalKey_Call) RunAndReturn(run func(smartblock.SmartBlockType) string) *MockIdAndKeyProvider_GetInternalKey_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
