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

// IssueCert provides a mock function for the type Service
func (_mock *Service) IssueCert(ctx context.Context, domainID string, token string, clientID string, ttl string) (certs.Cert, error) {
	ret := _mock.Called(ctx, domainID, token, clientID, ttl)

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

	var r0 certs.Cert
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, string) (certs.Cert, error)); ok {
		return returnFunc(ctx, domainID, token, clientID, ttl)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, string) certs.Cert); ok {
		r0 = returnFunc(ctx, domainID, token, clientID, ttl)
	} else {
		r0 = ret.Get(0).(certs.Cert)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, string, string) error); ok {
		r1 = returnFunc(ctx, domainID, token, clientID, ttl)
	} 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
//   - domainID string
//   - token string
//   - clientID string
//   - ttl string
func (_e *Service_Expecter) IssueCert(ctx interface{}, domainID interface{}, token interface{}, clientID interface{}, ttl interface{}) *Service_IssueCert_Call {
	return &Service_IssueCert_Call{Call: _e.mock.On("IssueCert", ctx, domainID, token, clientID, ttl)}
}

func (_c *Service_IssueCert_Call) Run(run func(ctx context.Context, domainID string, token string, clientID string, ttl string)) *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 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		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)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
			arg4,
		)
	})
	return _c
}

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

func (_c *Service_IssueCert_Call) RunAndReturn(run func(ctx context.Context, domainID string, token string, clientID string, ttl string) (certs.Cert, error)) *Service_IssueCert_Call {
	_c.Call.Return(run)
	return _c
}

// ListCerts provides a mock function for the type Service
func (_mock *Service) ListCerts(ctx context.Context, clientID string, pm certs.PageMetadata) (certs.CertPage, error) {
	ret := _mock.Called(ctx, clientID, 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(context.Context, string, certs.PageMetadata) (certs.CertPage, error)); ok {
		return returnFunc(ctx, clientID, pm)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, certs.PageMetadata) certs.CertPage); ok {
		r0 = returnFunc(ctx, clientID, pm)
	} else {
		r0 = ret.Get(0).(certs.CertPage)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, certs.PageMetadata) error); ok {
		r1 = returnFunc(ctx, clientID, 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
//   - clientID string
//   - pm certs.PageMetadata
func (_e *Service_Expecter) ListCerts(ctx interface{}, clientID interface{}, pm interface{}) *Service_ListCerts_Call {
	return &Service_ListCerts_Call{Call: _e.mock.On("ListCerts", ctx, clientID, pm)}
}

func (_c *Service_ListCerts_Call) Run(run func(ctx context.Context, clientID string, 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 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		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(certPage certs.CertPage, err error) *Service_ListCerts_Call {
	_c.Call.Return(certPage, err)
	return _c
}

func (_c *Service_ListCerts_Call) RunAndReturn(run func(ctx context.Context, clientID string, pm certs.PageMetadata) (certs.CertPage, error)) *Service_ListCerts_Call {
	_c.Call.Return(run)
	return _c
}

// ListSerials provides a mock function for the type Service
func (_mock *Service) ListSerials(ctx context.Context, clientID string, pm certs.PageMetadata) (certs.CertPage, error) {
	ret := _mock.Called(ctx, clientID, pm)

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

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

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

// ListSerials is a helper method to define mock.On call
//   - ctx context.Context
//   - clientID string
//   - pm certs.PageMetadata
func (_e *Service_Expecter) ListSerials(ctx interface{}, clientID interface{}, pm interface{}) *Service_ListSerials_Call {
	return &Service_ListSerials_Call{Call: _e.mock.On("ListSerials", ctx, clientID, pm)}
}

func (_c *Service_ListSerials_Call) Run(run func(ctx context.Context, clientID string, pm certs.PageMetadata)) *Service_ListSerials_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 certs.PageMetadata
		if args[2] != nil {
			arg2 = args[2].(certs.PageMetadata)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

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

func (_c *Service_ListSerials_Call) RunAndReturn(run func(ctx context.Context, clientID string, pm certs.PageMetadata) (certs.CertPage, error)) *Service_ListSerials_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

// 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
//   - serialID string
func (_e *Service_Expecter) RevokeBySerial(ctx interface{}, serialID interface{}) *Service_RevokeBySerial_Call {
	return &Service_RevokeBySerial_Call{Call: _e.mock.On("RevokeBySerial", ctx, serialID)}
}

func (_c *Service_RevokeBySerial_Call) Run(run func(ctx context.Context, serialID 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 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Service_RevokeBySerial_Call) Return(revoke certs.Revoke, err error) *Service_RevokeBySerial_Call {
	_c.Call.Return(revoke, err)
	return _c
}

func (_c *Service_RevokeBySerial_Call) RunAndReturn(run func(ctx context.Context, serialID string) (certs.Revoke, error)) *Service_RevokeBySerial_Call {
	_c.Call.Return(run)
	return _c
}

// RevokeCert provides a mock function for the type Service
func (_mock *Service) RevokeCert(ctx context.Context, domainID string, token string, clientID string) (certs.Revoke, error) {
	ret := _mock.Called(ctx, domainID, token, clientID)

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

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

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

// RevokeCert is a helper method to define mock.On call
//   - ctx context.Context
//   - domainID string
//   - token string
//   - clientID string
func (_e *Service_Expecter) RevokeCert(ctx interface{}, domainID interface{}, token interface{}, clientID interface{}) *Service_RevokeCert_Call {
	return &Service_RevokeCert_Call{Call: _e.mock.On("RevokeCert", ctx, domainID, token, clientID)}
}

func (_c *Service_RevokeCert_Call) Run(run func(ctx context.Context, domainID string, token string, clientID string)) *Service_RevokeCert_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 string
		if args[3] != nil {
			arg3 = args[3].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
		)
	})
	return _c
}

func (_c *Service_RevokeCert_Call) Return(revoke certs.Revoke, err error) *Service_RevokeCert_Call {
	_c.Call.Return(revoke, err)
	return _c
}

func (_c *Service_RevokeCert_Call) RunAndReturn(run func(ctx context.Context, domainID string, token string, clientID string) (certs.Revoke, error)) *Service_RevokeCert_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	var r0 certs.Cert
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (certs.Cert, error)); ok {
		return returnFunc(ctx, serialID)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) certs.Cert); ok {
		r0 = returnFunc(ctx, serialID)
	} else {
		r0 = ret.Get(0).(certs.Cert)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = returnFunc(ctx, serialID)
	} 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
//   - serialID string
func (_e *Service_Expecter) ViewCert(ctx interface{}, serialID interface{}) *Service_ViewCert_Call {
	return &Service_ViewCert_Call{Call: _e.mock.On("ViewCert", ctx, serialID)}
}

func (_c *Service_ViewCert_Call) Run(run func(ctx context.Context, serialID 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 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

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

func (_c *Service_ViewCert_Call) RunAndReturn(run func(ctx context.Context, serialID string) (certs.Cert, error)) *Service_ViewCert_Call {
	_c.Call.Return(run)
	return _c
}
