// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify

package certmock

import (
	"github.com/asgardeo/thunder/internal/cert/constants"
	"github.com/asgardeo/thunder/internal/cert/model"
	"github.com/asgardeo/thunder/internal/system/error/serviceerror"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type CertificateServiceInterfaceMock_Expecter struct {
	mock *mock.Mock
}

func (_m *CertificateServiceInterfaceMock) EXPECT() *CertificateServiceInterfaceMock_Expecter {
	return &CertificateServiceInterfaceMock_Expecter{mock: &_m.Mock}
}

// CreateCertificate provides a mock function for the type CertificateServiceInterfaceMock
func (_mock *CertificateServiceInterfaceMock) CreateCertificate(cert *model.Certificate) (*model.Certificate, *serviceerror.ServiceError) {
	ret := _mock.Called(cert)

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

	var r0 *model.Certificate
	var r1 *serviceerror.ServiceError
	if returnFunc, ok := ret.Get(0).(func(*model.Certificate) (*model.Certificate, *serviceerror.ServiceError)); ok {
		return returnFunc(cert)
	}
	if returnFunc, ok := ret.Get(0).(func(*model.Certificate) *model.Certificate); ok {
		r0 = returnFunc(cert)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.Certificate)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(*model.Certificate) *serviceerror.ServiceError); ok {
		r1 = returnFunc(cert)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*serviceerror.ServiceError)
		}
	}
	return r0, r1
}

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

// CreateCertificate is a helper method to define mock.On call
//   - cert *model.Certificate
func (_e *CertificateServiceInterfaceMock_Expecter) CreateCertificate(cert interface{}) *CertificateServiceInterfaceMock_CreateCertificate_Call {
	return &CertificateServiceInterfaceMock_CreateCertificate_Call{Call: _e.mock.On("CreateCertificate", cert)}
}

func (_c *CertificateServiceInterfaceMock_CreateCertificate_Call) Run(run func(cert *model.Certificate)) *CertificateServiceInterfaceMock_CreateCertificate_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *model.Certificate
		if args[0] != nil {
			arg0 = args[0].(*model.Certificate)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *CertificateServiceInterfaceMock_CreateCertificate_Call) Return(certificate *model.Certificate, serviceError *serviceerror.ServiceError) *CertificateServiceInterfaceMock_CreateCertificate_Call {
	_c.Call.Return(certificate, serviceError)
	return _c
}

func (_c *CertificateServiceInterfaceMock_CreateCertificate_Call) RunAndReturn(run func(cert *model.Certificate) (*model.Certificate, *serviceerror.ServiceError)) *CertificateServiceInterfaceMock_CreateCertificate_Call {
	_c.Call.Return(run)
	return _c
}

// DeleteCertificateByID provides a mock function for the type CertificateServiceInterfaceMock
func (_mock *CertificateServiceInterfaceMock) DeleteCertificateByID(id string) *serviceerror.ServiceError {
	ret := _mock.Called(id)

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

	var r0 *serviceerror.ServiceError
	if returnFunc, ok := ret.Get(0).(func(string) *serviceerror.ServiceError); ok {
		r0 = returnFunc(id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*serviceerror.ServiceError)
		}
	}
	return r0
}

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

// DeleteCertificateByID is a helper method to define mock.On call
//   - id string
func (_e *CertificateServiceInterfaceMock_Expecter) DeleteCertificateByID(id interface{}) *CertificateServiceInterfaceMock_DeleteCertificateByID_Call {
	return &CertificateServiceInterfaceMock_DeleteCertificateByID_Call{Call: _e.mock.On("DeleteCertificateByID", id)}
}

func (_c *CertificateServiceInterfaceMock_DeleteCertificateByID_Call) Run(run func(id string)) *CertificateServiceInterfaceMock_DeleteCertificateByID_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 *CertificateServiceInterfaceMock_DeleteCertificateByID_Call) Return(serviceError *serviceerror.ServiceError) *CertificateServiceInterfaceMock_DeleteCertificateByID_Call {
	_c.Call.Return(serviceError)
	return _c
}

