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

package mocks

import (
	control "github.com/libp2p/go-libp2p/core/control"

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

	multiaddr "github.com/multiformats/go-multiaddr"

	net "net"

	network "github.com/libp2p/go-libp2p/core/network"

	peer "github.com/libp2p/go-libp2p/core/peer"
)

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

type BlockingConnectionGater_Expecter struct {
	mock *mock.Mock
}

func (_m *BlockingConnectionGater) EXPECT() *BlockingConnectionGater_Expecter {
	return &BlockingConnectionGater_Expecter{mock: &_m.Mock}
}

// BlockAddr provides a mock function with given fields: ip
func (_m *BlockingConnectionGater) BlockAddr(ip net.IP) error {
	ret := _m.Called(ip)

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

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

	return r0
}

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

// BlockAddr is a helper method to define mock.On call
//   - ip net.IP
func (_e *BlockingConnectionGater_Expecter) BlockAddr(ip interface{}) *BlockingConnectionGater_BlockAddr_Call {
	return &BlockingConnectionGater_BlockAddr_Call{Call: _e.mock.On("BlockAddr", ip)}
}

func (_c *BlockingConnectionGater_BlockAddr_Call) Run(run func(ip net.IP)) *BlockingConnectionGater_BlockAddr_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(net.IP))
	})
	return _c
}

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

func (_c *BlockingConnectionGater_BlockAddr_Call) RunAndReturn(run func(net.IP) error) *BlockingConnectionGater_BlockAddr_Call {
	_c.Call.Return(run)
	return _c
}

// BlockPeer provides a mock function with given fields: p
func (_m *BlockingConnectionGater) BlockPeer(p peer.ID) error {
	ret := _m.Called(p)

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

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

	return r0
}

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

// BlockPeer is a helper method to define mock.On call
//   - p peer.ID
func (_e *BlockingConnectionGater_Expecter) BlockPeer(p interface{}) *BlockingConnectionGater_BlockPeer_Call {
	return &BlockingConnectionGater_BlockPeer_Call{Call: _e.mock.On("BlockPeer", p)}
}

func (_c *BlockingConnectionGater_BlockPeer_Call) Run(run func(p peer.ID)) *BlockingConnectionGater_BlockPeer_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(peer.ID))
	})
	return _c
}

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

func (_c *BlockingConnectionGater_BlockPeer_Call) RunAndReturn(run func(peer.ID) error) *BlockingConnectionGater_BlockPeer_Call {
	_c.Call.Return(run)
	return _c
}

// BlockSubnet provides a mock function with given fields: ipnet
func (_m *BlockingConnectionGater) BlockSubnet(ipnet *net.IPNet) error {
	ret := _m.Called(ipnet)

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

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

	return r0
}

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

// BlockSubnet is a helper method to define mock.On call
//   - ipnet *net.IPNet
func (_e *BlockingConnectionGater_Expecter) BlockSubnet(ipnet interface{}) *BlockingConnectionGater_BlockSubnet_Call {
	return &BlockingConnectionGater_BlockSubnet_Call{Call: _e.mock.On("BlockSubnet", ipnet)}
}

func (_c *BlockingConnectionGater_BlockSubnet_Call) Run(run func(ipnet *net.IPNet)) *BlockingConnectionGater_BlockSubnet_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(*net.IPNet))
	})
	return _c
}

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

func (_c *BlockingConnectionGater_BlockSubnet_Call) RunAndReturn(run func(*net.IPNet) error) *BlockingConnectionGater_BlockSubnet_Call {
	_c.Call.Return(run)
	return _c
}

// InterceptAccept provides a mock function with given fields: _a0
func (_m *BlockingConnectionGater) InterceptAccept(_a0 network.ConnMultiaddrs) bool {
	ret := _m.Called(_a0)

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

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

	return r0
}

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

// InterceptAccept is a helper method to define mock.On call
//   - _a0 network.ConnMultiaddrs
func (_e *BlockingConnectionGater_Expecter) InterceptAccept(_a0 interface{}) *BlockingConnectionGater_InterceptAccept_Call {
	return &BlockingConnectionGater_InterceptAccept_Call{Call: _e.mock.On("InterceptAccept", _a0)}
}

func (_c *BlockingConnectionGater_InterceptAccept_Call) Run(run func(_a0 network.ConnMultiaddrs)) *BlockingConnectionGater_InterceptAccept_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(network.ConnMultiaddrs))
	})
	return _c
}

func (_c *BlockingConnectionGater_InterceptAccept_Call) Return(allow bool) *BlockingConnectionGater_InterceptAccept_Call {
	_c.Call.Return(allow)
	return _c
}

