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

// GetCA provides a mock function for the type Agent
func (_mock *Agent) GetCA() ([]byte, error) {
	ret := _mock.Called()

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

	var r0 []byte
	var r1 error
	if returnFunc, ok := ret.Get(0).(func() ([]byte, error)); ok {
		return returnFunc()
	}
	if returnFunc, ok := ret.Get(0).(func() []byte); ok {
		r0 = returnFunc()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]byte)
		}
	}
	if returnFunc, ok := ret.Get(1).(func() error); ok {
		r1 = returnFunc()
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetCA is a helper method to define mock.On call
func (_e *Agent_Expecter) GetCA() *Agent_GetCA_Call {
	return &Agent_GetCA_Call{Call: _e.mock.On("GetCA")}
}

func (_c *Agent_GetCA_Call) Run(run func()) *Agent_GetCA_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *Agent_GetCA_Call) Return(bytes []byte, err error) *Agent_GetCA_Call {
	_c.Call.Return(bytes, err)
	return _c
}

func (_c *Agent_GetCA_Call) RunAndReturn(run func() ([]byte, error)) *Agent_GetCA_Call {
	_c.Call.Return(run)
	return _c
}

// GetCAChain provides a mock function for the type Agent
func (_mock *Agent) GetCAChain() ([]byte, error) {
	ret := _mock.Called()

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

	var r0 []byte
	var r1 error
	if returnFunc, ok := ret.Get(0).(func() ([]byte, error)); ok {
		return returnFunc()
	}
	if returnFunc, ok := ret.Get(0).(func() []byte); ok {
		r0 = returnFunc()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]byte)
		}
	}
	if returnFunc, ok := ret.Get(1).(func() error); ok {
		r1 = returnFunc()
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetCAChain is a helper method to define mock.On call
func (_e *Agent_Expecter) GetCAChain() *Agent_GetCAChain_Call {
	return &Agent_GetCAChain_Call{Call: _e.mock.On("GetCAChain")}
}

func (_c *Agent_GetCAChain_Call) Run(run func()) *Agent_GetCAChain_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *Agent_GetCAChain_Call) Return(bytes []byte, err error) *Agent_GetCAChain_Call {
	_c.Call.Return(bytes, err)
	return _c
}

func (_c *Agent_GetCAChain_Call) RunAndReturn(run func() ([]byte, error)) *Agent_GetCAChain_Call {
	_c.Call.Return(run)
	return _c
}

// GetCRL provides a mock function for the type Agent
func (_mock *Agent) GetCRL() ([]byte, error) {
	ret := _mock.Called()

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

	var r0 []byte
	var r1 error
	if returnFunc, ok := ret.Get(0).(func() ([]byte, error)); ok {
		return returnFunc()
	}
	if returnFunc, ok := ret.Get(0).(func() []byte); ok {
		r0 = returnFunc()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]byte)
		}
	}
	if returnFunc, ok := ret.Get(1).(func() error); ok {
		r1 = returnFunc()
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetCRL is a helper method to define mock.On call
func (_e *Agent_Expecter) GetCRL() *Agent_GetCRL_Call {
	return &Agent_GetCRL_Call{Call: _e.mock.On("GetCRL")}
}

func (_c *Agent_GetCRL_Call) Run(run func()) *Agent_GetCRL_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *Agent_GetCRL_Call) Return(bytes []byte, err error) *Agent_GetCRL_Call {
	_c.Call.Return(bytes, err)
	return _c
}

func (_c *Agent_GetCRL_Call) RunAndReturn(run func() ([]byte, error)) *Agent_GetCRL_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	var r0 certs.Certificate
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(string, []string, certs.SubjectOptions) (certs.Certificate, error)); ok {
		return returnFunc(ttl, ipAddrs, options)
	}
	if returnFunc, ok := ret.Get(0).(func(string, []string, certs.SubjectOptions) certs.Certificate); ok {
		r0 = returnFunc(ttl, ipAddrs, options)
	} else {
		r0 = ret.Get(0).(certs.Certificate)
	}
	if returnFunc, ok := ret.Get(1).(func(string, []string, certs.SubjectOptions) error); ok {
		r1 = returnFunc(ttl, ipAddrs, options)
	} 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
//   - ttl string
//   - ipAddrs []string
//   - options certs.SubjectOptions
func (_e *Agent_Expecter) Issue(ttl interface{}, ipAddrs interface{}, options interface{}) *Agent_Issue_Call {
	return &Agent_Issue_Call{Call: _e.mock.On("Issue", ttl, ipAddrs, options)}
}

func (_c *Agent_Issue_Call) Run(run func(ttl string, ipAddrs []string, options certs.SubjectOptions)) *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 certs.SubjectOptions
		if args[2] != nil {
			arg2 = args[2].(certs.SubjectOptions)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *Agent_Issue_Call) Return(certificate certs.Certificate, err error) *Agent_Issue_Call {
	_c.Call.Return(certificate, err)
	return _c
}

