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

	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type Repository_Expecter struct {
	mock *mock.Mock
}

func (_m *Repository) EXPECT() *Repository_Expecter {
	return &Repository_Expecter{mock: &_m.Mock}
}

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

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

	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
}

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

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

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

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

// ListCertsByEntityID provides a mock function for the type Repository
func (_mock *Repository) ListCertsByEntityID(ctx context.Context, entityID string) ([]string, error) {
	ret := _mock.Called(ctx, entityID)

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

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

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

// ListCertsByEntityID is a helper method to define mock.On call
//   - ctx context.Context
//   - entityID string
func (_e *Repository_Expecter) ListCertsByEntityID(ctx interface{}, entityID interface{}) *Repository_ListCertsByEntityID_Call {
	return &Repository_ListCertsByEntityID_Call{Call: _e.mock.On("ListCertsByEntityID", ctx, entityID)}
}

func (_c *Repository_ListCertsByEntityID_Call) Run(run func(ctx context.Context, entityID string)) *Repository_ListCertsByEntityID_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 *Repository_ListCertsByEntityID_Call) Return(strings []string, err error) *Repository_ListCertsByEntityID_Call {
	_c.Call.Return(strings, err)
	return _c
}

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

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

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

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

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

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

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

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

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

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

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

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

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

func (_c *Repository_SaveCertEntityMapping_Call) Run(run func(ctx context.Context, serialNumber string, entityID string)) *Repository_SaveCertEntityMapping_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)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

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

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