func (_c *CertificateServiceInterfaceMock_DeleteCertificateByID_Call) RunAndReturn(run func(id string) *serviceerror.ServiceError) *CertificateServiceInterfaceMock_DeleteCertificateByID_Call {
	_c.Call.Return(run)
	return _c
}

// DeleteCertificateByReference provides a mock function for the type CertificateServiceInterfaceMock
func (_mock *CertificateServiceInterfaceMock) DeleteCertificateByReference(refType constants.CertificateReferenceType, refID string) *serviceerror.ServiceError {
	ret := _mock.Called(refType, refID)

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

	var r0 *serviceerror.ServiceError
	if returnFunc, ok := ret.Get(0).(func(constants.CertificateReferenceType, string) *serviceerror.ServiceError); ok {
		r0 = returnFunc(refType, refID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*serviceerror.ServiceError)
		}
	}
	return r0
}

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

// DeleteCertificateByReference is a helper method to define mock.On call
//   - refType constants.CertificateReferenceType
//   - refID string
func (_e *CertificateServiceInterfaceMock_Expecter) DeleteCertificateByReference(refType interface{}, refID interface{}) *CertificateServiceInterfaceMock_DeleteCertificateByReference_Call {
	return &CertificateServiceInterfaceMock_DeleteCertificateByReference_Call{Call: _e.mock.On("DeleteCertificateByReference", refType, refID)}
}

func (_c *CertificateServiceInterfaceMock_DeleteCertificateByReference_Call) Run(run func(refType constants.CertificateReferenceType, refID string)) *CertificateServiceInterfaceMock_DeleteCertificateByReference_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 constants.CertificateReferenceType
		if args[0] != nil {
			arg0 = args[0].(constants.CertificateReferenceType)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *CertificateServiceInterfaceMock_DeleteCertificateByReference_Call) Return(serviceError *serviceerror.ServiceError) *CertificateServiceInterfaceMock_DeleteCertificateByReference_Call {
	_c.Call.Return(serviceError)
	return _c
}

func (_c *CertificateServiceInterfaceMock_DeleteCertificateByReference_Call) RunAndReturn(run func(refType constants.CertificateReferenceType, refID string) *serviceerror.ServiceError) *CertificateServiceInterfaceMock_DeleteCertificateByReference_Call {
	_c.Call.Return(run)
	return _c
}

// GetCertificateByID provides a mock function for the type CertificateServiceInterfaceMock
func (_mock *CertificateServiceInterfaceMock) GetCertificateByID(id string) (*model.Certificate, *serviceerror.ServiceError) {
	ret := _mock.Called(id)

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

	var r0 *model.Certificate
	var r1 *serviceerror.ServiceError
	if returnFunc, ok := ret.Get(0).(func(string) (*model.Certificate, *serviceerror.ServiceError)); ok {
		return returnFunc(id)
	}
	if returnFunc, ok := ret.Get(0).(func(string) *model.Certificate); ok {
		r0 = returnFunc(id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.Certificate)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(string) *serviceerror.ServiceError); ok {
		r1 = returnFunc(id)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*serviceerror.ServiceError)
		}
	}
	return r0, r1
}

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

// GetCertificateByID is a helper method to define mock.On call
//   - id string
func (_e *CertificateServiceInterfaceMock_Expecter) GetCertificateByID(id interface{}) *CertificateServiceInterfaceMock_GetCertificateByID_Call {
	return &CertificateServiceInterfaceMock_GetCertificateByID_Call{Call: _e.mock.On("GetCertificateByID", id)}
}

func (_c *CertificateServiceInterfaceMock_GetCertificateByID_Call) Run(run func(id string)) *CertificateServiceInterfaceMock_GetCertificateByID_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 *CertificateServiceInterfaceMock_GetCertificateByID_Call) Return(certificate *model.Certificate, serviceError *serviceerror.ServiceError) *CertificateServiceInterfaceMock_GetCertificateByID_Call {
	_c.Call.Return(certificate, serviceError)
	return _c
}