func (_c *BlockingConnectionGater_InterceptAccept_Call) RunAndReturn(run func(network.ConnMultiaddrs) bool) *BlockingConnectionGater_InterceptAccept_Call {
	_c.Call.Return(run)
	return _c
}

// InterceptAddrDial provides a mock function with given fields: _a0, _a1
func (_m *BlockingConnectionGater) InterceptAddrDial(_a0 peer.ID, _a1 multiaddr.Multiaddr) bool {
	ret := _m.Called(_a0, _a1)

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

	var r0 bool
	if rf, ok := ret.Get(0).(func(peer.ID, multiaddr.Multiaddr) bool); ok {
		r0 = rf(_a0, _a1)
	} else {
		r0 = ret.Get(0).(bool)
	}

	return r0
}

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

// InterceptAddrDial is a helper method to define mock.On call
//   - _a0 peer.ID
//   - _a1 multiaddr.Multiaddr
func (_e *BlockingConnectionGater_Expecter) InterceptAddrDial(_a0 interface{}, _a1 interface{}) *BlockingConnectionGater_InterceptAddrDial_Call {
	return &BlockingConnectionGater_InterceptAddrDial_Call{Call: _e.mock.On("InterceptAddrDial", _a0, _a1)}
}

func (_c *BlockingConnectionGater_InterceptAddrDial_Call) Run(run func(_a0 peer.ID, _a1 multiaddr.Multiaddr)) *BlockingConnectionGater_InterceptAddrDial_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(peer.ID), args[1].(multiaddr.Multiaddr))
	})
	return _c
}

func (_c *BlockingConnectionGater_InterceptAddrDial_Call) Return(allow bool) *BlockingConnectionGater_InterceptAddrDial_Call {
	_c.Call.Return(allow)
	return _c
}

func (_c *BlockingConnectionGater_InterceptAddrDial_Call) RunAndReturn(run func(peer.ID, multiaddr.Multiaddr) bool) *BlockingConnectionGater_InterceptAddrDial_Call {
	_c.Call.Return(run)
	return _c
}

// InterceptPeerDial provides a mock function with given fields: p
func (_m *BlockingConnectionGater) InterceptPeerDial(p peer.ID) bool {
	ret := _m.Called(p)

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

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

	return r0
}

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

// InterceptPeerDial is a helper method to define mock.On call
//   - p peer.ID
func (_e *BlockingConnectionGater_Expecter) InterceptPeerDial(p interface{}) *BlockingConnectionGater_InterceptPeerDial_Call {
	return &BlockingConnectionGater_InterceptPeerDial_Call{Call: _e.mock.On("InterceptPeerDial", p)}
}

func (_c *BlockingConnectionGater_InterceptPeerDial_Call) Run(run func(p peer.ID)) *BlockingConnectionGater_InterceptPeerDial_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(peer.ID))
	})
	return _c
}

func (_c *BlockingConnectionGater_InterceptPeerDial_Call) Return(allow bool) *BlockingConnectionGater_InterceptPeerDial_Call {
	_c.Call.Return(allow)
	return _c
}

func (_c *BlockingConnectionGater_InterceptPeerDial_Call) RunAndReturn(run func(peer.ID) bool) *BlockingConnectionGater_InterceptPeerDial_Call {
	_c.Call.Return(run)
	return _c
}

// InterceptSecured provides a mock function with given fields: _a0, _a1, _a2
func (_m *BlockingConnectionGater) InterceptSecured(_a0 network.Direction, _a1 peer.ID, _a2 network.ConnMultiaddrs) bool {
	ret := _m.Called(_a0, _a1, _a2)

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

	var r0 bool
	if rf, ok := ret.Get(0).(func(network.Direction, peer.ID, network.ConnMultiaddrs) bool); ok {
		r0 = rf(_a0, _a1, _a2)
	} else {
		r0 = ret.Get(0).(bool)
	}

	return r0
}

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

// InterceptSecured is a helper method to define mock.On call
//   - _a0 network.Direction
//   - _a1 peer.ID
//   - _a2 network.ConnMultiaddrs
func (_e *BlockingConnectionGater_Expecter) InterceptSecured(_a0 interface{}, _a1 interface{}, _a2 interface{}) *BlockingConnectionGater_InterceptSecured_Call {
	return &BlockingConnectionGater_InterceptSecured_Call{Call: _e.mock.On("InterceptSecured", _a0, _a1, _a2)}
}

func (_c *BlockingConnectionGater_InterceptSecured_Call) Run(run func(_a0 network.Direction, _a1 peer.ID, _a2 network.ConnMultiaddrs)) *BlockingConnectionGater_InterceptSecured_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(network.Direction), args[1].(peer.ID), args[2].(network.ConnMultiaddrs))
	})
	return _c
}

