//                           _       _
// __      _____  __ ___   ___  __ _| |_ ___
// \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \
//  \ V  V /  __/ (_| |\ V /| | (_| | ||  __/
//   \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___|
//
//  Copyright © 2016 - 2026 Weaviate B.V. All rights reserved.
//
//  CONTACT: hello@weaviate.io
//

// Code generated by mockery v2.53.5. DO NOT EDIT.

package mocks

import (
	context "context"

	mock "github.com/stretchr/testify/mock"
	models "github.com/weaviate/weaviate/entities/models"
)

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

type Mockauthenticator_Expecter struct {
	mock *mock.Mock
}

func (_m *Mockauthenticator) EXPECT() *Mockauthenticator_Expecter {
	return &Mockauthenticator_Expecter{mock: &_m.Mock}
}

// PrincipalFromContext provides a mock function with given fields: ctx
func (_m *Mockauthenticator) PrincipalFromContext(ctx context.Context) (*models.Principal, error) {
	ret := _m.Called(ctx)

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

	var r0 *models.Principal
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context) (*models.Principal, error)); ok {
		return rf(ctx)
	}
	if rf, ok := ret.Get(0).(func(context.Context) *models.Principal); ok {
		r0 = rf(ctx)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*models.Principal)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context) error); ok {
		r1 = rf(ctx)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

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

func (_c *Mockauthenticator_PrincipalFromContext_Call) Run(run func(ctx context.Context)) *Mockauthenticator_PrincipalFromContext_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context))
	})
	return _c
}

func (_c *Mockauthenticator_PrincipalFromContext_Call) Return(_a0 *models.Principal, _a1 error) *Mockauthenticator_PrincipalFromContext_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *Mockauthenticator_PrincipalFromContext_Call) RunAndReturn(run func(context.Context) (*models.Principal, error)) *Mockauthenticator_PrincipalFromContext_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
