// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/libp2p/go-libp2p/core/peerstore (interfaces: Peerstore)
//
// Generated by this command:
//
//	mockgen -package pstoremanager_test -destination mock_peerstore_test.go github.com/libp2p/go-libp2p/core/peerstore Peerstore
//

// Package pstoremanager_test is a generated GoMock package.
package pstoremanager_test

import (
	context "context"
	reflect "reflect"
	time "time"

	crypto "github.com/libp2p/go-libp2p/core/crypto"
	peer "github.com/libp2p/go-libp2p/core/peer"
	protocol "github.com/libp2p/go-libp2p/core/protocol"
	multiaddr "github.com/multiformats/go-multiaddr"
	gomock "go.uber.org/mock/gomock"
)

// MockPeerstore is a mock of Peerstore interface.
type MockPeerstore struct {
	ctrl     *gomock.Controller
	recorder *MockPeerstoreMockRecorder
	isgomock struct{}
}

// MockPeerstoreMockRecorder is the mock recorder for MockPeerstore.
type MockPeerstoreMockRecorder struct {
	mock *MockPeerstore
}

// NewMockPeerstore creates a new mock instance.
func NewMockPeerstore(ctrl *gomock.Controller) *MockPeerstore {
	mock := &MockPeerstore{ctrl: ctrl}
	mock.recorder = &MockPeerstoreMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockPeerstore) EXPECT() *MockPeerstoreMockRecorder {
	return m.recorder
}

// AddAddr mocks base method.
func (m *MockPeerstore) AddAddr(p peer.ID, addr multiaddr.Multiaddr, ttl time.Duration) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "AddAddr", p, addr, ttl)
}

// AddAddr indicates an expected call of AddAddr.
func (mr *MockPeerstoreMockRecorder) AddAddr(p, addr, ttl any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAddr", reflect.TypeOf((*MockPeerstore)(nil).AddAddr), p, addr, ttl)
}

// AddAddrs mocks base method.
func (m *MockPeerstore) AddAddrs(p peer.ID, addrs []multiaddr.Multiaddr, ttl time.Duration) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "AddAddrs", p, addrs, ttl)
}

// AddAddrs indicates an expected call of AddAddrs.
func (mr *MockPeerstoreMockRecorder) AddAddrs(p, addrs, ttl any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAddrs", reflect.TypeOf((*MockPeerstore)(nil).AddAddrs), p, addrs, ttl)
}

// AddPrivKey mocks base method.
func (m *MockPeerstore) AddPrivKey(arg0 peer.ID, arg1 crypto.PrivKey) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "AddPrivKey", arg0, arg1)
	ret0, _ := ret[0].(error)
	return ret0
}

// AddPrivKey indicates an expected call of AddPrivKey.
func (mr *MockPeerstoreMockRecorder) AddPrivKey(arg0, arg1 any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPrivKey", reflect.TypeOf((*MockPeerstore)(nil).AddPrivKey), arg0, arg1)
}

// AddProtocols mocks base method.
func (m *MockPeerstore) AddProtocols(arg0 peer.ID, arg1 ...protocol.ID) error {
	m.ctrl.T.Helper()
	varargs := []any{arg0}
	for _, a := range arg1 {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "AddProtocols", varargs...)
	ret0, _ := ret[0].(error)
	return ret0
}

// AddProtocols indicates an expected call of AddProtocols.
func (mr *MockPeerstoreMockRecorder) AddProtocols(arg0 any, arg1 ...any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{arg0}, arg1...)
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddProtocols", reflect.TypeOf((*MockPeerstore)(nil).AddProtocols), varargs...)
}

// AddPubKey mocks base method.
func (m *MockPeerstore) AddPubKey(arg0 peer.ID, arg1 crypto.PubKey) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "AddPubKey", arg0, arg1)
	ret0, _ := ret[0].(error)
	return ret0
}

// AddPubKey indicates an expected call of AddPubKey.
func (mr *MockPeerstoreMockRecorder) AddPubKey(arg0, arg1 any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPubKey", reflect.TypeOf((*MockPeerstore)(nil).AddPubKey), arg0, arg1)
}

// AddrStream mocks base method.
func (m *MockPeerstore) AddrStream(arg0 context.Context, arg1 peer.ID) <-chan multiaddr.Multiaddr {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "AddrStream", arg0, arg1)
	ret0, _ := ret[0].(<-chan multiaddr.Multiaddr)
	return ret0
}

// AddrStream indicates an expected call of AddrStream.
func (mr *MockPeerstoreMockRecorder) AddrStream(arg0, arg1 any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddrStream", reflect.TypeOf((*MockPeerstore)(nil).AddrStream), arg0, arg1)
}

// Addrs mocks base method.
func (m *MockPeerstore) Addrs(p peer.ID) []multiaddr.Multiaddr {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Addrs", p)
	ret0, _ := ret[0].([]multiaddr.Multiaddr)
	return ret0
}

// Addrs indicates an expected call of Addrs.
func (mr *MockPeerstoreMockRecorder) Addrs(p any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addrs", reflect.TypeOf((*MockPeerstore)(nil).Addrs), p)
}

