// 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"
	"github.com/absmach/magistrala/pkg/authn"
	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}
}

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

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

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

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

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

func (_c *Service_GenerateCRL_Call) Run(run func(ctx context.Context)) *Service_GenerateCRL_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 *Service_GenerateCRL_Call) Return(bytes []byte, err error) *Service_GenerateCRL_Call {
	_c.Call.Return(bytes, err)
	return _c
}

func (_c *Service_GenerateCRL_Call) RunAndReturn(run func(ctx context.Context) ([]byte, error)) *Service_GenerateCRL_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

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

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

func (_c *Service_GetEntityID_Call) Run(run func(ctx context.Context, serialNumber string)) *Service_GetEntityID_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_GetEntityID_Call) Return(s string, err error) *Service_GetEntityID_Call {
	_c.Call.Return(s, err)
	return _c
}

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

// IssueCert provides a mock function for the type Service
func (_mock *Service) IssueCert(ctx context.Context, session authn.Session, entityID string, ttl string, ipAddrs []string, option certs.SubjectOptions) (certs.Certificate, error) {
	ret := _mock.Called(ctx, session, entityID, ttl, ipAddrs, option)

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

	var r0 certs.Certificate
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string, string, []string, certs.SubjectOptions) (certs.Certificate, error)); ok {
		return returnFunc(ctx, session, entityID, ttl, ipAddrs, option)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string, string, []string, certs.SubjectOptions) certs.Certificate); ok {
		r0 = returnFunc(ctx, session, entityID, ttl, ipAddrs, option)
	} else {
		r0 = ret.Get(0).(certs.Certificate)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, authn.Session, string, string, []string, certs.SubjectOptions) error); ok {
		r1 = returnFunc(ctx, session, entityID, ttl, ipAddrs, option)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// IssueCert is a helper method to define mock.On call
//   - ctx context.Context
//   - session authn.Session
//   - entityID string
//   - ttl string
//   - ipAddrs []string
//   - option certs.SubjectOptions
func (_e *Service_Expecter) IssueCert(ctx interface{}, session interface{}, entityID interface{}, ttl interface{}, ipAddrs interface{}, option interface{}) *Service_IssueCert_Call {
	return &Service_IssueCert_Call{Call: _e.mock.On("IssueCert", ctx, session, entityID, ttl, ipAddrs, option)}
}

func (_c *Service_IssueCert_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, ttl string, ipAddrs []string, option certs.SubjectOptions)) *Service_IssueCert_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 authn.Session
		if args[1] != nil {
			arg1 = args[1].(authn.Session)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		var arg3 string
		if args[3] != nil {
			arg3 = args[3].(string)
		}
		var arg4 []string
		if args[4] != nil {
			arg4 = args[4].([]string)
		}
		var arg5 certs.SubjectOptions
		if args[5] != nil {
			arg5 = args[5].(certs.SubjectOptions)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
			arg4,
			arg5,
		)
	})
	return _c
}

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

func (_c *Service_IssueCert_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, entityID string, ttl string, ipAddrs []string, option certs.SubjectOptions) (certs.Certificate, error)) *Service_IssueCert_Call {
	_c.Call.Return(run)
	return _c
}

// IssueFromCSR provides a mock function for the type Service
func (_mock *Service) IssueFromCSR(ctx context.Context, session authn.Session, entityID string, ttl string, csr certs.CSR) (certs.Certificate, error) {
	ret := _mock.Called(ctx, session, entityID, ttl, csr)

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

	var r0 certs.Certificate
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string, string, certs.CSR) (certs.Certificate, error)); ok {
		return returnFunc(ctx, session, entityID, ttl, csr)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string, string, certs.CSR) certs.Certificate); ok {
		r0 = returnFunc(ctx, session, entityID, ttl, csr)
	} else {
		r0 = ret.Get(0).(certs.Certificate)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, authn.Session, string, string, certs.CSR) error); ok {
		r1 = returnFunc(ctx, session, entityID, ttl, csr)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// IssueFromCSR is a helper method to define mock.On call
//   - ctx context.Context
//   - session authn.Session
//   - entityID string
//   - ttl string
//   - csr certs.CSR
func (_e *Service_Expecter) IssueFromCSR(ctx interface{}, session interface{}, entityID interface{}, ttl interface{}, csr interface{}) *Service_IssueFromCSR_Call {
	return &Service_IssueFromCSR_Call{Call: _e.mock.On("IssueFromCSR", ctx, session, entityID, ttl, csr)}
}

func (_c *Service_IssueFromCSR_Call) Run(run func(ctx context.Context, session authn.Session, entityID string, ttl string, csr certs.CSR)) *Service_IssueFromCSR_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 authn.Session
		if args[1] != nil {
			arg1 = args[1].(authn.Session)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		var arg3 string
		if args[3] != nil {
			arg3 = args[3].(string)
		}
		var arg4 certs.CSR
		if args[4] != nil {
			arg4 = args[4].(certs.CSR)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
			arg4,
		)
	})
	return _c
}

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