func (_c *BlockingConnectionGater_InterceptSecured_Call) Return(allow bool) *BlockingConnectionGater_InterceptSecured_Call {
	_c.Call.Return(allow)
	return _c
}

func (_c *BlockingConnectionGater_InterceptSecured_Call) RunAndReturn(run func(network.Direction, peer.ID, network.ConnMultiaddrs) bool) *BlockingConnectionGater_InterceptSecured_Call {
	_c.Call.Return(run)
	return _c
}

// InterceptUpgraded provides a mock function with given fields: _a0
func (_m *BlockingConnectionGater) InterceptUpgraded(_a0 network.Conn) (bool, control.DisconnectReason) {
	ret := _m.Called(_a0)

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

	var r0 bool
	var r1 control.DisconnectReason
	if rf, ok := ret.Get(0).(func(network.Conn) (bool, control.DisconnectReason)); ok {
		return rf(_a0)
	}
	if rf, ok := ret.Get(0).(func(network.Conn) bool); ok {
		r0 = rf(_a0)
	} else {
		r0 = ret.Get(0).(bool)
	}

	if rf, ok := ret.Get(1).(func(network.Conn) control.DisconnectReason); ok {
		r1 = rf(_a0)
	} else {
		r1 = ret.Get(1).(control.DisconnectReason)
	}

	return r0, r1
}

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

// InterceptUpgraded is a helper method to define mock.On call
//   - _a0 network.Conn
func (_e *BlockingConnectionGater_Expecter) InterceptUpgraded(_a0 interface{}) *BlockingConnectionGater_InterceptUpgraded_Call {
	return &BlockingConnectionGater_InterceptUpgraded_Call{Call: _e.mock.On("InterceptUpgraded", _a0)}
}

func (_c *BlockingConnectionGater_InterceptUpgraded_Call) Run(run func(_a0 network.Conn)) *BlockingConnectionGater_InterceptUpgraded_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(network.Conn))
	})
	return _c
}

func (_c *BlockingConnectionGater_InterceptUpgraded_Call) Return(allow bool, reason control.DisconnectReason) *BlockingConnectionGater_InterceptUpgraded_Call {
	_c.Call.Return(allow, reason)
	return _c
}

func (_c *BlockingConnectionGater_InterceptUpgraded_Call) RunAndReturn(run func(network.Conn) (bool, control.DisconnectReason)) *BlockingConnectionGater_InterceptUpgraded_Call {
	_c.Call.Return(run)
	return _c
}

// ListBlockedAddrs provides a mock function with given fields:
func (_m *BlockingConnectionGater) ListBlockedAddrs() []net.IP {
	ret := _m.Called()

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

	var r0 []net.IP
	if rf, ok := ret.Get(0).(func() []net.IP); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]net.IP)
		}
	}

	return r0
}

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

// ListBlockedAddrs is a helper method to define mock.On call
func (_e *BlockingConnectionGater_Expecter) ListBlockedAddrs() *BlockingConnectionGater_ListBlockedAddrs_Call {
	return &BlockingConnectionGater_ListBlockedAddrs_Call{Call: _e.mock.On("ListBlockedAddrs")}
}

func (_c *BlockingConnectionGater_ListBlockedAddrs_Call) Run(run func()) *BlockingConnectionGater_ListBlockedAddrs_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *BlockingConnectionGater_ListBlockedAddrs_Call) Return(_a0 []net.IP) *BlockingConnectionGater_ListBlockedAddrs_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *BlockingConnectionGater_ListBlockedAddrs_Call) RunAndReturn(run func() []net.IP) *BlockingConnectionGater_ListBlockedAddrs_Call {
	_c.Call.Return(run)
	return _c
}

// ListBlockedPeers provides a mock function with given fields:
func (_m *BlockingConnectionGater) ListBlockedPeers() []peer.ID {
	ret := _m.Called()

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

	var r0 []peer.ID
	if rf, ok := ret.Get(0).(func() []peer.ID); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]peer.ID)
		}
	}

	return r0
}

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

// ListBlockedPeers is a helper method to define mock.On call
func (_e *BlockingConnectionGater_Expecter) ListBlockedPeers() *BlockingConnectionGater_ListBlockedPeers_Call {
	return &BlockingConnectionGater_ListBlockedPeers_Call{Call: _e.mock.On("ListBlockedPeers")}
}

