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

package connection

import (
	context "context"
	time "time"

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

	v0alpha1 "github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1"
)

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

type MockTokenConnection_Expecter struct {
	mock *mock.Mock
}

func (_m *MockTokenConnection) EXPECT() *MockTokenConnection_Expecter {
	return &MockTokenConnection_Expecter{mock: &_m.Mock}
}

// GenerateConnectionToken provides a mock function with given fields: ctx
func (_m *MockTokenConnection) GenerateConnectionToken(ctx context.Context) (v0alpha1.RawSecureValue, error) {
	ret := _m.Called(ctx)

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

	var r0 v0alpha1.RawSecureValue
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context) (v0alpha1.RawSecureValue, error)); ok {
		return rf(ctx)
	}
	if rf, ok := ret.Get(0).(func(context.Context) v0alpha1.RawSecureValue); ok {
		r0 = rf(ctx)
	} else {
		r0 = ret.Get(0).(v0alpha1.RawSecureValue)
	}

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

	return r0, r1
}

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

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

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

func (_c *MockTokenConnection_GenerateConnectionToken_Call) Return(_a0 v0alpha1.RawSecureValue, _a1 error) *MockTokenConnection_GenerateConnectionToken_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockTokenConnection_GenerateConnectionToken_Call) RunAndReturn(run func(context.Context) (v0alpha1.RawSecureValue, error)) *MockTokenConnection_GenerateConnectionToken_Call {
	_c.Call.Return(run)
	return _c
}

// TokenCreationTime provides a mock function with given fields: ctx
func (_m *MockTokenConnection) TokenCreationTime(ctx context.Context) (time.Time, error) {
	ret := _m.Called(ctx)

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

	var r0 time.Time
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context) (time.Time, error)); ok {
		return rf(ctx)
	}
	if rf, ok := ret.Get(0).(func(context.Context) time.Time); ok {
		r0 = rf(ctx)
	} else {
		r0 = ret.Get(0).(time.Time)
	}

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

	return r0, r1
}

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

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

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

func (_c *MockTokenConnection_TokenCreationTime_Call) Return(_a0 time.Time, _a1 error) *MockTokenConnection_TokenCreationTime_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockTokenConnection_TokenCreationTime_Call) RunAndReturn(run func(context.Context) (time.Time, error)) *MockTokenConnection_TokenCreationTime_Call {
	_c.Call.Return(run)
	return _c
}

// TokenExpiration provides a mock function with given fields: ctx
func (_m *MockTokenConnection) TokenExpiration(ctx context.Context) (time.Time, error) {
	ret := _m.Called(ctx)

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

	var r0 time.Time
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context) (time.Time, error)); ok {
		return rf(ctx)
	}
	if rf, ok := ret.Get(0).(func(context.Context) time.Time); ok {
		r0 = rf(ctx)
	} else {
		r0 = ret.Get(0).(time.Time)
	}

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

	return r0, r1
}

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

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

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

func (_c *MockTokenConnection_TokenExpiration_Call) Return(_a0 time.Time, _a1 error) *MockTokenConnection_TokenExpiration_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockTokenConnection_TokenExpiration_Call) RunAndReturn(run func(context.Context) (time.Time, error)) *MockTokenConnection_TokenExpiration_Call {
	_c.Call.Return(run)
	return _c
}

// TokenValid provides a mock function with given fields: ctx
func (_m *MockTokenConnection) TokenValid(ctx context.Context) bool {
	ret := _m.Called(ctx)

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

	var r0 bool
	if rf, ok := ret.Get(0).(func(context.Context) bool); ok {
		r0 = rf(ctx)
	} else {
		r0 = ret.Get(0).(bool)
	}

	return r0
}

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

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

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

func (_c *MockTokenConnection_TokenValid_Call) Return(_a0 bool) *MockTokenConnection_TokenValid_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockTokenConnection_TokenValid_Call) RunAndReturn(run func(context.Context) bool) *MockTokenConnection_TokenValid_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
