// 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/channels"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type Service_Expecter struct {
	mock *mock.Mock
}

func (_m *Service) EXPECT() *Service_Expecter {
	return &Service_Expecter{mock: &_m.Mock}
}

// Authorize provides a mock function for the type Service
func (_mock *Service) Authorize(ctx context.Context, req channels.AuthzReq) error {
	ret := _mock.Called(ctx, req)

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

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

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

// Authorize is a helper method to define mock.On call
//   - ctx context.Context
//   - req channels.AuthzReq
func (_e *Service_Expecter) Authorize(ctx interface{}, req interface{}) *Service_Authorize_Call {
	return &Service_Authorize_Call{Call: _e.mock.On("Authorize", ctx, req)}
}

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

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

func (_c *Service_Authorize_Call) RunAndReturn(run func(ctx context.Context, req channels.AuthzReq) error) *Service_Authorize_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

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

// RemoveClientConnections is a helper method to define mock.On call
//   - ctx context.Context
//   - clientID string
func (_e *Service_Expecter) RemoveClientConnections(ctx interface{}, clientID interface{}) *Service_RemoveClientConnections_Call {
	return &Service_RemoveClientConnections_Call{Call: _e.mock.On("RemoveClientConnections", ctx, clientID)}
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

func (_c *Service_RetrieveIDByRoute_Call) Run(run func(ctx context.Context, route string, domainID string)) *Service_RetrieveIDByRoute_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 *Service_RetrieveIDByRoute_Call) Return(s string, err error) *Service_RetrieveIDByRoute_Call {
	_c.Call.Return(s, err)
	return _c
}

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

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

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

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

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

// UnsetParentGroupFromChannels is a helper method to define mock.On call
//   - ctx context.Context
//   - parentGroupID string
func (_e *Service_Expecter) UnsetParentGroupFromChannels(ctx interface{}, parentGroupID interface{}) *Service_UnsetParentGroupFromChannels_Call {
	return &Service_UnsetParentGroupFromChannels_Call{Call: _e.mock.On("UnsetParentGroupFromChannels", ctx, parentGroupID)}
}

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

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