func (_c *CertificateServiceInterfaceMock_GetCertificateByID_Call) RunAndReturn(run func(id string) (*model.Certificate, *serviceerror.ServiceError)) *CertificateServiceInterfaceMock_GetCertificateByID_Call {
	_c.Call.Return(run)
	return _c
}

// GetCertificateByReference provides a mock function for the type CertificateServiceInterfaceMock
func (_mock *CertificateServiceInterfaceMock) GetCertificateByReference(refType constants.CertificateReferenceType, refID string) (*model.Certificate, *serviceerror.ServiceError) {
	ret := _mock.Called(refType, refID)

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

	var r0 *model.Certificate
	var r1 *serviceerror.ServiceError
	if returnFunc, ok := ret.Get(0).(func(constants.CertificateReferenceType, string) (*model.Certificate, *serviceerror.ServiceError)); ok {
		return returnFunc(refType, refID)
	}
	if returnFunc, ok := ret.Get(0).(func(constants.CertificateReferenceType, string) *model.Certificate); ok {
		r0 = returnFunc(refType, refID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.Certificate)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(constants.CertificateReferenceType, string) *serviceerror.ServiceError); ok {
		r1 = returnFunc(refType, refID)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*serviceerror.ServiceError)
		}
	}
	return r0, r1
}

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

// GetCertificateByReference is a helper method to define mock.On call
//   - refType constants.CertificateReferenceType
//   - refID string
func (_e *CertificateServiceInterfaceMock_Expecter) GetCertificateByReference(refType interface{}, refID interface{}) *CertificateServiceInterfaceMock_GetCertificateByReference_Call {
	return &CertificateServiceInterfaceMock_GetCertificateByReference_Call{Call: _e.mock.On("GetCertificateByReference", refType, refID)}
}

func (_c *CertificateServiceInterfaceMock_GetCertificateByReference_Call) Run(run func(refType constants.CertificateReferenceType, refID string)) *CertificateServiceInterfaceMock_GetCertificateByReference_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 constants.CertificateReferenceType
		if args[0] != nil {
			arg0 = args[0].(constants.CertificateReferenceType)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *CertificateServiceInterfaceMock_GetCertificateByReference_Call) Return(certificate *model.Certificate, serviceError *serviceerror.ServiceError) *CertificateServiceInterfaceMock_GetCertificateByReference_Call {
	_c.Call.Return(certificate, serviceError)
	return _c
}

func (_c *CertificateServiceInterfaceMock_GetCertificateByReference_Call) RunAndReturn(run func(refType constants.CertificateReferenceType, refID string) (*model.Certificate, *serviceerror.ServiceError)) *CertificateServiceInterfaceMock_GetCertificateByReference_Call {
	_c.Call.Return(run)
	return _c
}

// UpdateCertificateByID provides a mock function for the type CertificateServiceInterfaceMock
func (_mock *CertificateServiceInterfaceMock) UpdateCertificateByID(id string, cert *model.Certificate) (*model.Certificate, *serviceerror.ServiceError) {
	ret := _mock.Called(id, cert)

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

	var r0 *model.Certificate
	var r1 *serviceerror.ServiceError
	if returnFunc, ok := ret.Get(0).(func(string, *model.Certificate) (*model.Certificate, *serviceerror.ServiceError)); ok {
		return returnFunc(id, cert)
	}
	if returnFunc, ok := ret.Get(0).(func(string, *model.Certificate) *model.Certificate); ok {
		r0 = returnFunc(id, cert)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.Certificate)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(string, *model.Certificate) *serviceerror.ServiceError); ok {
		r1 = returnFunc(id, cert)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*serviceerror.ServiceError)
		}
	}
	return r0, r1
}

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