// ClearAddrs mocks base method.
func (m *MockPeerstore) ClearAddrs(p peer.ID) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "ClearAddrs", p)
}

// ClearAddrs indicates an expected call of ClearAddrs.
func (mr *MockPeerstoreMockRecorder) ClearAddrs(p any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClearAddrs", reflect.TypeOf((*MockPeerstore)(nil).ClearAddrs), p)
}

// Close mocks base method.
func (m *MockPeerstore) Close() error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Close")
	ret0, _ := ret[0].(error)
	return ret0
}

// Close indicates an expected call of Close.
func (mr *MockPeerstoreMockRecorder) Close() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockPeerstore)(nil).Close))
}

// FirstSupportedProtocol mocks base method.
func (m *MockPeerstore) FirstSupportedProtocol(arg0 peer.ID, arg1 ...protocol.ID) (protocol.ID, error) {
	m.ctrl.T.Helper()
	varargs := []any{arg0}
	for _, a := range arg1 {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "FirstSupportedProtocol", varargs...)
	ret0, _ := ret[0].(protocol.ID)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// FirstSupportedProtocol indicates an expected call of FirstSupportedProtocol.
func (mr *MockPeerstoreMockRecorder) FirstSupportedProtocol(arg0 any, arg1 ...any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{arg0}, arg1...)
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FirstSupportedProtocol", reflect.TypeOf((*MockPeerstore)(nil).FirstSupportedProtocol), varargs...)
}

// Get mocks base method.
func (m *MockPeerstore) Get(p peer.ID, key string) (any, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Get", p, key)
	ret0, _ := ret[0].(any)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Get indicates an expected call of Get.
func (mr *MockPeerstoreMockRecorder) Get(p, key any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPeerstore)(nil).Get), p, key)
}

// GetProtocols mocks base method.
func (m *MockPeerstore) GetProtocols(arg0 peer.ID) ([]protocol.ID, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetProtocols", arg0)
	ret0, _ := ret[0].([]protocol.ID)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetProtocols indicates an expected call of GetProtocols.
func (mr *MockPeerstoreMockRecorder) GetProtocols(arg0 any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProtocols", reflect.TypeOf((*MockPeerstore)(nil).GetProtocols), arg0)
}

// LatencyEWMA mocks base method.
func (m *MockPeerstore) LatencyEWMA(arg0 peer.ID) time.Duration {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "LatencyEWMA", arg0)
	ret0, _ := ret[0].(time.Duration)
	return ret0
}

// LatencyEWMA indicates an expected call of LatencyEWMA.
func (mr *MockPeerstoreMockRecorder) LatencyEWMA(arg0 any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatencyEWMA", reflect.TypeOf((*MockPeerstore)(nil).LatencyEWMA), arg0)
}

// PeerInfo mocks base method.
func (m *MockPeerstore) PeerInfo(arg0 peer.ID) peer.AddrInfo {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "PeerInfo", arg0)
	ret0, _ := ret[0].(peer.AddrInfo)
	return ret0
}

// PeerInfo indicates an expected call of PeerInfo.
func (mr *MockPeerstoreMockRecorder) PeerInfo(arg0 any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PeerInfo", reflect.TypeOf((*MockPeerstore)(nil).PeerInfo), arg0)
}

// Peers mocks base method.
func (m *MockPeerstore) Peers() peer.IDSlice {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Peers")
	ret0, _ := ret[0].(peer.IDSlice)
	return ret0
}

// Peers indicates an expected call of Peers.
func (mr *MockPeerstoreMockRecorder) Peers() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Peers", reflect.TypeOf((*MockPeerstore)(nil).Peers))
}

// PeersWithAddrs mocks base method.
func (m *MockPeerstore) PeersWithAddrs() peer.IDSlice {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "PeersWithAddrs")
	ret0, _ := ret[0].(peer.IDSlice)
	return ret0
}

// PeersWithAddrs indicates an expected call of PeersWithAddrs.
func (mr *MockPeerstoreMockRecorder) PeersWithAddrs() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PeersWithAddrs", reflect.TypeOf((*MockPeerstore)(nil).PeersWithAddrs))
}

// PeersWithKeys mocks base method.
func (m *MockPeerstore) PeersWithKeys() peer.IDSlice {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "PeersWithKeys")
	ret0, _ := ret[0].(peer.IDSlice)
	return ret0
}

// PeersWithKeys indicates an expected call of PeersWithKeys.
func (mr *MockPeerstoreMockRecorder) PeersWithKeys() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PeersWithKeys", reflect.TypeOf((*MockPeerstore)(nil).PeersWithKeys))
}

// PrivKey mocks base method.
func (m *MockPeerstore) PrivKey(arg0 peer.ID) crypto.PrivKey {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "PrivKey", arg0)
	ret0, _ := ret[0].(crypto.PrivKey)
	return ret0
}

// PrivKey indicates an expected call of PrivKey.
func (mr *MockPeerstoreMockRecorder) PrivKey(arg0 any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrivKey", reflect.TypeOf((*MockPeerstore)(nil).PrivKey), arg0)
}

