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

package mocks

import (
	server "github.com/apernet/hysteria/core/v2/server"
	mock "github.com/stretchr/testify/mock"
)

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

type MockRequestHook_Expecter struct {
	mock *mock.Mock
}

func (_m *MockRequestHook) EXPECT() *MockRequestHook_Expecter {
	return &MockRequestHook_Expecter{mock: &_m.Mock}
}

// Check provides a mock function with given fields: isUDP, reqAddr
func (_m *MockRequestHook) Check(isUDP bool, reqAddr string) bool {
	ret := _m.Called(isUDP, reqAddr)

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

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

	return r0
}

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

// Check is a helper method to define mock.On call
//   - isUDP bool
//   - reqAddr string
func (_e *MockRequestHook_Expecter) Check(isUDP interface{}, reqAddr interface{}) *MockRequestHook_Check_Call {
	return &MockRequestHook_Check_Call{Call: _e.mock.On("Check", isUDP, reqAddr)}
}

func (_c *MockRequestHook_Check_Call) Run(run func(isUDP bool, reqAddr string)) *MockRequestHook_Check_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(bool), args[1].(string))
	})
	return _c
}

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

func (_c *MockRequestHook_Check_Call) RunAndReturn(run func(bool, string) bool) *MockRequestHook_Check_Call {
	_c.Call.Return(run)
	return _c
}

// TCP provides a mock function with given fields: stream, reqAddr
func (_m *MockRequestHook) TCP(stream server.HyStream, reqAddr *string) ([]byte, error) {
	ret := _m.Called(stream, reqAddr)

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

	var r0 []byte
	var r1 error
	if rf, ok := ret.Get(0).(func(server.HyStream, *string) ([]byte, error)); ok {
		return rf(stream, reqAddr)
	}
	if rf, ok := ret.Get(0).(func(server.HyStream, *string) []byte); ok {
		r0 = rf(stream, reqAddr)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]byte)
		}
	}

	if rf, ok := ret.Get(1).(func(server.HyStream, *string) error); ok {
		r1 = rf(stream, reqAddr)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// TCP is a helper method to define mock.On call
//   - stream server.HyStream
//   - reqAddr *string
func (_e *MockRequestHook_Expecter) TCP(stream interface{}, reqAddr interface{}) *MockRequestHook_TCP_Call {
	return &MockRequestHook_TCP_Call{Call: _e.mock.On("TCP", stream, reqAddr)}
}

func (_c *MockRequestHook_TCP_Call) Run(run func(stream server.HyStream, reqAddr *string)) *MockRequestHook_TCP_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(server.HyStream), args[1].(*string))
	})
	return _c
}

func (_c *MockRequestHook_TCP_Call) Return(_a0 []byte, _a1 error) *MockRequestHook_TCP_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockRequestHook_TCP_Call) RunAndReturn(run func(server.HyStream, *string) ([]byte, error)) *MockRequestHook_TCP_Call {
	_c.Call.Return(run)
	return _c
}

// UDP provides a mock function with given fields: data, reqAddr
func (_m *MockRequestHook) UDP(data []byte, reqAddr *string) error {
	ret := _m.Called(data, reqAddr)

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

	var r0 error
	if rf, ok := ret.Get(0).(func([]byte, *string) error); ok {
		r0 = rf(data, reqAddr)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// UDP is a helper method to define mock.On call
//   - data []byte
//   - reqAddr *string
func (_e *MockRequestHook_Expecter) UDP(data interface{}, reqAddr interface{}) *MockRequestHook_UDP_Call {
	return &MockRequestHook_UDP_Call{Call: _e.mock.On("UDP", data, reqAddr)}
}

func (_c *MockRequestHook_UDP_Call) Run(run func(data []byte, reqAddr *string)) *MockRequestHook_UDP_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].([]byte), args[1].(*string))
	})
	return _c
}

func (_c *MockRequestHook_UDP_Call) Return(_a0 error) *MockRequestHook_UDP_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockRequestHook_UDP_Call) RunAndReturn(run func([]byte, *string) error) *MockRequestHook_UDP_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
