// 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 (
	"github.com/absmach/supermq/certs"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type Agent_Expecter struct {
	mock *mock.Mock
}

func (_m *Agent) EXPECT() *Agent_Expecter {
	return &Agent_Expecter{mock: &_m.Mock}
}

// Issue provides a mock function for the type Agent
func (_mock *Agent) Issue(entityId string, ttl string, ipAddrs []string) (certs.Cert, error) {
	ret := _mock.Called(entityId, ttl, ipAddrs)

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

	var r0 certs.Cert
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(string, string, []string) (certs.Cert, error)); ok {
		return returnFunc(entityId, ttl, ipAddrs)
	}
	if returnFunc, ok := ret.Get(0).(func(string, string, []string) certs.Cert); ok {
		r0 = returnFunc(entityId, ttl, ipAddrs)
	} else {
		r0 = ret.Get(0).(certs.Cert)
	}
	if returnFunc, ok := ret.Get(1).(func(string, string, []string) error); ok {
		r1 = returnFunc(entityId, ttl, ipAddrs)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Issue is a helper method to define mock.On call
//   - entityId string
//   - ttl string
//   - ipAddrs []string
func (_e *Agent_Expecter) Issue(entityId interface{}, ttl interface{}, ipAddrs interface{}) *Agent_Issue_Call {
	return &Agent_Issue_Call{Call: _e.mock.On("Issue", entityId, ttl, ipAddrs)}
}

func (_c *Agent_Issue_Call) Run(run func(entityId string, ttl string, ipAddrs []string)) *Agent_Issue_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 string
		if args[0] != nil {
			arg0 = args[0].(string)
		}
		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 *Agent_Issue_Call) Return(cert certs.Cert, err error) *Agent_Issue_Call {
	_c.Call.Return(cert, err)
	return _c
}

func (_c *Agent_Issue_Call) RunAndReturn(run func(entityId string, ttl string, ipAddrs []string) (certs.Cert, error)) *Agent_Issue_Call {
	_c.Call.Return(run)
	return _c
}

// ListCerts provides a mock function for the type Agent
func (_mock *Agent) ListCerts(pm certs.PageMetadata) (certs.CertPage, error) {
	ret := _mock.Called(pm)

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

	var r0 certs.CertPage
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(certs.PageMetadata) (certs.CertPage, error)); ok {
		return returnFunc(pm)
	}
	if returnFunc, ok := ret.Get(0).(func(certs.PageMetadata) certs.CertPage); ok {
		r0 = returnFunc(pm)
	} else {
		r0 = ret.Get(0).(certs.CertPage)
	}
	if returnFunc, ok := ret.Get(1).(func(certs.PageMetadata) error); ok {
		r1 = returnFunc(pm)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// ListCerts is a helper method to define mock.On call
//   - pm certs.PageMetadata
func (_e *Agent_Expecter) ListCerts(pm interface{}) *Agent_ListCerts_Call {
	return &Agent_ListCerts_Call{Call: _e.mock.On("ListCerts", pm)}
}

func (_c *Agent_ListCerts_Call) Run(run func(pm certs.PageMetadata)) *Agent_ListCerts_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 certs.PageMetadata
		if args[0] != nil {
			arg0 = args[0].(certs.PageMetadata)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *Agent_ListCerts_Call) Return(certPage certs.CertPage, err error) *Agent_ListCerts_Call {
	_c.Call.Return(certPage, err)
	return _c
}

func (_c *Agent_ListCerts_Call) RunAndReturn(run func(pm certs.PageMetadata) (certs.CertPage, error)) *Agent_ListCerts_Call {
	_c.Call.Return(run)
	return _c
}

// Revoke provides a mock function for the type Agent
func (_mock *Agent) Revoke(serialNumber string) error {
	ret := _mock.Called(serialNumber)

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

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

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

// Revoke is a helper method to define mock.On call
//   - serialNumber string
func (_e *Agent_Expecter) Revoke(serialNumber interface{}) *Agent_Revoke_Call {
	return &Agent_Revoke_Call{Call: _e.mock.On("Revoke", serialNumber)}
}

func (_c *Agent_Revoke_Call) Run(run func(serialNumber string)) *Agent_Revoke_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 string
		if args[0] != nil {
			arg0 = args[0].(string)
		}
		run(
			arg0,
		)
	})
	return _c
}

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

func (_c *Agent_Revoke_Call) RunAndReturn(run func(serialNumber string) error) *Agent_Revoke_Call {
	_c.Call.Return(run)
	return _c
}

// View provides a mock function for the type Agent
func (_mock *Agent) View(serialNumber string) (certs.Cert, error) {
	ret := _mock.Called(serialNumber)

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

	var r0 certs.Cert
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(string) (certs.Cert, error)); ok {
		return returnFunc(serialNumber)
	}
	if returnFunc, ok := ret.Get(0).(func(string) certs.Cert); ok {
		r0 = returnFunc(serialNumber)
	} else {
		r0 = ret.Get(0).(certs.Cert)
	}
	if returnFunc, ok := ret.Get(1).(func(string) error); ok {
		r1 = returnFunc(serialNumber)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// View is a helper method to define mock.On call
//   - serialNumber string
func (_e *Agent_Expecter) View(serialNumber interface{}) *Agent_View_Call {
	return &Agent_View_Call{Call: _e.mock.On("View", serialNumber)}
}

func (_c *Agent_View_Call) Run(run func(serialNumber string)) *Agent_View_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 string
		if args[0] != nil {
			arg0 = args[0].(string)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *Agent_View_Call) Return(cert certs.Cert, err error) *Agent_View_Call {
	_c.Call.Return(cert, err)
	return _c
}

func (_c *Agent_View_Call) RunAndReturn(run func(serialNumber string) (certs.Cert, error)) *Agent_View_Call {
	_c.Call.Return(run)
	return _c
}
