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

package mocks

import (
	"context"

	"github.com/agntcy/identity/pkg/jwk"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type KeyStore_Expecter struct {
	mock *mock.Mock
}

func (_m *KeyStore) EXPECT() *KeyStore_Expecter {
	return &KeyStore_Expecter{mock: &_m.Mock}
}

// GenerateAndSaveKey provides a mock function for the type KeyStore
func (_mock *KeyStore) GenerateAndSaveKey(ctx context.Context) (*jwk.Jwk, error) {
	ret := _mock.Called(ctx)

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

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

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

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

func (_c *KeyStore_GenerateAndSaveKey_Call) Run(run func(ctx context.Context)) *KeyStore_GenerateAndSaveKey_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 *KeyStore_GenerateAndSaveKey_Call) Return(jwk1 *jwk.Jwk, err error) *KeyStore_GenerateAndSaveKey_Call {
	_c.Call.Return(jwk1, err)
	return _c
}

func (_c *KeyStore_GenerateAndSaveKey_Call) RunAndReturn(run func(ctx context.Context) (*jwk.Jwk, error)) *KeyStore_GenerateAndSaveKey_Call {
	_c.Call.Return(run)
	return _c
}

// RetrievePrivKey provides a mock function for the type KeyStore
func (_mock *KeyStore) RetrievePrivKey(ctx context.Context, id string) (*jwk.Jwk, error) {
	ret := _mock.Called(ctx, id)

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

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

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

// RetrievePrivKey is a helper method to define mock.On call
//   - ctx context.Context
//   - id string
func (_e *KeyStore_Expecter) RetrievePrivKey(ctx interface{}, id interface{}) *KeyStore_RetrievePrivKey_Call {
	return &KeyStore_RetrievePrivKey_Call{Call: _e.mock.On("RetrievePrivKey", ctx, id)}
}

func (_c *KeyStore_RetrievePrivKey_Call) Run(run func(ctx context.Context, id string)) *KeyStore_RetrievePrivKey_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 *KeyStore_RetrievePrivKey_Call) Return(jwk1 *jwk.Jwk, err error) *KeyStore_RetrievePrivKey_Call {
	_c.Call.Return(jwk1, err)
	return _c
}

func (_c *KeyStore_RetrievePrivKey_Call) RunAndReturn(run func(ctx context.Context, id string) (*jwk.Jwk, error)) *KeyStore_RetrievePrivKey_Call {
	_c.Call.Return(run)
	return _c
}

// RetrievePubKey provides a mock function for the type KeyStore
func (_mock *KeyStore) RetrievePubKey(ctx context.Context, id string) (*jwk.Jwk, error) {
	ret := _mock.Called(ctx, id)

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

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

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

// RetrievePubKey is a helper method to define mock.On call
//   - ctx context.Context
//   - id string
func (_e *KeyStore_Expecter) RetrievePubKey(ctx interface{}, id interface{}) *KeyStore_RetrievePubKey_Call {
	return &KeyStore_RetrievePubKey_Call{Call: _e.mock.On("RetrievePubKey", ctx, id)}
}

func (_c *KeyStore_RetrievePubKey_Call) Run(run func(ctx context.Context, id string)) *KeyStore_RetrievePubKey_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 *KeyStore_RetrievePubKey_Call) Return(jwk1 *jwk.Jwk, err error) *KeyStore_RetrievePubKey_Call {
	_c.Call.Return(jwk1, err)
	return _c
}

func (_c *KeyStore_RetrievePubKey_Call) RunAndReturn(run func(ctx context.Context, id string) (*jwk.Jwk, error)) *KeyStore_RetrievePubKey_Call {
	_c.Call.Return(run)
	return _c
}
