// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify
// Copyright (c) Abstract Machines

// SPDX-License-Identifier: Apache-2.0

package mocks

import (
	"context"
	"time"

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

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

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

	return mock
}

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

type Repository_Expecter struct {
	mock *mock.Mock
}

func (_m *Repository) EXPECT() *Repository_Expecter {
	return &Repository_Expecter{mock: &_m.Mock}
}

// AddRule provides a mock function for the type Repository
func (_mock *Repository) AddRule(ctx context.Context, r re.Rule) (re.Rule, error) {
	ret := _mock.Called(ctx, r)

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

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

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

// AddRule is a helper method to define mock.On call
//   - ctx context.Context
//   - r re.Rule
func (_e *Repository_Expecter) AddRule(ctx interface{}, r interface{}) *Repository_AddRule_Call {
	return &Repository_AddRule_Call{Call: _e.mock.On("AddRule", ctx, r)}
}

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

func (_c *Repository_AddRule_Call) Return(rule re.Rule, err error) *Repository_AddRule_Call {
	_c.Call.Return(rule, err)
	return _c
}

func (_c *Repository_AddRule_Call) RunAndReturn(run func(ctx context.Context, r re.Rule) (re.Rule, error)) *Repository_AddRule_Call {
	_c.Call.Return(run)
	return _c
}

// ListRules provides a mock function for the type Repository
func (_mock *Repository) ListRules(ctx context.Context, pm re.PageMeta) (re.Page, error) {
	ret := _mock.Called(ctx, pm)

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

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

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

// ListRules is a helper method to define mock.On call
//   - ctx context.Context
//   - pm re.PageMeta
func (_e *Repository_Expecter) ListRules(ctx interface{}, pm interface{}) *Repository_ListRules_Call {
	return &Repository_ListRules_Call{Call: _e.mock.On("ListRules", ctx, pm)}
}

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

func (_c *Repository_ListRules_Call) Return(page re.Page, err error) *Repository_ListRules_Call {
	_c.Call.Return(page, err)
	return _c
}

func (_c *Repository_ListRules_Call) RunAndReturn(run func(ctx context.Context, pm re.PageMeta) (re.Page, error)) *Repository_ListRules_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

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

// RemoveRule is a helper method to define mock.On call
//   - ctx context.Context
//   - id string
func (_e *Repository_Expecter) RemoveRule(ctx interface{}, id interface{}) *Repository_RemoveRule_Call {
	return &Repository_RemoveRule_Call{Call: _e.mock.On("RemoveRule", ctx, id)}
}

func (_c *Repository_RemoveRule_Call) Run(run func(ctx context.Context, id string)) *Repository_RemoveRule_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 *Repository_RemoveRule_Call) Return(err error) *Repository_RemoveRule_Call {
	_c.Call.Return(err)
	return _c
}

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

// UpdateRule provides a mock function for the type Repository
func (_mock *Repository) UpdateRule(ctx context.Context, r re.Rule) (re.Rule, error) {
	ret := _mock.Called(ctx, r)

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

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

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

// UpdateRule is a helper method to define mock.On call
//   - ctx context.Context
//   - r re.Rule
func (_e *Repository_Expecter) UpdateRule(ctx interface{}, r interface{}) *Repository_UpdateRule_Call {
	return &Repository_UpdateRule_Call{Call: _e.mock.On("UpdateRule", ctx, r)}
}

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

func (_c *Repository_UpdateRule_Call) Return(rule re.Rule, err error) *Repository_UpdateRule_Call {
	_c.Call.Return(rule, err)
	return _c
}

func (_c *Repository_UpdateRule_Call) RunAndReturn(run func(ctx context.Context, r re.Rule) (re.Rule, error)) *Repository_UpdateRule_Call {
	_c.Call.Return(run)
	return _c
}

// UpdateRuleDue provides a mock function for the type Repository
func (_mock *Repository) UpdateRuleDue(ctx context.Context, id string, due time.Time) (re.Rule, error) {
	ret := _mock.Called(ctx, id, due)

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

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

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

// UpdateRuleDue is a helper method to define mock.On call
//   - ctx context.Context
//   - id string
//   - due time.Time
func (_e *Repository_Expecter) UpdateRuleDue(ctx interface{}, id interface{}, due interface{}) *Repository_UpdateRuleDue_Call {
	return &Repository_UpdateRuleDue_Call{Call: _e.mock.On("UpdateRuleDue", ctx, id, due)}
}

func (_c *Repository_UpdateRuleDue_Call) Run(run func(ctx context.Context, id string, due time.Time)) *Repository_UpdateRuleDue_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 time.Time
		if args[2] != nil {
			arg2 = args[2].(time.Time)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *Repository_UpdateRuleDue_Call) Return(rule re.Rule, err error) *Repository_UpdateRuleDue_Call {
	_c.Call.Return(rule, err)
	return _c
}

func (_c *Repository_UpdateRuleDue_Call) RunAndReturn(run func(ctx context.Context, id string, due time.Time) (re.Rule, error)) *Repository_UpdateRuleDue_Call {
	_c.Call.Return(run)
	return _c
}

// UpdateRuleSchedule provides a mock function for the type Repository
func (_mock *Repository) UpdateRuleSchedule(ctx context.Context, r re.Rule) (re.Rule, error) {
	ret := _mock.Called(ctx, r)

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

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

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

// UpdateRuleSchedule is a helper method to define mock.On call
//   - ctx context.Context
//   - r re.Rule
func (_e *Repository_Expecter) UpdateRuleSchedule(ctx interface{}, r interface{}) *Repository_UpdateRuleSchedule_Call {
	return &Repository_UpdateRuleSchedule_Call{Call: _e.mock.On("UpdateRuleSchedule", ctx, r)}
}

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

func (_c *Repository_UpdateRuleSchedule_Call) Return(rule re.Rule, err error) *Repository_UpdateRuleSchedule_Call {
	_c.Call.Return(rule, err)
	return _c
}

func (_c *Repository_UpdateRuleSchedule_Call) RunAndReturn(run func(ctx context.Context, r re.Rule) (re.Rule, error)) *Repository_UpdateRuleSchedule_Call {
	_c.Call.Return(run)
	return _c
}

// UpdateRuleStatus provides a mock function for the type Repository
func (_mock *Repository) UpdateRuleStatus(ctx context.Context, r re.Rule) (re.Rule, error) {
	ret := _mock.Called(ctx, r)

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

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

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

// UpdateRuleStatus is a helper method to define mock.On call
//   - ctx context.Context
//   - r re.Rule
func (_e *Repository_Expecter) UpdateRuleStatus(ctx interface{}, r interface{}) *Repository_UpdateRuleStatus_Call {
	return &Repository_UpdateRuleStatus_Call{Call: _e.mock.On("UpdateRuleStatus", ctx, r)}
}

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

func (_c *Repository_UpdateRuleStatus_Call) Return(rule re.Rule, err error) *Repository_UpdateRuleStatus_Call {
	_c.Call.Return(rule, err)
	return _c
}

func (_c *Repository_UpdateRuleStatus_Call) RunAndReturn(run func(ctx context.Context, r re.Rule) (re.Rule, error)) *Repository_UpdateRuleStatus_Call {
	_c.Call.Return(run)
	return _c
}

// UpdateRuleTags provides a mock function for the type Repository
func (_mock *Repository) UpdateRuleTags(ctx context.Context, r re.Rule) (re.Rule, error) {
	ret := _mock.Called(ctx, r)

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

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

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

// UpdateRuleTags is a helper method to define mock.On call
//   - ctx context.Context
//   - r re.Rule
func (_e *Repository_Expecter) UpdateRuleTags(ctx interface{}, r interface{}) *Repository_UpdateRuleTags_Call {
	return &Repository_UpdateRuleTags_Call{Call: _e.mock.On("UpdateRuleTags", ctx, r)}
}

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

func (_c *Repository_UpdateRuleTags_Call) Return(rule re.Rule, err error) *Repository_UpdateRuleTags_Call {
	_c.Call.Return(rule, err)
	return _c
}

func (_c *Repository_UpdateRuleTags_Call) RunAndReturn(run func(ctx context.Context, r re.Rule) (re.Rule, error)) *Repository_UpdateRuleTags_Call {
	_c.Call.Return(run)
	return _c
}

// ViewRule provides a mock function for the type Repository
func (_mock *Repository) ViewRule(ctx context.Context, id string) (re.Rule, error) {
	ret := _mock.Called(ctx, id)

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

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

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

// ViewRule is a helper method to define mock.On call
//   - ctx context.Context
//   - id string
func (_e *Repository_Expecter) ViewRule(ctx interface{}, id interface{}) *Repository_ViewRule_Call {
	return &Repository_ViewRule_Call{Call: _e.mock.On("ViewRule", ctx, id)}
}

func (_c *Repository_ViewRule_Call) Run(run func(ctx context.Context, id string)) *Repository_ViewRule_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 *Repository_ViewRule_Call) Return(rule re.Rule, err error) *Repository_ViewRule_Call {
	_c.Call.Return(rule, err)
	return _c
}

func (_c *Repository_ViewRule_Call) RunAndReturn(run func(ctx context.Context, id string) (re.Rule, error)) *Repository_ViewRule_Call {
	_c.Call.Return(run)
	return _c
}