// PubKey mocks base method.
func (m *MockPeerstore) PubKey(arg0 peer.ID) crypto.PubKey {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "PubKey", arg0)
	ret0, _ := ret[0].(crypto.PubKey)
	return ret0
}

// PubKey indicates an expected call of PubKey.
func (mr *MockPeerstoreMockRecorder) PubKey(arg0 any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PubKey", reflect.TypeOf((*MockPeerstore)(nil).PubKey), arg0)
}

// Put mocks base method.
func (m *MockPeerstore) Put(p peer.ID, key string, val any) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Put", p, key, val)
	ret0, _ := ret[0].(error)
	return ret0
}

// Put indicates an expected call of Put.
func (mr *MockPeerstoreMockRecorder) Put(p, key, val any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockPeerstore)(nil).Put), p, key, val)
}

// RecordLatency mocks base method.
func (m *MockPeerstore) RecordLatency(arg0 peer.ID, arg1 time.Duration) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "RecordLatency", arg0, arg1)
}

// RecordLatency indicates an expected call of RecordLatency.
func (mr *MockPeerstoreMockRecorder) RecordLatency(arg0, arg1 any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecordLatency", reflect.TypeOf((*MockPeerstore)(nil).RecordLatency), arg0, arg1)
}

// RemovePeer mocks base method.
func (m *MockPeerstore) RemovePeer(arg0 peer.ID) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "RemovePeer", arg0)
}

// RemovePeer indicates an expected call of RemovePeer.
func (mr *MockPeerstoreMockRecorder) RemovePeer(arg0 any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemovePeer", reflect.TypeOf((*MockPeerstore)(nil).RemovePeer), arg0)
}

// RemoveProtocols mocks base method.
func (m *MockPeerstore) RemoveProtocols(arg0 peer.ID, arg1 ...protocol.ID) error {
	m.ctrl.T.Helper()
	varargs := []any{arg0}
	for _, a := range arg1 {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "RemoveProtocols", varargs...)
	ret0, _ := ret[0].(error)
	return ret0
}

// RemoveProtocols indicates an expected call of RemoveProtocols.
func (mr *MockPeerstoreMockRecorder) RemoveProtocols(arg0 any, arg1 ...any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{arg0}, arg1...)
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveProtocols", reflect.TypeOf((*MockPeerstore)(nil).RemoveProtocols), varargs...)
}

// SetAddr mocks base method.
func (m *MockPeerstore) SetAddr(p peer.ID, addr multiaddr.Multiaddr, ttl time.Duration) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "SetAddr", p, addr, ttl)
}

// SetAddr indicates an expected call of SetAddr.
func (mr *MockPeerstoreMockRecorder) SetAddr(p, addr, ttl any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAddr", reflect.TypeOf((*MockPeerstore)(nil).SetAddr), p, addr, ttl)
}

// SetAddrs mocks base method.
func (m *MockPeerstore) SetAddrs(p peer.ID, addrs []multiaddr.Multiaddr, ttl time.Duration) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "SetAddrs", p, addrs, ttl)
}

// SetAddrs indicates an expected call of SetAddrs.
func (mr *MockPeerstoreMockRecorder) SetAddrs(p, addrs, ttl any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAddrs", reflect.TypeOf((*MockPeerstore)(nil).SetAddrs), p, addrs, ttl)
}

// SetProtocols mocks base method.
func (m *MockPeerstore) SetProtocols(arg0 peer.ID, arg1 ...protocol.ID) error {
	m.ctrl.T.Helper()
	varargs := []any{arg0}
	for _, a := range arg1 {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "SetProtocols", varargs...)
	ret0, _ := ret[0].(error)
	return ret0
}

// SetProtocols indicates an expected call of SetProtocols.
func (mr *MockPeerstoreMockRecorder) SetProtocols(arg0 any, arg1 ...any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{arg0}, arg1...)
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetProtocols", reflect.TypeOf((*MockPeerstore)(nil).SetProtocols), varargs...)
}

// SupportsProtocols mocks base method.
func (m *MockPeerstore) SupportsProtocols(arg0 peer.ID, arg1 ...protocol.ID) ([]protocol.ID, error) {
	m.ctrl.T.Helper()
	varargs := []any{arg0}
	for _, a := range arg1 {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "SupportsProtocols", varargs...)
	ret0, _ := ret[0].([]protocol.ID)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// SupportsProtocols indicates an expected call of SupportsProtocols.
func (mr *MockPeerstoreMockRecorder) SupportsProtocols(arg0 any, arg1 ...any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{arg0}, arg1...)
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsProtocols", reflect.TypeOf((*MockPeerstore)(nil).SupportsProtocols), varargs...)
}

// UpdateAddrs mocks base method.
func (m *MockPeerstore) UpdateAddrs(p peer.ID, oldTTL, newTTL time.Duration) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "UpdateAddrs", p, oldTTL, newTTL)
}

// UpdateAddrs indicates an expected call of UpdateAddrs.
func (mr *MockPeerstoreMockRecorder) UpdateAddrs(p, oldTTL, newTTL any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAddrs", reflect.TypeOf((*MockPeerstore)(nil).UpdateAddrs), p, oldTTL, newTTL)
}
