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

package mocks

import (
	ldap "github.com/go-ldap/ldap/v3"
	mock "github.com/stretchr/testify/mock"

	time "time"

	tls "crypto/tls"
)

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

// Add provides a mock function with given fields: _a0
func (_m *Client) Add(_a0 *ldap.AddRequest) error {
	ret := _m.Called(_a0)

	var r0 error
	if rf, ok := ret.Get(0).(func(*ldap.AddRequest) error); ok {
		r0 = rf(_a0)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// Bind provides a mock function with given fields: username, password
func (_m *Client) Bind(username string, password string) error {
	ret := _m.Called(username, password)

	var r0 error
	if rf, ok := ret.Get(0).(func(string, string) error); ok {
		r0 = rf(username, password)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// Close provides a mock function with given fields:
func (_m *Client) Close() error {
	ret := _m.Called()

	var r0 error
	if rf, ok := ret.Get(0).(func() error); ok {
		r0 = rf()
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// Compare provides a mock function with given fields: dn, attribute, value
func (_m *Client) Compare(dn string, attribute string, value string) (bool, error) {
	ret := _m.Called(dn, attribute, value)

	var r0 bool
	var r1 error
	if rf, ok := ret.Get(0).(func(string, string, string) (bool, error)); ok {
		return rf(dn, attribute, value)
	}
	if rf, ok := ret.Get(0).(func(string, string, string) bool); ok {
		r0 = rf(dn, attribute, value)
	} else {
		r0 = ret.Get(0).(bool)
	}

	if rf, ok := ret.Get(1).(func(string, string, string) error); ok {
		r1 = rf(dn, attribute, value)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Del provides a mock function with given fields: _a0
func (_m *Client) Del(_a0 *ldap.DelRequest) error {
	ret := _m.Called(_a0)

	var r0 error
	if rf, ok := ret.Get(0).(func(*ldap.DelRequest) error); ok {
		r0 = rf(_a0)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// DirSync provides a mock function with given fields: searchRequest, flags, maxAttrCount, cookie
func (_m *Client) DirSync(searchRequest *ldap.SearchRequest, flags int64, maxAttrCount int64, cookie []byte) (*ldap.SearchResult, error) {
	ret := _m.Called(searchRequest, flags, maxAttrCount, cookie)

	var r0 *ldap.SearchResult
	var r1 error
	if rf, ok := ret.Get(0).(func(*ldap.SearchRequest, int64, int64, []byte) (*ldap.SearchResult, error)); ok {
		return rf(searchRequest, flags, maxAttrCount, cookie)
	}
	if rf, ok := ret.Get(0).(func(*ldap.SearchRequest, int64, int64, []byte) *ldap.SearchResult); ok {
		r0 = rf(searchRequest, flags, maxAttrCount, cookie)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*ldap.SearchResult)
		}
	}

	if rf, ok := ret.Get(1).(func(*ldap.SearchRequest, int64, int64, []byte) error); ok {
		r1 = rf(searchRequest, flags, maxAttrCount, cookie)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// ExternalBind provides a mock function with given fields:
func (_m *Client) ExternalBind() error {
	ret := _m.Called()

	var r0 error
	if rf, ok := ret.Get(0).(func() error); ok {
		r0 = rf()
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// GetLastError provides a mock function with given fields:
func (_m *Client) GetLastError() error {
	ret := _m.Called()

	var r0 error
	if rf, ok := ret.Get(0).(func() error); ok {
		r0 = rf()
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// IsClosing provides a mock function with given fields:
func (_m *Client) IsClosing() bool {
	ret := _m.Called()

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

	return r0
}

// Modify provides a mock function with given fields: _a0
func (_m *Client) Modify(_a0 *ldap.ModifyRequest) error {
	ret := _m.Called(_a0)

	var r0 error
	if rf, ok := ret.Get(0).(func(*ldap.ModifyRequest) error); ok {
		r0 = rf(_a0)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// ModifyDN provides a mock function with given fields: _a0
func (_m *Client) ModifyDN(_a0 *ldap.ModifyDNRequest) error {
	ret := _m.Called(_a0)

	var r0 error
	if rf, ok := ret.Get(0).(func(*ldap.ModifyDNRequest) error); ok {
		r0 = rf(_a0)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// ModifyWithResult provides a mock function with given fields: _a0
func (_m *Client) ModifyWithResult(_a0 *ldap.ModifyRequest) (*ldap.ModifyResult, error) {
	ret := _m.Called(_a0)

	var r0 *ldap.ModifyResult
	var r1 error
	if rf, ok := ret.Get(0).(func(*ldap.ModifyRequest) (*ldap.ModifyResult, error)); ok {
		return rf(_a0)
	}
	if rf, ok := ret.Get(0).(func(*ldap.ModifyRequest) *ldap.ModifyResult); ok {
		r0 = rf(_a0)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*ldap.ModifyResult)
		}
	}

	if rf, ok := ret.Get(1).(func(*ldap.ModifyRequest) error); ok {
		r1 = rf(_a0)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// NTLMUnauthenticatedBind provides a mock function with given fields: domain, username
func (_m *Client) NTLMUnauthenticatedBind(domain string, username string) error {
	ret := _m.Called(domain, username)

	var r0 error
	if rf, ok := ret.Get(0).(func(string, string) error); ok {
		r0 = rf(domain, username)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// PasswordModify provides a mock function with given fields: _a0
func (_m *Client) PasswordModify(_a0 *ldap.PasswordModifyRequest) (*ldap.PasswordModifyResult, error) {
	ret := _m.Called(_a0)

	var r0 *ldap.PasswordModifyResult
	var r1 error
	if rf, ok := ret.Get(0).(func(*ldap.PasswordModifyRequest) (*ldap.PasswordModifyResult, error)); ok {
		return rf(_a0)
	}
	if rf, ok := ret.Get(0).(func(*ldap.PasswordModifyRequest) *ldap.PasswordModifyResult); ok {
		r0 = rf(_a0)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*ldap.PasswordModifyResult)
		}
	}

	if rf, ok := ret.Get(1).(func(*ldap.PasswordModifyRequest) error); ok {
		r1 = rf(_a0)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Search provides a mock function with given fields: _a0
func (_m *Client) Search(_a0 *ldap.SearchRequest) (*ldap.SearchResult, error) {
	ret := _m.Called(_a0)

	var r0 *ldap.SearchResult
	var r1 error
	if rf, ok := ret.Get(0).(func(*ldap.SearchRequest) (*ldap.SearchResult, error)); ok {
		return rf(_a0)
	}
	if rf, ok := ret.Get(0).(func(*ldap.SearchRequest) *ldap.SearchResult); ok {
		r0 = rf(_a0)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*ldap.SearchResult)
		}
	}

	if rf, ok := ret.Get(1).(func(*ldap.SearchRequest) error); ok {
		r1 = rf(_a0)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// SearchWithPaging provides a mock function with given fields: searchRequest, pagingSize
func (_m *Client) SearchWithPaging(searchRequest *ldap.SearchRequest, pagingSize uint32) (*ldap.SearchResult, error) {
	ret := _m.Called(searchRequest, pagingSize)

	var r0 *ldap.SearchResult
	var r1 error
	if rf, ok := ret.Get(0).(func(*ldap.SearchRequest, uint32) (*ldap.SearchResult, error)); ok {
		return rf(searchRequest, pagingSize)
	}
	if rf, ok := ret.Get(0).(func(*ldap.SearchRequest, uint32) *ldap.SearchResult); ok {
		r0 = rf(searchRequest, pagingSize)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*ldap.SearchResult)
		}
	}

	if rf, ok := ret.Get(1).(func(*ldap.SearchRequest, uint32) error); ok {
		r1 = rf(searchRequest, pagingSize)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// SetTimeout provides a mock function with given fields: _a0
func (_m *Client) SetTimeout(_a0 time.Duration) {
	_m.Called(_a0)
}

// SimpleBind provides a mock function with given fields: _a0
func (_m *Client) SimpleBind(_a0 *ldap.SimpleBindRequest) (*ldap.SimpleBindResult, error) {
	ret := _m.Called(_a0)

	var r0 *ldap.SimpleBindResult
	var r1 error
	if rf, ok := ret.Get(0).(func(*ldap.SimpleBindRequest) (*ldap.SimpleBindResult, error)); ok {
		return rf(_a0)
	}
	if rf, ok := ret.Get(0).(func(*ldap.SimpleBindRequest) *ldap.SimpleBindResult); ok {
		r0 = rf(_a0)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*ldap.SimpleBindResult)
		}
	}

	if rf, ok := ret.Get(1).(func(*ldap.SimpleBindRequest) error); ok {
		r1 = rf(_a0)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Start provides a mock function with given fields:
func (_m *Client) Start() {
	_m.Called()
}

// StartTLS provides a mock function with given fields: _a0
func (_m *Client) StartTLS(_a0 *tls.Config) error {
	ret := _m.Called(_a0)

	var r0 error
	if rf, ok := ret.Get(0).(func(*tls.Config) error); ok {
		r0 = rf(_a0)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// TLSConnectionState provides a mock function with given fields:
func (_m *Client) TLSConnectionState() (tls.ConnectionState, bool) {
	ret := _m.Called()

	var r0 tls.ConnectionState
	var r1 bool
	if rf, ok := ret.Get(0).(func() (tls.ConnectionState, bool)); ok {
		return rf()
	}
	if rf, ok := ret.Get(0).(func() tls.ConnectionState); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(tls.ConnectionState)
	}

	if rf, ok := ret.Get(1).(func() bool); ok {
		r1 = rf()
	} else {
		r1 = ret.Get(1).(bool)
	}

	return r0, r1
}

// UnauthenticatedBind provides a mock function with given fields: username
func (_m *Client) UnauthenticatedBind(username string) error {
	ret := _m.Called(username)

	var r0 error
	if rf, ok := ret.Get(0).(func(string) error); ok {
		r0 = rf(username)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// Unbind provides a mock function with given fields:
func (_m *Client) Unbind() error {
	ret := _m.Called()

	var r0 error
	if rf, ok := ret.Get(0).(func() error); ok {
		r0 = rf()
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

type mockConstructorTestingTNewClient interface {
	mock.TestingT
	Cleanup(func())
}

// NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewClient(t mockConstructorTestingTNewClient) *Client {
	mock := &Client{}
	mock.Mock.Test(t)

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

	return mock
}