func (_c *Service_IssueFromCSR_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, entityID string, ttl string, csr certs.CSR) (certs.Certificate, error)) *Service_IssueFromCSR_Call {
	_c.Call.Return(run)
	return _c
}

// IssueFromCSRInternal provides a mock function for the type Service
func (_mock *Service) IssueFromCSRInternal(ctx context.Context, entityID string, ttl string, csr certs.CSR) (certs.Certificate, error) {
	ret := _mock.Called(ctx, entityID, ttl, csr)

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

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

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

// IssueFromCSRInternal is a helper method to define mock.On call
//   - ctx context.Context
//   - entityID string
//   - ttl string
//   - csr certs.CSR
func (_e *Service_Expecter) IssueFromCSRInternal(ctx interface{}, entityID interface{}, ttl interface{}, csr interface{}) *Service_IssueFromCSRInternal_Call {
	return &Service_IssueFromCSRInternal_Call{Call: _e.mock.On("IssueFromCSRInternal", ctx, entityID, ttl, csr)}
}

func (_c *Service_IssueFromCSRInternal_Call) Run(run func(ctx context.Context, entityID string, ttl string, csr certs.CSR)) *Service_IssueFromCSRInternal_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)
		}
		var arg3 certs.CSR
		if args[3] != nil {
			arg3 = args[3].(certs.CSR)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
		)
	})
	return _c
}

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

func (_c *Service_IssueFromCSRInternal_Call) RunAndReturn(run func(ctx context.Context, entityID string, ttl string, csr certs.CSR) (certs.Certificate, error)) *Service_IssueFromCSRInternal_Call {
	_c.Call.Return(run)
	return _c
}

// ListCerts provides a mock function for the type Service
func (_mock *Service) ListCerts(ctx context.Context, session authn.Session, pm certs.PageMetadata) (certs.CertificatePage, error) {
	ret := _mock.Called(ctx, session, 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(context.Context, authn.Session, certs.PageMetadata) (certs.CertificatePage, error)); ok {
		return returnFunc(ctx, session, pm)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, certs.PageMetadata) certs.CertificatePage); ok {
		r0 = returnFunc(ctx, session, pm)
	} else {
		r0 = ret.Get(0).(certs.CertificatePage)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, authn.Session, certs.PageMetadata) error); ok {
		r1 = returnFunc(ctx, session, pm)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// ListCerts is a helper method to define mock.On call
//   - ctx context.Context
//   - session authn.Session
//   - pm certs.PageMetadata
func (_e *Service_Expecter) ListCerts(ctx interface{}, session interface{}, pm interface{}) *Service_ListCerts_Call {
	return &Service_ListCerts_Call{Call: _e.mock.On("ListCerts", ctx, session, pm)}
}

func (_c *Service_ListCerts_Call) Run(run func(ctx context.Context, session authn.Session, pm certs.PageMetadata)) *Service_ListCerts_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 authn.Session
		if args[1] != nil {
			arg1 = args[1].(authn.Session)
		}
		var arg2 certs.PageMetadata
		if args[2] != nil {
			arg2 = args[2].(certs.PageMetadata)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *Service_ListCerts_Call) Return(certificatePage certs.CertificatePage, err error) *Service_ListCerts_Call {
	_c.Call.Return(certificatePage, err)
	return _c
}

func (_c *Service_ListCerts_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, pm certs.PageMetadata) (certs.CertificatePage, error)) *Service_ListCerts_Call {
	_c.Call.Return(run)
	return _c
}

