// 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"

	"github.com/absmach/supermq/clients"
	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}
}

// AddConnections provides a mock function for the type Service
func (_mock *Service) AddConnections(ctx context.Context, conns []clients.Connection) error {
	ret := _mock.Called(ctx, conns)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, []clients.Connection) error); ok {
		r0 = returnFunc(ctx, conns)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// AddConnections is a helper method to define mock.On call
//   - ctx context.Context
//   - conns []clients.Connection
func (_e *Service_Expecter) AddConnections(ctx interface{}, conns interface{}) *Service_AddConnections_Call {
	return &Service_AddConnections_Call{Call: _e.mock.On("AddConnections", ctx, conns)}
}

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

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

func (_c *Service_AddConnections_Call) RunAndReturn(run func(ctx context.Context, conns []clients.Connection) error) *Service_AddConnections_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

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

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

func (_c *Service_Authenticate_Call) Run(run func(ctx context.Context, key string)) *Service_Authenticate_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_Authenticate_Call) Return(s string, err error) *Service_Authenticate_Call {
	_c.Call.Return(s, err)
	return _c
}

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

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

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

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

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

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

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

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

// RemoveConnections provides a mock function for the type Service
func (_mock *Service) RemoveConnections(ctx context.Context, conns []clients.Connection) error {
	ret := _mock.Called(ctx, conns)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, []clients.Connection) error); ok {
		r0 = returnFunc(ctx, conns)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// RemoveConnections is a helper method to define mock.On call
//   - ctx context.Context
//   - conns []clients.Connection
func (_e *Service_Expecter) RemoveConnections(ctx interface{}, conns interface{}) *Service_RemoveConnections_Call {
	return &Service_RemoveConnections_Call{Call: _e.mock.On("RemoveConnections", ctx, conns)}
}

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

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

func (_c *Service_RemoveConnections_Call) RunAndReturn(run func(ctx context.Context, conns []clients.Connection) error) *Service_RemoveConnections_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) (clients.Client, error) {
	ret := _mock.Called(ctx, id)

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

	var r0 clients.Client
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (clients.Client, error)); ok {
		return returnFunc(ctx, id)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) clients.Client); ok {
		r0 = returnFunc(ctx, id)
	} else {
		r0 = ret.Get(0).(clients.Client)
	}
	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(client clients.Client, err error) *Service_RetrieveById_Call {
	_c.Call.Return(client, err)
	return _c
}

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

// RetrieveByIds provides a mock function for the type Service
func (_mock *Service) RetrieveByIds(ctx context.Context, ids []string) (clients.ClientsPage, error) {
	ret := _mock.Called(ctx, ids)

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

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

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

// RetrieveByIds is a helper method to define mock.On call
//   - ctx context.Context
//   - ids []string
func (_e *Service_Expecter) RetrieveByIds(ctx interface{}, ids interface{}) *Service_RetrieveByIds_Call {
	return &Service_RetrieveByIds_Call{Call: _e.mock.On("RetrieveByIds", ctx, ids)}
}

func (_c *Service_RetrieveByIds_Call) Run(run func(ctx context.Context, ids []string)) *Service_RetrieveByIds_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_RetrieveByIds_Call) Return(clientsPage clients.ClientsPage, err error) *Service_RetrieveByIds_Call {
	_c.Call.Return(clientsPage, err)
	return _c
}

func (_c *Service_RetrieveByIds_Call) RunAndReturn(run func(ctx context.Context, ids []string) (clients.ClientsPage, error)) *Service_RetrieveByIds_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	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_UnsetParentGroupFromClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnsetParentGroupFromClient'
type Service_UnsetParentGroupFromClient_Call struct {
	*mock.Call
}

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

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

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