// Copyright (c) Abstract Machines

// SPDX-License-Identifier: Apache-2.0

// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify

package mocks

import (
	"context"

	"github.com/absmach/magistrala/domains"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type Cache_Expecter struct {
	mock *mock.Mock
}

func (_m *Cache) EXPECT() *Cache_Expecter {
	return &Cache_Expecter{mock: &_m.Mock}
}

// ID provides a mock function for the type Cache
func (_mock *Cache) ID(ctx context.Context, route string) (string, error) {
	ret := _mock.Called(ctx, route)

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

	var r0 string
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (string, error)); ok {
		return returnFunc(ctx, route)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) string); ok {
		r0 = returnFunc(ctx, route)
	} else {
		r0 = ret.Get(0).(string)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = returnFunc(ctx, route)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// ID is a helper method to define mock.On call
//   - ctx context.Context
//   - route string
func (_e *Cache_Expecter) ID(ctx interface{}, route interface{}) *Cache_ID_Call {
	return &Cache_ID_Call{Call: _e.mock.On("ID", ctx, route)}
}

func (_c *Cache_ID_Call) Run(run func(ctx context.Context, route string)) *Cache_ID_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Cache_ID_Call) Return(s string, err error) *Cache_ID_Call {
	_c.Call.Return(s, err)
	return _c
}

func (_c *Cache_ID_Call) RunAndReturn(run func(ctx context.Context, route string) (string, error)) *Cache_ID_Call {
	_c.Call.Return(run)
	return _c
}

// RemoveID provides a mock function for the type Cache
func (_mock *Cache) RemoveID(ctx context.Context, route string) error {
	ret := _mock.Called(ctx, route)

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

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

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

// RemoveID is a helper method to define mock.On call
//   - ctx context.Context
//   - route string
func (_e *Cache_Expecter) RemoveID(ctx interface{}, route interface{}) *Cache_RemoveID_Call {
	return &Cache_RemoveID_Call{Call: _e.mock.On("RemoveID", ctx, route)}
}

func (_c *Cache_RemoveID_Call) Run(run func(ctx context.Context, route string)) *Cache_RemoveID_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Cache_RemoveID_Call) Return(err error) *Cache_RemoveID_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *Cache_RemoveID_Call) RunAndReturn(run func(ctx context.Context, route string) error) *Cache_RemoveID_Call {
	_c.Call.Return(run)
	return _c
}

// RemoveStatus provides a mock function for the type Cache
func (_mock *Cache) RemoveStatus(ctx context.Context, domainID string) error {
	ret := _mock.Called(ctx, domainID)

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

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

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

// RemoveStatus is a helper method to define mock.On call
//   - ctx context.Context
//   - domainID string
func (_e *Cache_Expecter) RemoveStatus(ctx interface{}, domainID interface{}) *Cache_RemoveStatus_Call {
	return &Cache_RemoveStatus_Call{Call: _e.mock.On("RemoveStatus", ctx, domainID)}
}

func (_c *Cache_RemoveStatus_Call) Run(run func(ctx context.Context, domainID string)) *Cache_RemoveStatus_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Cache_RemoveStatus_Call) Return(err error) *Cache_RemoveStatus_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *Cache_RemoveStatus_Call) RunAndReturn(run func(ctx context.Context, domainID string) error) *Cache_RemoveStatus_Call {
	_c.Call.Return(run)
	return _c
}

// SaveID provides a mock function for the type Cache
func (_mock *Cache) SaveID(ctx context.Context, route string, domainID string) error {
	ret := _mock.Called(ctx, route, domainID)

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

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

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

// SaveID is a helper method to define mock.On call
//   - ctx context.Context
//   - route string
//   - domainID string
func (_e *Cache_Expecter) SaveID(ctx interface{}, route interface{}, domainID interface{}) *Cache_SaveID_Call {
	return &Cache_SaveID_Call{Call: _e.mock.On("SaveID", ctx, route, domainID)}
}

func (_c *Cache_SaveID_Call) Run(run func(ctx context.Context, route string, domainID string)) *Cache_SaveID_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *Cache_SaveID_Call) Return(err error) *Cache_SaveID_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *Cache_SaveID_Call) RunAndReturn(run func(ctx context.Context, route string, domainID string) error) *Cache_SaveID_Call {
	_c.Call.Return(run)
	return _c
}

// SaveStatus provides a mock function for the type Cache
func (_mock *Cache) SaveStatus(ctx context.Context, domainID string, status domains.Status) error {
	ret := _mock.Called(ctx, domainID, status)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, domains.Status) error); ok {
		r0 = returnFunc(ctx, domainID, status)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// SaveStatus is a helper method to define mock.On call
//   - ctx context.Context
//   - domainID string
//   - status domains.Status
func (_e *Cache_Expecter) SaveStatus(ctx interface{}, domainID interface{}, status interface{}) *Cache_SaveStatus_Call {
	return &Cache_SaveStatus_Call{Call: _e.mock.On("SaveStatus", ctx, domainID, status)}
}

func (_c *Cache_SaveStatus_Call) Run(run func(ctx context.Context, domainID string, status domains.Status)) *Cache_SaveStatus_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 domains.Status
		if args[2] != nil {
			arg2 = args[2].(domains.Status)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *Cache_SaveStatus_Call) Return(err error) *Cache_SaveStatus_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *Cache_SaveStatus_Call) RunAndReturn(run func(ctx context.Context, domainID string, status domains.Status) error) *Cache_SaveStatus_Call {
	_c.Call.Return(run)
	return _c
}

// Status provides a mock function for the type Cache
func (_mock *Cache) Status(ctx context.Context, domainID string) (domains.Status, error) {
	ret := _mock.Called(ctx, domainID)

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

	var r0 domains.Status
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (domains.Status, error)); ok {
		return returnFunc(ctx, domainID)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) domains.Status); ok {
		r0 = returnFunc(ctx, domainID)
	} else {
		r0 = ret.Get(0).(domains.Status)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = returnFunc(ctx, domainID)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Status is a helper method to define mock.On call
//   - ctx context.Context
//   - domainID string
func (_e *Cache_Expecter) Status(ctx interface{}, domainID interface{}) *Cache_Status_Call {
	return &Cache_Status_Call{Call: _e.mock.On("Status", ctx, domainID)}
}

func (_c *Cache_Status_Call) Run(run func(ctx context.Context, domainID string)) *Cache_Status_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Cache_Status_Call) Return(status domains.Status, err error) *Cache_Status_Call {
	_c.Call.Return(status, err)
	return _c
}

func (_c *Cache_Status_Call) RunAndReturn(run func(ctx context.Context, domainID string) (domains.Status, error)) *Cache_Status_Call {
	_c.Call.Return(run)
	return _c
}
