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

package mockpbacl

import (
	"context"

	"github.com/hashicorp/consul/proto-public/pbacl"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type ACLServiceServer_Expecter struct {
	mock *mock.Mock
}

func (_m *ACLServiceServer) EXPECT() *ACLServiceServer_Expecter {
	return &ACLServiceServer_Expecter{mock: &_m.Mock}
}

// Login provides a mock function for the type ACLServiceServer
func (_mock *ACLServiceServer) Login(context1 context.Context, loginRequest *pbacl.LoginRequest) (*pbacl.LoginResponse, error) {
	ret := _mock.Called(context1, loginRequest)

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

	var r0 *pbacl.LoginResponse
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *pbacl.LoginRequest) (*pbacl.LoginResponse, error)); ok {
		return returnFunc(context1, loginRequest)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *pbacl.LoginRequest) *pbacl.LoginResponse); ok {
		r0 = returnFunc(context1, loginRequest)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*pbacl.LoginResponse)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *pbacl.LoginRequest) error); ok {
		r1 = returnFunc(context1, loginRequest)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Login is a helper method to define mock.On call
//   - context1 context.Context
//   - loginRequest *pbacl.LoginRequest
func (_e *ACLServiceServer_Expecter) Login(context1 interface{}, loginRequest interface{}) *ACLServiceServer_Login_Call {
	return &ACLServiceServer_Login_Call{Call: _e.mock.On("Login", context1, loginRequest)}
}

func (_c *ACLServiceServer_Login_Call) Run(run func(context1 context.Context, loginRequest *pbacl.LoginRequest)) *ACLServiceServer_Login_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *pbacl.LoginRequest
		if args[1] != nil {
			arg1 = args[1].(*pbacl.LoginRequest)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *ACLServiceServer_Login_Call) Return(loginResponse *pbacl.LoginResponse, err error) *ACLServiceServer_Login_Call {
	_c.Call.Return(loginResponse, err)
	return _c
}

func (_c *ACLServiceServer_Login_Call) RunAndReturn(run func(context1 context.Context, loginRequest *pbacl.LoginRequest) (*pbacl.LoginResponse, error)) *ACLServiceServer_Login_Call {
	_c.Call.Return(run)
	return _c
}

// Logout provides a mock function for the type ACLServiceServer
func (_mock *ACLServiceServer) Logout(context1 context.Context, logoutRequest *pbacl.LogoutRequest) (*pbacl.LogoutResponse, error) {
	ret := _mock.Called(context1, logoutRequest)

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

	var r0 *pbacl.LogoutResponse
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *pbacl.LogoutRequest) (*pbacl.LogoutResponse, error)); ok {
		return returnFunc(context1, logoutRequest)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *pbacl.LogoutRequest) *pbacl.LogoutResponse); ok {
		r0 = returnFunc(context1, logoutRequest)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*pbacl.LogoutResponse)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *pbacl.LogoutRequest) error); ok {
		r1 = returnFunc(context1, logoutRequest)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Logout is a helper method to define mock.On call
//   - context1 context.Context
//   - logoutRequest *pbacl.LogoutRequest
func (_e *ACLServiceServer_Expecter) Logout(context1 interface{}, logoutRequest interface{}) *ACLServiceServer_Logout_Call {
	return &ACLServiceServer_Logout_Call{Call: _e.mock.On("Logout", context1, logoutRequest)}
}

func (_c *ACLServiceServer_Logout_Call) Run(run func(context1 context.Context, logoutRequest *pbacl.LogoutRequest)) *ACLServiceServer_Logout_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *pbacl.LogoutRequest
		if args[1] != nil {
			arg1 = args[1].(*pbacl.LogoutRequest)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *ACLServiceServer_Logout_Call) Return(logoutResponse *pbacl.LogoutResponse, err error) *ACLServiceServer_Logout_Call {
	_c.Call.Return(logoutResponse, err)
	return _c
}

func (_c *ACLServiceServer_Logout_Call) RunAndReturn(run func(context1 context.Context, logoutRequest *pbacl.LogoutRequest) (*pbacl.LogoutResponse, error)) *ACLServiceServer_Logout_Call {
	_c.Call.Return(run)
	return _c
}
