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

package mocks

import (
	"context"

	"github.com/agntcy/identity-service/internal/core/badge/types"
	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}
}

// Create provides a mock function for the type Repository
func (_mock *Repository) Create(ctx context.Context, badge *types.Badge) error {
	ret := _mock.Called(ctx, badge)

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

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

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

// Create is a helper method to define mock.On call
//   - ctx context.Context
//   - badge *types.Badge
func (_e *Repository_Expecter) Create(ctx interface{}, badge interface{}) *Repository_Create_Call {
	return &Repository_Create_Call{Call: _e.mock.On("Create", ctx, badge)}
}

func (_c *Repository_Create_Call) Run(run func(ctx context.Context, badge *types.Badge)) *Repository_Create_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *types.Badge
		if args[1] != nil {
			arg1 = args[1].(*types.Badge)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

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

func (_c *Repository_Create_Call) RunAndReturn(run func(ctx context.Context, badge *types.Badge) error) *Repository_Create_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

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

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

func (_c *Repository_GetAllActiveBadges_Call) Run(run func(ctx context.Context, appID string)) *Repository_GetAllActiveBadges_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_GetAllActiveBadges_Call) Return(badges []*types.Badge, err error) *Repository_GetAllActiveBadges_Call {
	_c.Call.Return(badges, err)
	return _c
}

func (_c *Repository_GetAllActiveBadges_Call) RunAndReturn(run func(ctx context.Context, appID string) ([]*types.Badge, error)) *Repository_GetAllActiveBadges_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

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

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

func (_c *Repository_GetLatestByAppIdOrResolverMetadataID_Call) Run(run func(ctx context.Context, id string)) *Repository_GetLatestByAppIdOrResolverMetadataID_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_GetLatestByAppIdOrResolverMetadataID_Call) Return(badge *types.Badge, err error) *Repository_GetLatestByAppIdOrResolverMetadataID_Call {
	_c.Call.Return(badge, err)
	return _c
}

func (_c *Repository_GetLatestByAppIdOrResolverMetadataID_Call) RunAndReturn(run func(ctx context.Context, id string) (*types.Badge, error)) *Repository_GetLatestByAppIdOrResolverMetadataID_Call {
	_c.Call.Return(run)
	return _c
}

// Update provides a mock function for the type Repository
func (_mock *Repository) Update(ctx context.Context, badge *types.Badge) error {
	ret := _mock.Called(ctx, badge)

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

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

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

// Update is a helper method to define mock.On call
//   - ctx context.Context
//   - badge *types.Badge
func (_e *Repository_Expecter) Update(ctx interface{}, badge interface{}) *Repository_Update_Call {
	return &Repository_Update_Call{Call: _e.mock.On("Update", ctx, badge)}
}

func (_c *Repository_Update_Call) Run(run func(ctx context.Context, badge *types.Badge)) *Repository_Update_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *types.Badge
		if args[1] != nil {
			arg1 = args[1].(*types.Badge)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

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

func (_c *Repository_Update_Call) RunAndReturn(run func(ctx context.Context, badge *types.Badge) error) *Repository_Update_Call {
	_c.Call.Return(run)
	return _c
}