// OCSP provides a mock function for the type Service
func (_mock *Service) OCSP(ctx context.Context, serialNumber string, ocspRequestDER []byte) ([]byte, error) {
	ret := _mock.Called(ctx, 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(context.Context, string, []byte) ([]byte, error)); ok {
		return returnFunc(ctx, serialNumber, ocspRequestDER)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, []byte) []byte); ok {
		r0 = returnFunc(ctx, serialNumber, ocspRequestDER)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]byte)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, []byte) error); ok {
		r1 = returnFunc(ctx, serialNumber, ocspRequestDER)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

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

func (_c *Service_OCSP_Call) Run(run func(ctx context.Context, serialNumber string, ocspRequestDER []byte)) *Service_OCSP_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 []byte
		if args[2] != nil {
			arg2 = args[2].([]byte)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

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

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

// RenewCert provides a mock function for the type Service
func (_mock *Service) RenewCert(ctx context.Context, session authn.Session, serialNumber string) (certs.Certificate, error) {
	ret := _mock.Called(ctx, session, serialNumber)

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

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

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

// RenewCert is a helper method to define mock.On call
//   - ctx context.Context
//   - session authn.Session
//   - serialNumber string
func (_e *Service_Expecter) RenewCert(ctx interface{}, session interface{}, serialNumber interface{}) *Service_RenewCert_Call {
	return &Service_RenewCert_Call{Call: _e.mock.On("RenewCert", ctx, session, serialNumber)}
}

func (_c *Service_RenewCert_Call) Run(run func(ctx context.Context, session authn.Session, serialNumber string)) *Service_RenewCert_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 authn.Session
		if args[1] != nil {
			arg1 = args[1].(authn.Session)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

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

func (_c *Service_RenewCert_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, serialNumber string) (certs.Certificate, error)) *Service_RenewCert_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

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

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

func (_c *Service_RetrieveCAChain_Call) Run(run func(ctx context.Context)) *Service_RetrieveCAChain_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 *Service_RetrieveCAChain_Call) Return(certificate certs.Certificate, err error) *Service_RetrieveCAChain_Call {
	_c.Call.Return(certificate, err)
	return _c
}

func (_c *Service_RetrieveCAChain_Call) RunAndReturn(run func(ctx context.Context) (certs.Certificate, error)) *Service_RetrieveCAChain_Call {
	_c.Call.Return(run)
	return _c
}

// RevokeAll provides a mock function for the type Service
func (_mock *Service) RevokeAll(ctx context.Context, session authn.Session, entityID string) error {
	ret := _mock.Called(ctx, session, entityID)

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

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

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

// RevokeAll is a helper method to define mock.On call
//   - ctx context.Context
//   - session authn.Session
//   - entityID string
func (_e *Service_Expecter) RevokeAll(ctx interface{}, session interface{}, entityID interface{}) *Service_RevokeAll_Call {
	return &Service_RevokeAll_Call{Call: _e.mock.On("RevokeAll", ctx, session, entityID)}
}

func (_c *Service_RevokeAll_Call) Run(run func(ctx context.Context, session authn.Session, entityID string)) *Service_RevokeAll_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 authn.Session
		if args[1] != nil {
			arg1 = args[1].(authn.Session)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

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

func (_c *Service_RevokeAll_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, entityID string) error) *Service_RevokeAll_Call {
	_c.Call.Return(run)
	return _c
}

// RevokeBySerial provides a mock function for the type Service
func (_mock *Service) RevokeBySerial(ctx context.Context, session authn.Session, serialNumber string) error {
	ret := _mock.Called(ctx, session, serialNumber)

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

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

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

// RevokeBySerial is a helper method to define mock.On call
//   - ctx context.Context
//   - session authn.Session
//   - serialNumber string
func (_e *Service_Expecter) RevokeBySerial(ctx interface{}, session interface{}, serialNumber interface{}) *Service_RevokeBySerial_Call {
	return &Service_RevokeBySerial_Call{Call: _e.mock.On("RevokeBySerial", ctx, session, serialNumber)}
}

func (_c *Service_RevokeBySerial_Call) Run(run func(ctx context.Context, session authn.Session, serialNumber string)) *Service_RevokeBySerial_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 authn.Session
		if args[1] != nil {
			arg1 = args[1].(authn.Session)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

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

func (_c *Service_RevokeBySerial_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, serialNumber string) error) *Service_RevokeBySerial_Call {
	_c.Call.Return(run)
	return _c
}

// ViewCert provides a mock function for the type Service
func (_mock *Service) ViewCert(ctx context.Context, session authn.Session, serialNumber string) (certs.Certificate, error) {
	ret := _mock.Called(ctx, session, serialNumber)

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

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

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

// ViewCert is a helper method to define mock.On call
//   - ctx context.Context
//   - session authn.Session
//   - serialNumber string
func (_e *Service_Expecter) ViewCert(ctx interface{}, session interface{}, serialNumber interface{}) *Service_ViewCert_Call {
	return &Service_ViewCert_Call{Call: _e.mock.On("ViewCert", ctx, session, serialNumber)}
}

func (_c *Service_ViewCert_Call) Run(run func(ctx context.Context, session authn.Session, serialNumber string)) *Service_ViewCert_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 authn.Session
		if args[1] != nil {
			arg1 = args[1].(authn.Session)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

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

func (_c *Service_ViewCert_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, serialNumber string) (certs.Certificate, error)) *Service_ViewCert_Call {
	_c.Call.Return(run)
	return _c
}