// UpdateCertificateByID is a helper method to define mock.On call
//   - id string
//   - cert *model.Certificate
func (_e *CertificateServiceInterfaceMock_Expecter) UpdateCertificateByID(id interface{}, cert interface{}) *CertificateServiceInterfaceMock_UpdateCertificateByID_Call {
	return &CertificateServiceInterfaceMock_UpdateCertificateByID_Call{Call: _e.mock.On("UpdateCertificateByID", id, cert)}
}

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

func (_c *CertificateServiceInterfaceMock_UpdateCertificateByID_Call) Return(certificate *model.Certificate, serviceError *serviceerror.ServiceError) *CertificateServiceInterfaceMock_UpdateCertificateByID_Call {
	_c.Call.Return(certificate, serviceError)
	return _c
}

func (_c *CertificateServiceInterfaceMock_UpdateCertificateByID_Call) RunAndReturn(run func(id string, cert *model.Certificate) (*model.Certificate, *serviceerror.ServiceError)) *CertificateServiceInterfaceMock_UpdateCertificateByID_Call {
	_c.Call.Return(run)
	return _c
}

// UpdateCertificateByReference provides a mock function for the type CertificateServiceInterfaceMock
func (_mock *CertificateServiceInterfaceMock) UpdateCertificateByReference(refType constants.CertificateReferenceType, refID string, cert *model.Certificate) (*model.Certificate, *serviceerror.ServiceError) {
	ret := _mock.Called(refType, refID, cert)

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

	var r0 *model.Certificate
	var r1 *serviceerror.ServiceError
	if returnFunc, ok := ret.Get(0).(func(constants.CertificateReferenceType, string, *model.Certificate) (*model.Certificate, *serviceerror.ServiceError)); ok {
		return returnFunc(refType, refID, cert)
	}
	if returnFunc, ok := ret.Get(0).(func(constants.CertificateReferenceType, string, *model.Certificate) *model.Certificate); ok {
		r0 = returnFunc(refType, refID, cert)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.Certificate)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(constants.CertificateReferenceType, string, *model.Certificate) *serviceerror.ServiceError); ok {
		r1 = returnFunc(refType, refID, cert)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*serviceerror.ServiceError)
		}
	}
	return r0, r1
}

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

// UpdateCertificateByReference is a helper method to define mock.On call
//   - refType constants.CertificateReferenceType
//   - refID string
//   - cert *model.Certificate
func (_e *CertificateServiceInterfaceMock_Expecter) UpdateCertificateByReference(refType interface{}, refID interface{}, cert interface{}) *CertificateServiceInterfaceMock_UpdateCertificateByReference_Call {
	return &CertificateServiceInterfaceMock_UpdateCertificateByReference_Call{Call: _e.mock.On("UpdateCertificateByReference", refType, refID, cert)}
}

func (_c *CertificateServiceInterfaceMock_UpdateCertificateByReference_Call) Run(run func(refType constants.CertificateReferenceType, refID string, cert *model.Certificate)) *CertificateServiceInterfaceMock_UpdateCertificateByReference_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 constants.CertificateReferenceType
		if args[0] != nil {
			arg0 = args[0].(constants.CertificateReferenceType)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 *model.Certificate
		if args[2] != nil {
			arg2 = args[2].(*model.Certificate)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *CertificateServiceInterfaceMock_UpdateCertificateByReference_Call) Return(certificate *model.Certificate, serviceError *serviceerror.ServiceError) *CertificateServiceInterfaceMock_UpdateCertificateByReference_Call {
	_c.Call.Return(certificate, serviceError)
	return _c
}

func (_c *CertificateServiceInterfaceMock_UpdateCertificateByReference_Call) RunAndReturn(run func(refType constants.CertificateReferenceType, refID string, cert *model.Certificate) (*model.Certificate, *serviceerror.ServiceError)) *CertificateServiceInterfaceMock_UpdateCertificateByReference_Call {
	_c.Call.Return(run)
	return _c
}