func (_c *BlockingConnectionGater_ListBlockedPeers_Call) Run(run func()) *BlockingConnectionGater_ListBlockedPeers_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *BlockingConnectionGater_ListBlockedPeers_Call) Return(_a0 []peer.ID) *BlockingConnectionGater_ListBlockedPeers_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *BlockingConnectionGater_ListBlockedPeers_Call) RunAndReturn(run func() []peer.ID) *BlockingConnectionGater_ListBlockedPeers_Call {
	_c.Call.Return(run)
	return _c
}

// ListBlockedSubnets provides a mock function with given fields:
func (_m *BlockingConnectionGater) ListBlockedSubnets() []*net.IPNet {
	ret := _m.Called()

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

	var r0 []*net.IPNet
	if rf, ok := ret.Get(0).(func() []*net.IPNet); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*net.IPNet)
		}
	}

	return r0
}

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

// ListBlockedSubnets is a helper method to define mock.On call
func (_e *BlockingConnectionGater_Expecter) ListBlockedSubnets() *BlockingConnectionGater_ListBlockedSubnets_Call {
	return &BlockingConnectionGater_ListBlockedSubnets_Call{Call: _e.mock.On("ListBlockedSubnets")}
}

func (_c *BlockingConnectionGater_ListBlockedSubnets_Call) Run(run func()) *BlockingConnectionGater_ListBlockedSubnets_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *BlockingConnectionGater_ListBlockedSubnets_Call) Return(_a0 []*net.IPNet) *BlockingConnectionGater_ListBlockedSubnets_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *BlockingConnectionGater_ListBlockedSubnets_Call) RunAndReturn(run func() []*net.IPNet) *BlockingConnectionGater_ListBlockedSubnets_Call {
	_c.Call.Return(run)
	return _c
}

// UnblockAddr provides a mock function with given fields: ip
func (_m *BlockingConnectionGater) UnblockAddr(ip net.IP) error {
	ret := _m.Called(ip)

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

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

	return r0
}

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

// UnblockAddr is a helper method to define mock.On call
//   - ip net.IP
func (_e *BlockingConnectionGater_Expecter) UnblockAddr(ip interface{}) *BlockingConnectionGater_UnblockAddr_Call {
	return &BlockingConnectionGater_UnblockAddr_Call{Call: _e.mock.On("UnblockAddr", ip)}
}

func (_c *BlockingConnectionGater_UnblockAddr_Call) Run(run func(ip net.IP)) *BlockingConnectionGater_UnblockAddr_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(net.IP))
	})
	return _c
}

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

func (_c *BlockingConnectionGater_UnblockAddr_Call) RunAndReturn(run func(net.IP) error) *BlockingConnectionGater_UnblockAddr_Call {
	_c.Call.Return(run)
	return _c
}

// UnblockPeer provides a mock function with given fields: p
func (_m *BlockingConnectionGater) UnblockPeer(p peer.ID) error {
	ret := _m.Called(p)

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

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

	return r0
}

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

// UnblockPeer is a helper method to define mock.On call
//   - p peer.ID
func (_e *BlockingConnectionGater_Expecter) UnblockPeer(p interface{}) *BlockingConnectionGater_UnblockPeer_Call {
	return &BlockingConnectionGater_UnblockPeer_Call{Call: _e.mock.On("UnblockPeer", p)}
}

func (_c *BlockingConnectionGater_UnblockPeer_Call) Run(run func(p peer.ID)) *BlockingConnectionGater_UnblockPeer_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(peer.ID))
	})
	return _c
}

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

func (_c *BlockingConnectionGater_UnblockPeer_Call) RunAndReturn(run func(peer.ID) error) *BlockingConnectionGater_UnblockPeer_Call {
	_c.Call.Return(run)
	return _c
}

// UnblockSubnet provides a mock function with given fields: ipnet
func (_m *BlockingConnectionGater) UnblockSubnet(ipnet *net.IPNet) error {
	ret := _m.Called(ipnet)

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

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

	return r0
}

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

// UnblockSubnet is a helper method to define mock.On call
//   - ipnet *net.IPNet
func (_e *BlockingConnectionGater_Expecter) UnblockSubnet(ipnet interface{}) *BlockingConnectionGater_UnblockSubnet_Call {
	return &BlockingConnectionGater_UnblockSubnet_Call{Call: _e.mock.On("UnblockSubnet", ipnet)}
}

func (_c *BlockingConnectionGater_UnblockSubnet_Call) Run(run func(ipnet *net.IPNet)) *BlockingConnectionGater_UnblockSubnet_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(*net.IPNet))
	})
	return _c
}

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

func (_c *BlockingConnectionGater_UnblockSubnet_Call) RunAndReturn(run func(*net.IPNet) error) *BlockingConnectionGater_UnblockSubnet_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