func (_c *Agent_Issue_Call) RunAndReturn(run func(ttl string, ipAddrs []string, options certs.SubjectOptions) (certs.Certificate, 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.CertificatePage, error) {
	ret := _mock.Called(pm)

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

	var r0 certs.CertificatePage
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(certs.PageMetadata) (certs.CertificatePage, error)); ok {
		return returnFunc(pm)
	}
	if returnFunc, ok := ret.Get(0).(func(certs.PageMetadata) certs.CertificatePage); ok {
		r0 = returnFunc(pm)
	} else {
		r0 = ret.Get(0).(certs.CertificatePage)
	}
	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(certificatePage certs.CertificatePage, err error) *Agent_ListCerts_Call {
	_c.Call.Return(certificatePage, err)
	return _c
}

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

// OCSP provides a mock function for the type Agent
func (_mock *Agent) OCSP(serialNumber string, ocspRequestDER []byte) ([]byte, error) {
	ret := _mock.Called(serialNumber, ocspRequestDER)

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

	var r0 []byte
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(string, []byte) ([]byte, error)); ok {
		return returnFunc(serialNumber, ocspRequestDER)
	}
	if returnFunc, ok := ret.Get(0).(func(string, []byte) []byte); ok {
		r0 = returnFunc(serialNumber, ocspRequestDER)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]byte)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(string, []byte) error); ok {
		r1 = returnFunc(serialNumber, ocspRequestDER)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// OCSP is a helper method to define mock.On call
//   - serialNumber string
//   - ocspRequestDER []byte
func (_e *Agent_Expecter) OCSP(serialNumber interface{}, ocspRequestDER interface{}) *Agent_OCSP_Call {
	return &Agent_OCSP_Call{Call: _e.mock.On("OCSP", serialNumber, ocspRequestDER)}
}

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

func (_c *Agent_OCSP_Call) Return(bytes []byte, err error) *Agent_OCSP_Call {
	_c.Call.Return(bytes, err)
	return _c
}

func (_c *Agent_OCSP_Call) RunAndReturn(run func(serialNumber string, ocspRequestDER []byte) ([]byte, error)) *Agent_OCSP_Call {
	_c.Call.Return(run)
	return _c
}

// Renew provides a mock function for the type Agent
func (_mock *Agent) Renew(cert certs.Certificate, increment string) (certs.Certificate, error) {
	ret := _mock.Called(cert, increment)

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

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

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

// Renew is a helper method to define mock.On call
//   - cert certs.Certificate
//   - increment string
func (_e *Agent_Expecter) Renew(cert interface{}, increment interface{}) *Agent_Renew_Call {
	return &Agent_Renew_Call{Call: _e.mock.On("Renew", cert, increment)}
}

func (_c *Agent_Renew_Call) Run(run func(cert certs.Certificate, increment string)) *Agent_Renew_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 certs.Certificate
		if args[0] != nil {
			arg0 = args[0].(certs.Certificate)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Agent_Renew_Call) Return(certificate certs.Certificate, err error) *Agent_Renew_Call {
	_c.Call.Return(certificate, err)
	return _c
}

func (_c *Agent_Renew_Call) RunAndReturn(run func(cert certs.Certificate, increment string) (certs.Certificate, error)) *Agent_Renew_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
}

// SignCSR provides a mock function for the type Agent
func (_mock *Agent) SignCSR(csr []byte, ttl string) (certs.Certificate, error) {
	ret := _mock.Called(csr, ttl)

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

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

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

// SignCSR is a helper method to define mock.On call
//   - csr []byte
//   - ttl string
func (_e *Agent_Expecter) SignCSR(csr interface{}, ttl interface{}) *Agent_SignCSR_Call {
	return &Agent_SignCSR_Call{Call: _e.mock.On("SignCSR", csr, ttl)}
}

func (_c *Agent_SignCSR_Call) Run(run func(csr []byte, ttl string)) *Agent_SignCSR_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 []byte
		if args[0] != nil {
			arg0 = args[0].([]byte)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Agent_SignCSR_Call) Return(certificate certs.Certificate, err error) *Agent_SignCSR_Call {
	_c.Call.Return(certificate, err)
	return _c
}

func (_c *Agent_SignCSR_Call) RunAndReturn(run func(csr []byte, ttl string) (certs.Certificate, error)) *Agent_SignCSR_Call {
	_c.Call.Return(run)
	return _c
}

// StartSecretRenewal provides a mock function for the type Agent
func (_mock *Agent) StartSecretRenewal(ctx context.Context) error {
	ret := _mock.Called(ctx)

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

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

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

// StartSecretRenewal is a helper method to define mock.On call
//   - ctx context.Context
func (_e *Agent_Expecter) StartSecretRenewal(ctx interface{}) *Agent_StartSecretRenewal_Call {
	return &Agent_StartSecretRenewal_Call{Call: _e.mock.On("StartSecretRenewal", ctx)}
}

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

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

func (_c *Agent_StartSecretRenewal_Call) RunAndReturn(run func(ctx context.Context) error) *Agent_StartSecretRenewal_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	var r0 certs.Certificate
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(string) (certs.Certificate, error)); ok {
		return returnFunc(serialNumber)
	}
	if returnFunc, ok := ret.Get(0).(func(string) certs.Certificate); ok {
		r0 = returnFunc(serialNumber)
	} else {
		r0 = ret.Get(0).(certs.Certificate)
	}
	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(certificate certs.Certificate, err error) *Agent_View_Call {
	_c.Call.Return(certificate, err)
	return _c
}

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