1// Code generated by counterfeiter. DO NOT EDIT.
2package mocks
3
4import (
5	"context"
6	"net"
7	"sync"
8	"time"
9
10	"github.com/syncthing/syncthing/lib/db"
11	"github.com/syncthing/syncthing/lib/fs"
12	"github.com/syncthing/syncthing/lib/model"
13	"github.com/syncthing/syncthing/lib/protocol"
14	"github.com/syncthing/syncthing/lib/stats"
15	"github.com/syncthing/syncthing/lib/ur/contract"
16	"github.com/syncthing/syncthing/lib/versioner"
17)
18
19type Model struct {
20	AddConnectionStub        func(protocol.Connection, protocol.Hello)
21	addConnectionMutex       sync.RWMutex
22	addConnectionArgsForCall []struct {
23		arg1 protocol.Connection
24		arg2 protocol.Hello
25	}
26	AvailabilityStub        func(string, protocol.FileInfo, protocol.BlockInfo) ([]model.Availability, error)
27	availabilityMutex       sync.RWMutex
28	availabilityArgsForCall []struct {
29		arg1 string
30		arg2 protocol.FileInfo
31		arg3 protocol.BlockInfo
32	}
33	availabilityReturns struct {
34		result1 []model.Availability
35		result2 error
36	}
37	availabilityReturnsOnCall map[int]struct {
38		result1 []model.Availability
39		result2 error
40	}
41	BringToFrontStub        func(string, string)
42	bringToFrontMutex       sync.RWMutex
43	bringToFrontArgsForCall []struct {
44		arg1 string
45		arg2 string
46	}
47	ClosedStub        func(protocol.DeviceID, error)
48	closedMutex       sync.RWMutex
49	closedArgsForCall []struct {
50		arg1 protocol.DeviceID
51		arg2 error
52	}
53	ClusterConfigStub        func(protocol.DeviceID, protocol.ClusterConfig) error
54	clusterConfigMutex       sync.RWMutex
55	clusterConfigArgsForCall []struct {
56		arg1 protocol.DeviceID
57		arg2 protocol.ClusterConfig
58	}
59	clusterConfigReturns struct {
60		result1 error
61	}
62	clusterConfigReturnsOnCall map[int]struct {
63		result1 error
64	}
65	CompletionStub        func(protocol.DeviceID, string) (model.FolderCompletion, error)
66	completionMutex       sync.RWMutex
67	completionArgsForCall []struct {
68		arg1 protocol.DeviceID
69		arg2 string
70	}
71	completionReturns struct {
72		result1 model.FolderCompletion
73		result2 error
74	}
75	completionReturnsOnCall map[int]struct {
76		result1 model.FolderCompletion
77		result2 error
78	}
79	ConnectionStub        func(protocol.DeviceID) (protocol.Connection, bool)
80	connectionMutex       sync.RWMutex
81	connectionArgsForCall []struct {
82		arg1 protocol.DeviceID
83	}
84	connectionReturns struct {
85		result1 protocol.Connection
86		result2 bool
87	}
88	connectionReturnsOnCall map[int]struct {
89		result1 protocol.Connection
90		result2 bool
91	}
92	ConnectionStatsStub        func() map[string]interface{}
93	connectionStatsMutex       sync.RWMutex
94	connectionStatsArgsForCall []struct {
95	}
96	connectionStatsReturns struct {
97		result1 map[string]interface{}
98	}
99	connectionStatsReturnsOnCall map[int]struct {
100		result1 map[string]interface{}
101	}
102	CurrentFolderFileStub        func(string, string) (protocol.FileInfo, bool, error)
103	currentFolderFileMutex       sync.RWMutex
104	currentFolderFileArgsForCall []struct {
105		arg1 string
106		arg2 string
107	}
108	currentFolderFileReturns struct {
109		result1 protocol.FileInfo
110		result2 bool
111		result3 error
112	}
113	currentFolderFileReturnsOnCall map[int]struct {
114		result1 protocol.FileInfo
115		result2 bool
116		result3 error
117	}
118	CurrentGlobalFileStub        func(string, string) (protocol.FileInfo, bool, error)
119	currentGlobalFileMutex       sync.RWMutex
120	currentGlobalFileArgsForCall []struct {
121		arg1 string
122		arg2 string
123	}
124	currentGlobalFileReturns struct {
125		result1 protocol.FileInfo
126		result2 bool
127		result3 error
128	}
129	currentGlobalFileReturnsOnCall map[int]struct {
130		result1 protocol.FileInfo
131		result2 bool
132		result3 error
133	}
134	CurrentIgnoresStub        func(string) ([]string, []string, error)
135	currentIgnoresMutex       sync.RWMutex
136	currentIgnoresArgsForCall []struct {
137		arg1 string
138	}
139	currentIgnoresReturns struct {
140		result1 []string
141		result2 []string
142		result3 error
143	}
144	currentIgnoresReturnsOnCall map[int]struct {
145		result1 []string
146		result2 []string
147		result3 error
148	}
149	DBSnapshotStub        func(string) (*db.Snapshot, error)
150	dBSnapshotMutex       sync.RWMutex
151	dBSnapshotArgsForCall []struct {
152		arg1 string
153	}
154	dBSnapshotReturns struct {
155		result1 *db.Snapshot
156		result2 error
157	}
158	dBSnapshotReturnsOnCall map[int]struct {
159		result1 *db.Snapshot
160		result2 error
161	}
162	DelayScanStub        func(string, time.Duration)
163	delayScanMutex       sync.RWMutex
164	delayScanArgsForCall []struct {
165		arg1 string
166		arg2 time.Duration
167	}
168	DeviceStatisticsStub        func() (map[protocol.DeviceID]stats.DeviceStatistics, error)
169	deviceStatisticsMutex       sync.RWMutex
170	deviceStatisticsArgsForCall []struct {
171	}
172	deviceStatisticsReturns struct {
173		result1 map[protocol.DeviceID]stats.DeviceStatistics
174		result2 error
175	}
176	deviceStatisticsReturnsOnCall map[int]struct {
177		result1 map[protocol.DeviceID]stats.DeviceStatistics
178		result2 error
179	}
180	DismissPendingDeviceStub        func(protocol.DeviceID) error
181	dismissPendingDeviceMutex       sync.RWMutex
182	dismissPendingDeviceArgsForCall []struct {
183		arg1 protocol.DeviceID
184	}
185	dismissPendingDeviceReturns struct {
186		result1 error
187	}
188	dismissPendingDeviceReturnsOnCall map[int]struct {
189		result1 error
190	}
191	DismissPendingFolderStub        func(protocol.DeviceID, string) error
192	dismissPendingFolderMutex       sync.RWMutex
193	dismissPendingFolderArgsForCall []struct {
194		arg1 protocol.DeviceID
195		arg2 string
196	}
197	dismissPendingFolderReturns struct {
198		result1 error
199	}
200	dismissPendingFolderReturnsOnCall map[int]struct {
201		result1 error
202	}
203	DownloadProgressStub        func(protocol.DeviceID, string, []protocol.FileDownloadProgressUpdate) error
204	downloadProgressMutex       sync.RWMutex
205	downloadProgressArgsForCall []struct {
206		arg1 protocol.DeviceID
207		arg2 string
208		arg3 []protocol.FileDownloadProgressUpdate
209	}
210	downloadProgressReturns struct {
211		result1 error
212	}
213	downloadProgressReturnsOnCall map[int]struct {
214		result1 error
215	}
216	FolderErrorsStub        func(string) ([]model.FileError, error)
217	folderErrorsMutex       sync.RWMutex
218	folderErrorsArgsForCall []struct {
219		arg1 string
220	}
221	folderErrorsReturns struct {
222		result1 []model.FileError
223		result2 error
224	}
225	folderErrorsReturnsOnCall map[int]struct {
226		result1 []model.FileError
227		result2 error
228	}
229	FolderProgressBytesCompletedStub        func(string) int64
230	folderProgressBytesCompletedMutex       sync.RWMutex
231	folderProgressBytesCompletedArgsForCall []struct {
232		arg1 string
233	}
234	folderProgressBytesCompletedReturns struct {
235		result1 int64
236	}
237	folderProgressBytesCompletedReturnsOnCall map[int]struct {
238		result1 int64
239	}
240	FolderStatisticsStub        func() (map[string]stats.FolderStatistics, error)
241	folderStatisticsMutex       sync.RWMutex
242	folderStatisticsArgsForCall []struct {
243	}
244	folderStatisticsReturns struct {
245		result1 map[string]stats.FolderStatistics
246		result2 error
247	}
248	folderStatisticsReturnsOnCall map[int]struct {
249		result1 map[string]stats.FolderStatistics
250		result2 error
251	}
252	GetFolderVersionsStub        func(string) (map[string][]versioner.FileVersion, error)
253	getFolderVersionsMutex       sync.RWMutex
254	getFolderVersionsArgsForCall []struct {
255		arg1 string
256	}
257	getFolderVersionsReturns struct {
258		result1 map[string][]versioner.FileVersion
259		result2 error
260	}
261	getFolderVersionsReturnsOnCall map[int]struct {
262		result1 map[string][]versioner.FileVersion
263		result2 error
264	}
265	GetHelloStub        func(protocol.DeviceID) protocol.HelloIntf
266	getHelloMutex       sync.RWMutex
267	getHelloArgsForCall []struct {
268		arg1 protocol.DeviceID
269	}
270	getHelloReturns struct {
271		result1 protocol.HelloIntf
272	}
273	getHelloReturnsOnCall map[int]struct {
274		result1 protocol.HelloIntf
275	}
276	GetMtimeMappingStub        func(string, string) (fs.MtimeMapping, error)
277	getMtimeMappingMutex       sync.RWMutex
278	getMtimeMappingArgsForCall []struct {
279		arg1 string
280		arg2 string
281	}
282	getMtimeMappingReturns struct {
283		result1 fs.MtimeMapping
284		result2 error
285	}
286	getMtimeMappingReturnsOnCall map[int]struct {
287		result1 fs.MtimeMapping
288		result2 error
289	}
290	GlobalDirectoryTreeStub        func(string, string, int, bool) ([]*model.TreeEntry, error)
291	globalDirectoryTreeMutex       sync.RWMutex
292	globalDirectoryTreeArgsForCall []struct {
293		arg1 string
294		arg2 string
295		arg3 int
296		arg4 bool
297	}
298	globalDirectoryTreeReturns struct {
299		result1 []*model.TreeEntry
300		result2 error
301	}
302	globalDirectoryTreeReturnsOnCall map[int]struct {
303		result1 []*model.TreeEntry
304		result2 error
305	}
306	IndexStub        func(protocol.DeviceID, string, []protocol.FileInfo) error
307	indexMutex       sync.RWMutex
308	indexArgsForCall []struct {
309		arg1 protocol.DeviceID
310		arg2 string
311		arg3 []protocol.FileInfo
312	}
313	indexReturns struct {
314		result1 error
315	}
316	indexReturnsOnCall map[int]struct {
317		result1 error
318	}
319	IndexUpdateStub        func(protocol.DeviceID, string, []protocol.FileInfo) error
320	indexUpdateMutex       sync.RWMutex
321	indexUpdateArgsForCall []struct {
322		arg1 protocol.DeviceID
323		arg2 string
324		arg3 []protocol.FileInfo
325	}
326	indexUpdateReturns struct {
327		result1 error
328	}
329	indexUpdateReturnsOnCall map[int]struct {
330		result1 error
331	}
332	LoadIgnoresStub        func(string) ([]string, []string, error)
333	loadIgnoresMutex       sync.RWMutex
334	loadIgnoresArgsForCall []struct {
335		arg1 string
336	}
337	loadIgnoresReturns struct {
338		result1 []string
339		result2 []string
340		result3 error
341	}
342	loadIgnoresReturnsOnCall map[int]struct {
343		result1 []string
344		result2 []string
345		result3 error
346	}
347	LocalChangedFolderFilesStub        func(string, int, int) ([]db.FileInfoTruncated, error)
348	localChangedFolderFilesMutex       sync.RWMutex
349	localChangedFolderFilesArgsForCall []struct {
350		arg1 string
351		arg2 int
352		arg3 int
353	}
354	localChangedFolderFilesReturns struct {
355		result1 []db.FileInfoTruncated
356		result2 error
357	}
358	localChangedFolderFilesReturnsOnCall map[int]struct {
359		result1 []db.FileInfoTruncated
360		result2 error
361	}
362	NeedFolderFilesStub        func(string, int, int) ([]db.FileInfoTruncated, []db.FileInfoTruncated, []db.FileInfoTruncated, error)
363	needFolderFilesMutex       sync.RWMutex
364	needFolderFilesArgsForCall []struct {
365		arg1 string
366		arg2 int
367		arg3 int
368	}
369	needFolderFilesReturns struct {
370		result1 []db.FileInfoTruncated
371		result2 []db.FileInfoTruncated
372		result3 []db.FileInfoTruncated
373		result4 error
374	}
375	needFolderFilesReturnsOnCall map[int]struct {
376		result1 []db.FileInfoTruncated
377		result2 []db.FileInfoTruncated
378		result3 []db.FileInfoTruncated
379		result4 error
380	}
381	NumConnectionsStub        func() int
382	numConnectionsMutex       sync.RWMutex
383	numConnectionsArgsForCall []struct {
384	}
385	numConnectionsReturns struct {
386		result1 int
387	}
388	numConnectionsReturnsOnCall map[int]struct {
389		result1 int
390	}
391	OnHelloStub        func(protocol.DeviceID, net.Addr, protocol.Hello) error
392	onHelloMutex       sync.RWMutex
393	onHelloArgsForCall []struct {
394		arg1 protocol.DeviceID
395		arg2 net.Addr
396		arg3 protocol.Hello
397	}
398	onHelloReturns struct {
399		result1 error
400	}
401	onHelloReturnsOnCall map[int]struct {
402		result1 error
403	}
404	OverrideStub        func(string)
405	overrideMutex       sync.RWMutex
406	overrideArgsForCall []struct {
407		arg1 string
408	}
409	PendingDevicesStub        func() (map[protocol.DeviceID]db.ObservedDevice, error)
410	pendingDevicesMutex       sync.RWMutex
411	pendingDevicesArgsForCall []struct {
412	}
413	pendingDevicesReturns struct {
414		result1 map[protocol.DeviceID]db.ObservedDevice
415		result2 error
416	}
417	pendingDevicesReturnsOnCall map[int]struct {
418		result1 map[protocol.DeviceID]db.ObservedDevice
419		result2 error
420	}
421	PendingFoldersStub        func(protocol.DeviceID) (map[string]db.PendingFolder, error)
422	pendingFoldersMutex       sync.RWMutex
423	pendingFoldersArgsForCall []struct {
424		arg1 protocol.DeviceID
425	}
426	pendingFoldersReturns struct {
427		result1 map[string]db.PendingFolder
428		result2 error
429	}
430	pendingFoldersReturnsOnCall map[int]struct {
431		result1 map[string]db.PendingFolder
432		result2 error
433	}
434	RemoteNeedFolderFilesStub        func(string, protocol.DeviceID, int, int) ([]db.FileInfoTruncated, error)
435	remoteNeedFolderFilesMutex       sync.RWMutex
436	remoteNeedFolderFilesArgsForCall []struct {
437		arg1 string
438		arg2 protocol.DeviceID
439		arg3 int
440		arg4 int
441	}
442	remoteNeedFolderFilesReturns struct {
443		result1 []db.FileInfoTruncated
444		result2 error
445	}
446	remoteNeedFolderFilesReturnsOnCall map[int]struct {
447		result1 []db.FileInfoTruncated
448		result2 error
449	}
450	RequestStub        func(protocol.DeviceID, string, string, int32, int32, int64, []byte, uint32, bool) (protocol.RequestResponse, error)
451	requestMutex       sync.RWMutex
452	requestArgsForCall []struct {
453		arg1 protocol.DeviceID
454		arg2 string
455		arg3 string
456		arg4 int32
457		arg5 int32
458		arg6 int64
459		arg7 []byte
460		arg8 uint32
461		arg9 bool
462	}
463	requestReturns struct {
464		result1 protocol.RequestResponse
465		result2 error
466	}
467	requestReturnsOnCall map[int]struct {
468		result1 protocol.RequestResponse
469		result2 error
470	}
471	ResetFolderStub        func(string)
472	resetFolderMutex       sync.RWMutex
473	resetFolderArgsForCall []struct {
474		arg1 string
475	}
476	RestoreFolderVersionsStub        func(string, map[string]time.Time) (map[string]error, error)
477	restoreFolderVersionsMutex       sync.RWMutex
478	restoreFolderVersionsArgsForCall []struct {
479		arg1 string
480		arg2 map[string]time.Time
481	}
482	restoreFolderVersionsReturns struct {
483		result1 map[string]error
484		result2 error
485	}
486	restoreFolderVersionsReturnsOnCall map[int]struct {
487		result1 map[string]error
488		result2 error
489	}
490	RevertStub        func(string)
491	revertMutex       sync.RWMutex
492	revertArgsForCall []struct {
493		arg1 string
494	}
495	ScanFolderStub        func(string) error
496	scanFolderMutex       sync.RWMutex
497	scanFolderArgsForCall []struct {
498		arg1 string
499	}
500	scanFolderReturns struct {
501		result1 error
502	}
503	scanFolderReturnsOnCall map[int]struct {
504		result1 error
505	}
506	ScanFolderSubdirsStub        func(string, []string) error
507	scanFolderSubdirsMutex       sync.RWMutex
508	scanFolderSubdirsArgsForCall []struct {
509		arg1 string
510		arg2 []string
511	}
512	scanFolderSubdirsReturns struct {
513		result1 error
514	}
515	scanFolderSubdirsReturnsOnCall map[int]struct {
516		result1 error
517	}
518	ScanFoldersStub        func() map[string]error
519	scanFoldersMutex       sync.RWMutex
520	scanFoldersArgsForCall []struct {
521	}
522	scanFoldersReturns struct {
523		result1 map[string]error
524	}
525	scanFoldersReturnsOnCall map[int]struct {
526		result1 map[string]error
527	}
528	ServeStub        func(context.Context) error
529	serveMutex       sync.RWMutex
530	serveArgsForCall []struct {
531		arg1 context.Context
532	}
533	serveReturns struct {
534		result1 error
535	}
536	serveReturnsOnCall map[int]struct {
537		result1 error
538	}
539	SetIgnoresStub        func(string, []string) error
540	setIgnoresMutex       sync.RWMutex
541	setIgnoresArgsForCall []struct {
542		arg1 string
543		arg2 []string
544	}
545	setIgnoresReturns struct {
546		result1 error
547	}
548	setIgnoresReturnsOnCall map[int]struct {
549		result1 error
550	}
551	StartDeadlockDetectorStub        func(time.Duration)
552	startDeadlockDetectorMutex       sync.RWMutex
553	startDeadlockDetectorArgsForCall []struct {
554		arg1 time.Duration
555	}
556	StateStub        func(string) (string, time.Time, error)
557	stateMutex       sync.RWMutex
558	stateArgsForCall []struct {
559		arg1 string
560	}
561	stateReturns struct {
562		result1 string
563		result2 time.Time
564		result3 error
565	}
566	stateReturnsOnCall map[int]struct {
567		result1 string
568		result2 time.Time
569		result3 error
570	}
571	UsageReportingStatsStub        func(*contract.Report, int, bool)
572	usageReportingStatsMutex       sync.RWMutex
573	usageReportingStatsArgsForCall []struct {
574		arg1 *contract.Report
575		arg2 int
576		arg3 bool
577	}
578	WatchErrorStub        func(string) error
579	watchErrorMutex       sync.RWMutex
580	watchErrorArgsForCall []struct {
581		arg1 string
582	}
583	watchErrorReturns struct {
584		result1 error
585	}
586	watchErrorReturnsOnCall map[int]struct {
587		result1 error
588	}
589	invocations      map[string][][]interface{}
590	invocationsMutex sync.RWMutex
591}
592
593func (fake *Model) AddConnection(arg1 protocol.Connection, arg2 protocol.Hello) {
594	fake.addConnectionMutex.Lock()
595	fake.addConnectionArgsForCall = append(fake.addConnectionArgsForCall, struct {
596		arg1 protocol.Connection
597		arg2 protocol.Hello
598	}{arg1, arg2})
599	stub := fake.AddConnectionStub
600	fake.recordInvocation("AddConnection", []interface{}{arg1, arg2})
601	fake.addConnectionMutex.Unlock()
602	if stub != nil {
603		fake.AddConnectionStub(arg1, arg2)
604	}
605}
606
607func (fake *Model) AddConnectionCallCount() int {
608	fake.addConnectionMutex.RLock()
609	defer fake.addConnectionMutex.RUnlock()
610	return len(fake.addConnectionArgsForCall)
611}
612
613func (fake *Model) AddConnectionCalls(stub func(protocol.Connection, protocol.Hello)) {
614	fake.addConnectionMutex.Lock()
615	defer fake.addConnectionMutex.Unlock()
616	fake.AddConnectionStub = stub
617}
618
619func (fake *Model) AddConnectionArgsForCall(i int) (protocol.Connection, protocol.Hello) {
620	fake.addConnectionMutex.RLock()
621	defer fake.addConnectionMutex.RUnlock()
622	argsForCall := fake.addConnectionArgsForCall[i]
623	return argsForCall.arg1, argsForCall.arg2
624}
625
626func (fake *Model) Availability(arg1 string, arg2 protocol.FileInfo, arg3 protocol.BlockInfo) ([]model.Availability, error) {
627	fake.availabilityMutex.Lock()
628	ret, specificReturn := fake.availabilityReturnsOnCall[len(fake.availabilityArgsForCall)]
629	fake.availabilityArgsForCall = append(fake.availabilityArgsForCall, struct {
630		arg1 string
631		arg2 protocol.FileInfo
632		arg3 protocol.BlockInfo
633	}{arg1, arg2, arg3})
634	stub := fake.AvailabilityStub
635	fakeReturns := fake.availabilityReturns
636	fake.recordInvocation("Availability", []interface{}{arg1, arg2, arg3})
637	fake.availabilityMutex.Unlock()
638	if stub != nil {
639		return stub(arg1, arg2, arg3)
640	}
641	if specificReturn {
642		return ret.result1, ret.result2
643	}
644	return fakeReturns.result1, fakeReturns.result2
645}
646
647func (fake *Model) AvailabilityCallCount() int {
648	fake.availabilityMutex.RLock()
649	defer fake.availabilityMutex.RUnlock()
650	return len(fake.availabilityArgsForCall)
651}
652
653func (fake *Model) AvailabilityCalls(stub func(string, protocol.FileInfo, protocol.BlockInfo) ([]model.Availability, error)) {
654	fake.availabilityMutex.Lock()
655	defer fake.availabilityMutex.Unlock()
656	fake.AvailabilityStub = stub
657}
658
659func (fake *Model) AvailabilityArgsForCall(i int) (string, protocol.FileInfo, protocol.BlockInfo) {
660	fake.availabilityMutex.RLock()
661	defer fake.availabilityMutex.RUnlock()
662	argsForCall := fake.availabilityArgsForCall[i]
663	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
664}
665
666func (fake *Model) AvailabilityReturns(result1 []model.Availability, result2 error) {
667	fake.availabilityMutex.Lock()
668	defer fake.availabilityMutex.Unlock()
669	fake.AvailabilityStub = nil
670	fake.availabilityReturns = struct {
671		result1 []model.Availability
672		result2 error
673	}{result1, result2}
674}
675
676func (fake *Model) AvailabilityReturnsOnCall(i int, result1 []model.Availability, result2 error) {
677	fake.availabilityMutex.Lock()
678	defer fake.availabilityMutex.Unlock()
679	fake.AvailabilityStub = nil
680	if fake.availabilityReturnsOnCall == nil {
681		fake.availabilityReturnsOnCall = make(map[int]struct {
682			result1 []model.Availability
683			result2 error
684		})
685	}
686	fake.availabilityReturnsOnCall[i] = struct {
687		result1 []model.Availability
688		result2 error
689	}{result1, result2}
690}
691
692func (fake *Model) BringToFront(arg1 string, arg2 string) {
693	fake.bringToFrontMutex.Lock()
694	fake.bringToFrontArgsForCall = append(fake.bringToFrontArgsForCall, struct {
695		arg1 string
696		arg2 string
697	}{arg1, arg2})
698	stub := fake.BringToFrontStub
699	fake.recordInvocation("BringToFront", []interface{}{arg1, arg2})
700	fake.bringToFrontMutex.Unlock()
701	if stub != nil {
702		fake.BringToFrontStub(arg1, arg2)
703	}
704}
705
706func (fake *Model) BringToFrontCallCount() int {
707	fake.bringToFrontMutex.RLock()
708	defer fake.bringToFrontMutex.RUnlock()
709	return len(fake.bringToFrontArgsForCall)
710}
711
712func (fake *Model) BringToFrontCalls(stub func(string, string)) {
713	fake.bringToFrontMutex.Lock()
714	defer fake.bringToFrontMutex.Unlock()
715	fake.BringToFrontStub = stub
716}
717
718func (fake *Model) BringToFrontArgsForCall(i int) (string, string) {
719	fake.bringToFrontMutex.RLock()
720	defer fake.bringToFrontMutex.RUnlock()
721	argsForCall := fake.bringToFrontArgsForCall[i]
722	return argsForCall.arg1, argsForCall.arg2
723}
724
725func (fake *Model) Closed(arg1 protocol.DeviceID, arg2 error) {
726	fake.closedMutex.Lock()
727	fake.closedArgsForCall = append(fake.closedArgsForCall, struct {
728		arg1 protocol.DeviceID
729		arg2 error
730	}{arg1, arg2})
731	stub := fake.ClosedStub
732	fake.recordInvocation("Closed", []interface{}{arg1, arg2})
733	fake.closedMutex.Unlock()
734	if stub != nil {
735		fake.ClosedStub(arg1, arg2)
736	}
737}
738
739func (fake *Model) ClosedCallCount() int {
740	fake.closedMutex.RLock()
741	defer fake.closedMutex.RUnlock()
742	return len(fake.closedArgsForCall)
743}
744
745func (fake *Model) ClosedCalls(stub func(protocol.DeviceID, error)) {
746	fake.closedMutex.Lock()
747	defer fake.closedMutex.Unlock()
748	fake.ClosedStub = stub
749}
750
751func (fake *Model) ClosedArgsForCall(i int) (protocol.DeviceID, error) {
752	fake.closedMutex.RLock()
753	defer fake.closedMutex.RUnlock()
754	argsForCall := fake.closedArgsForCall[i]
755	return argsForCall.arg1, argsForCall.arg2
756}
757
758func (fake *Model) ClusterConfig(arg1 protocol.DeviceID, arg2 protocol.ClusterConfig) error {
759	fake.clusterConfigMutex.Lock()
760	ret, specificReturn := fake.clusterConfigReturnsOnCall[len(fake.clusterConfigArgsForCall)]
761	fake.clusterConfigArgsForCall = append(fake.clusterConfigArgsForCall, struct {
762		arg1 protocol.DeviceID
763		arg2 protocol.ClusterConfig
764	}{arg1, arg2})
765	stub := fake.ClusterConfigStub
766	fakeReturns := fake.clusterConfigReturns
767	fake.recordInvocation("ClusterConfig", []interface{}{arg1, arg2})
768	fake.clusterConfigMutex.Unlock()
769	if stub != nil {
770		return stub(arg1, arg2)
771	}
772	if specificReturn {
773		return ret.result1
774	}
775	return fakeReturns.result1
776}
777
778func (fake *Model) ClusterConfigCallCount() int {
779	fake.clusterConfigMutex.RLock()
780	defer fake.clusterConfigMutex.RUnlock()
781	return len(fake.clusterConfigArgsForCall)
782}
783
784func (fake *Model) ClusterConfigCalls(stub func(protocol.DeviceID, protocol.ClusterConfig) error) {
785	fake.clusterConfigMutex.Lock()
786	defer fake.clusterConfigMutex.Unlock()
787	fake.ClusterConfigStub = stub
788}
789
790func (fake *Model) ClusterConfigArgsForCall(i int) (protocol.DeviceID, protocol.ClusterConfig) {
791	fake.clusterConfigMutex.RLock()
792	defer fake.clusterConfigMutex.RUnlock()
793	argsForCall := fake.clusterConfigArgsForCall[i]
794	return argsForCall.arg1, argsForCall.arg2
795}
796
797func (fake *Model) ClusterConfigReturns(result1 error) {
798	fake.clusterConfigMutex.Lock()
799	defer fake.clusterConfigMutex.Unlock()
800	fake.ClusterConfigStub = nil
801	fake.clusterConfigReturns = struct {
802		result1 error
803	}{result1}
804}
805
806func (fake *Model) ClusterConfigReturnsOnCall(i int, result1 error) {
807	fake.clusterConfigMutex.Lock()
808	defer fake.clusterConfigMutex.Unlock()
809	fake.ClusterConfigStub = nil
810	if fake.clusterConfigReturnsOnCall == nil {
811		fake.clusterConfigReturnsOnCall = make(map[int]struct {
812			result1 error
813		})
814	}
815	fake.clusterConfigReturnsOnCall[i] = struct {
816		result1 error
817	}{result1}
818}
819
820func (fake *Model) Completion(arg1 protocol.DeviceID, arg2 string) (model.FolderCompletion, error) {
821	fake.completionMutex.Lock()
822	ret, specificReturn := fake.completionReturnsOnCall[len(fake.completionArgsForCall)]
823	fake.completionArgsForCall = append(fake.completionArgsForCall, struct {
824		arg1 protocol.DeviceID
825		arg2 string
826	}{arg1, arg2})
827	stub := fake.CompletionStub
828	fakeReturns := fake.completionReturns
829	fake.recordInvocation("Completion", []interface{}{arg1, arg2})
830	fake.completionMutex.Unlock()
831	if stub != nil {
832		return stub(arg1, arg2)
833	}
834	if specificReturn {
835		return ret.result1, ret.result2
836	}
837	return fakeReturns.result1, fakeReturns.result2
838}
839
840func (fake *Model) CompletionCallCount() int {
841	fake.completionMutex.RLock()
842	defer fake.completionMutex.RUnlock()
843	return len(fake.completionArgsForCall)
844}
845
846func (fake *Model) CompletionCalls(stub func(protocol.DeviceID, string) (model.FolderCompletion, error)) {
847	fake.completionMutex.Lock()
848	defer fake.completionMutex.Unlock()
849	fake.CompletionStub = stub
850}
851
852func (fake *Model) CompletionArgsForCall(i int) (protocol.DeviceID, string) {
853	fake.completionMutex.RLock()
854	defer fake.completionMutex.RUnlock()
855	argsForCall := fake.completionArgsForCall[i]
856	return argsForCall.arg1, argsForCall.arg2
857}
858
859func (fake *Model) CompletionReturns(result1 model.FolderCompletion, result2 error) {
860	fake.completionMutex.Lock()
861	defer fake.completionMutex.Unlock()
862	fake.CompletionStub = nil
863	fake.completionReturns = struct {
864		result1 model.FolderCompletion
865		result2 error
866	}{result1, result2}
867}
868
869func (fake *Model) CompletionReturnsOnCall(i int, result1 model.FolderCompletion, result2 error) {
870	fake.completionMutex.Lock()
871	defer fake.completionMutex.Unlock()
872	fake.CompletionStub = nil
873	if fake.completionReturnsOnCall == nil {
874		fake.completionReturnsOnCall = make(map[int]struct {
875			result1 model.FolderCompletion
876			result2 error
877		})
878	}
879	fake.completionReturnsOnCall[i] = struct {
880		result1 model.FolderCompletion
881		result2 error
882	}{result1, result2}
883}
884
885func (fake *Model) Connection(arg1 protocol.DeviceID) (protocol.Connection, bool) {
886	fake.connectionMutex.Lock()
887	ret, specificReturn := fake.connectionReturnsOnCall[len(fake.connectionArgsForCall)]
888	fake.connectionArgsForCall = append(fake.connectionArgsForCall, struct {
889		arg1 protocol.DeviceID
890	}{arg1})
891	stub := fake.ConnectionStub
892	fakeReturns := fake.connectionReturns
893	fake.recordInvocation("Connection", []interface{}{arg1})
894	fake.connectionMutex.Unlock()
895	if stub != nil {
896		return stub(arg1)
897	}
898	if specificReturn {
899		return ret.result1, ret.result2
900	}
901	return fakeReturns.result1, fakeReturns.result2
902}
903
904func (fake *Model) ConnectionCallCount() int {
905	fake.connectionMutex.RLock()
906	defer fake.connectionMutex.RUnlock()
907	return len(fake.connectionArgsForCall)
908}
909
910func (fake *Model) ConnectionCalls(stub func(protocol.DeviceID) (protocol.Connection, bool)) {
911	fake.connectionMutex.Lock()
912	defer fake.connectionMutex.Unlock()
913	fake.ConnectionStub = stub
914}
915
916func (fake *Model) ConnectionArgsForCall(i int) protocol.DeviceID {
917	fake.connectionMutex.RLock()
918	defer fake.connectionMutex.RUnlock()
919	argsForCall := fake.connectionArgsForCall[i]
920	return argsForCall.arg1
921}
922
923func (fake *Model) ConnectionReturns(result1 protocol.Connection, result2 bool) {
924	fake.connectionMutex.Lock()
925	defer fake.connectionMutex.Unlock()
926	fake.ConnectionStub = nil
927	fake.connectionReturns = struct {
928		result1 protocol.Connection
929		result2 bool
930	}{result1, result2}
931}
932
933func (fake *Model) ConnectionReturnsOnCall(i int, result1 protocol.Connection, result2 bool) {
934	fake.connectionMutex.Lock()
935	defer fake.connectionMutex.Unlock()
936	fake.ConnectionStub = nil
937	if fake.connectionReturnsOnCall == nil {
938		fake.connectionReturnsOnCall = make(map[int]struct {
939			result1 protocol.Connection
940			result2 bool
941		})
942	}
943	fake.connectionReturnsOnCall[i] = struct {
944		result1 protocol.Connection
945		result2 bool
946	}{result1, result2}
947}
948
949func (fake *Model) ConnectionStats() map[string]interface{} {
950	fake.connectionStatsMutex.Lock()
951	ret, specificReturn := fake.connectionStatsReturnsOnCall[len(fake.connectionStatsArgsForCall)]
952	fake.connectionStatsArgsForCall = append(fake.connectionStatsArgsForCall, struct {
953	}{})
954	stub := fake.ConnectionStatsStub
955	fakeReturns := fake.connectionStatsReturns
956	fake.recordInvocation("ConnectionStats", []interface{}{})
957	fake.connectionStatsMutex.Unlock()
958	if stub != nil {
959		return stub()
960	}
961	if specificReturn {
962		return ret.result1
963	}
964	return fakeReturns.result1
965}
966
967func (fake *Model) ConnectionStatsCallCount() int {
968	fake.connectionStatsMutex.RLock()
969	defer fake.connectionStatsMutex.RUnlock()
970	return len(fake.connectionStatsArgsForCall)
971}
972
973func (fake *Model) ConnectionStatsCalls(stub func() map[string]interface{}) {
974	fake.connectionStatsMutex.Lock()
975	defer fake.connectionStatsMutex.Unlock()
976	fake.ConnectionStatsStub = stub
977}
978
979func (fake *Model) ConnectionStatsReturns(result1 map[string]interface{}) {
980	fake.connectionStatsMutex.Lock()
981	defer fake.connectionStatsMutex.Unlock()
982	fake.ConnectionStatsStub = nil
983	fake.connectionStatsReturns = struct {
984		result1 map[string]interface{}
985	}{result1}
986}
987
988func (fake *Model) ConnectionStatsReturnsOnCall(i int, result1 map[string]interface{}) {
989	fake.connectionStatsMutex.Lock()
990	defer fake.connectionStatsMutex.Unlock()
991	fake.ConnectionStatsStub = nil
992	if fake.connectionStatsReturnsOnCall == nil {
993		fake.connectionStatsReturnsOnCall = make(map[int]struct {
994			result1 map[string]interface{}
995		})
996	}
997	fake.connectionStatsReturnsOnCall[i] = struct {
998		result1 map[string]interface{}
999	}{result1}
1000}
1001
1002func (fake *Model) CurrentFolderFile(arg1 string, arg2 string) (protocol.FileInfo, bool, error) {
1003	fake.currentFolderFileMutex.Lock()
1004	ret, specificReturn := fake.currentFolderFileReturnsOnCall[len(fake.currentFolderFileArgsForCall)]
1005	fake.currentFolderFileArgsForCall = append(fake.currentFolderFileArgsForCall, struct {
1006		arg1 string
1007		arg2 string
1008	}{arg1, arg2})
1009	stub := fake.CurrentFolderFileStub
1010	fakeReturns := fake.currentFolderFileReturns
1011	fake.recordInvocation("CurrentFolderFile", []interface{}{arg1, arg2})
1012	fake.currentFolderFileMutex.Unlock()
1013	if stub != nil {
1014		return stub(arg1, arg2)
1015	}
1016	if specificReturn {
1017		return ret.result1, ret.result2, ret.result3
1018	}
1019	return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3
1020}
1021
1022func (fake *Model) CurrentFolderFileCallCount() int {
1023	fake.currentFolderFileMutex.RLock()
1024	defer fake.currentFolderFileMutex.RUnlock()
1025	return len(fake.currentFolderFileArgsForCall)
1026}
1027
1028func (fake *Model) CurrentFolderFileCalls(stub func(string, string) (protocol.FileInfo, bool, error)) {
1029	fake.currentFolderFileMutex.Lock()
1030	defer fake.currentFolderFileMutex.Unlock()
1031	fake.CurrentFolderFileStub = stub
1032}
1033
1034func (fake *Model) CurrentFolderFileArgsForCall(i int) (string, string) {
1035	fake.currentFolderFileMutex.RLock()
1036	defer fake.currentFolderFileMutex.RUnlock()
1037	argsForCall := fake.currentFolderFileArgsForCall[i]
1038	return argsForCall.arg1, argsForCall.arg2
1039}
1040
1041func (fake *Model) CurrentFolderFileReturns(result1 protocol.FileInfo, result2 bool, result3 error) {
1042	fake.currentFolderFileMutex.Lock()
1043	defer fake.currentFolderFileMutex.Unlock()
1044	fake.CurrentFolderFileStub = nil
1045	fake.currentFolderFileReturns = struct {
1046		result1 protocol.FileInfo
1047		result2 bool
1048		result3 error
1049	}{result1, result2, result3}
1050}
1051
1052func (fake *Model) CurrentFolderFileReturnsOnCall(i int, result1 protocol.FileInfo, result2 bool, result3 error) {
1053	fake.currentFolderFileMutex.Lock()
1054	defer fake.currentFolderFileMutex.Unlock()
1055	fake.CurrentFolderFileStub = nil
1056	if fake.currentFolderFileReturnsOnCall == nil {
1057		fake.currentFolderFileReturnsOnCall = make(map[int]struct {
1058			result1 protocol.FileInfo
1059			result2 bool
1060			result3 error
1061		})
1062	}
1063	fake.currentFolderFileReturnsOnCall[i] = struct {
1064		result1 protocol.FileInfo
1065		result2 bool
1066		result3 error
1067	}{result1, result2, result3}
1068}
1069
1070func (fake *Model) CurrentGlobalFile(arg1 string, arg2 string) (protocol.FileInfo, bool, error) {
1071	fake.currentGlobalFileMutex.Lock()
1072	ret, specificReturn := fake.currentGlobalFileReturnsOnCall[len(fake.currentGlobalFileArgsForCall)]
1073	fake.currentGlobalFileArgsForCall = append(fake.currentGlobalFileArgsForCall, struct {
1074		arg1 string
1075		arg2 string
1076	}{arg1, arg2})
1077	stub := fake.CurrentGlobalFileStub
1078	fakeReturns := fake.currentGlobalFileReturns
1079	fake.recordInvocation("CurrentGlobalFile", []interface{}{arg1, arg2})
1080	fake.currentGlobalFileMutex.Unlock()
1081	if stub != nil {
1082		return stub(arg1, arg2)
1083	}
1084	if specificReturn {
1085		return ret.result1, ret.result2, ret.result3
1086	}
1087	return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3
1088}
1089
1090func (fake *Model) CurrentGlobalFileCallCount() int {
1091	fake.currentGlobalFileMutex.RLock()
1092	defer fake.currentGlobalFileMutex.RUnlock()
1093	return len(fake.currentGlobalFileArgsForCall)
1094}
1095
1096func (fake *Model) CurrentGlobalFileCalls(stub func(string, string) (protocol.FileInfo, bool, error)) {
1097	fake.currentGlobalFileMutex.Lock()
1098	defer fake.currentGlobalFileMutex.Unlock()
1099	fake.CurrentGlobalFileStub = stub
1100}
1101
1102func (fake *Model) CurrentGlobalFileArgsForCall(i int) (string, string) {
1103	fake.currentGlobalFileMutex.RLock()
1104	defer fake.currentGlobalFileMutex.RUnlock()
1105	argsForCall := fake.currentGlobalFileArgsForCall[i]
1106	return argsForCall.arg1, argsForCall.arg2
1107}
1108
1109func (fake *Model) CurrentGlobalFileReturns(result1 protocol.FileInfo, result2 bool, result3 error) {
1110	fake.currentGlobalFileMutex.Lock()
1111	defer fake.currentGlobalFileMutex.Unlock()
1112	fake.CurrentGlobalFileStub = nil
1113	fake.currentGlobalFileReturns = struct {
1114		result1 protocol.FileInfo
1115		result2 bool
1116		result3 error
1117	}{result1, result2, result3}
1118}
1119
1120func (fake *Model) CurrentGlobalFileReturnsOnCall(i int, result1 protocol.FileInfo, result2 bool, result3 error) {
1121	fake.currentGlobalFileMutex.Lock()
1122	defer fake.currentGlobalFileMutex.Unlock()
1123	fake.CurrentGlobalFileStub = nil
1124	if fake.currentGlobalFileReturnsOnCall == nil {
1125		fake.currentGlobalFileReturnsOnCall = make(map[int]struct {
1126			result1 protocol.FileInfo
1127			result2 bool
1128			result3 error
1129		})
1130	}
1131	fake.currentGlobalFileReturnsOnCall[i] = struct {
1132		result1 protocol.FileInfo
1133		result2 bool
1134		result3 error
1135	}{result1, result2, result3}
1136}
1137
1138func (fake *Model) CurrentIgnores(arg1 string) ([]string, []string, error) {
1139	fake.currentIgnoresMutex.Lock()
1140	ret, specificReturn := fake.currentIgnoresReturnsOnCall[len(fake.currentIgnoresArgsForCall)]
1141	fake.currentIgnoresArgsForCall = append(fake.currentIgnoresArgsForCall, struct {
1142		arg1 string
1143	}{arg1})
1144	stub := fake.CurrentIgnoresStub
1145	fakeReturns := fake.currentIgnoresReturns
1146	fake.recordInvocation("CurrentIgnores", []interface{}{arg1})
1147	fake.currentIgnoresMutex.Unlock()
1148	if stub != nil {
1149		return stub(arg1)
1150	}
1151	if specificReturn {
1152		return ret.result1, ret.result2, ret.result3
1153	}
1154	return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3
1155}
1156
1157func (fake *Model) CurrentIgnoresCallCount() int {
1158	fake.currentIgnoresMutex.RLock()
1159	defer fake.currentIgnoresMutex.RUnlock()
1160	return len(fake.currentIgnoresArgsForCall)
1161}
1162
1163func (fake *Model) CurrentIgnoresCalls(stub func(string) ([]string, []string, error)) {
1164	fake.currentIgnoresMutex.Lock()
1165	defer fake.currentIgnoresMutex.Unlock()
1166	fake.CurrentIgnoresStub = stub
1167}
1168
1169func (fake *Model) CurrentIgnoresArgsForCall(i int) string {
1170	fake.currentIgnoresMutex.RLock()
1171	defer fake.currentIgnoresMutex.RUnlock()
1172	argsForCall := fake.currentIgnoresArgsForCall[i]
1173	return argsForCall.arg1
1174}
1175
1176func (fake *Model) CurrentIgnoresReturns(result1 []string, result2 []string, result3 error) {
1177	fake.currentIgnoresMutex.Lock()
1178	defer fake.currentIgnoresMutex.Unlock()
1179	fake.CurrentIgnoresStub = nil
1180	fake.currentIgnoresReturns = struct {
1181		result1 []string
1182		result2 []string
1183		result3 error
1184	}{result1, result2, result3}
1185}
1186
1187func (fake *Model) CurrentIgnoresReturnsOnCall(i int, result1 []string, result2 []string, result3 error) {
1188	fake.currentIgnoresMutex.Lock()
1189	defer fake.currentIgnoresMutex.Unlock()
1190	fake.CurrentIgnoresStub = nil
1191	if fake.currentIgnoresReturnsOnCall == nil {
1192		fake.currentIgnoresReturnsOnCall = make(map[int]struct {
1193			result1 []string
1194			result2 []string
1195			result3 error
1196		})
1197	}
1198	fake.currentIgnoresReturnsOnCall[i] = struct {
1199		result1 []string
1200		result2 []string
1201		result3 error
1202	}{result1, result2, result3}
1203}
1204
1205func (fake *Model) DBSnapshot(arg1 string) (*db.Snapshot, error) {
1206	fake.dBSnapshotMutex.Lock()
1207	ret, specificReturn := fake.dBSnapshotReturnsOnCall[len(fake.dBSnapshotArgsForCall)]
1208	fake.dBSnapshotArgsForCall = append(fake.dBSnapshotArgsForCall, struct {
1209		arg1 string
1210	}{arg1})
1211	stub := fake.DBSnapshotStub
1212	fakeReturns := fake.dBSnapshotReturns
1213	fake.recordInvocation("DBSnapshot", []interface{}{arg1})
1214	fake.dBSnapshotMutex.Unlock()
1215	if stub != nil {
1216		return stub(arg1)
1217	}
1218	if specificReturn {
1219		return ret.result1, ret.result2
1220	}
1221	return fakeReturns.result1, fakeReturns.result2
1222}
1223
1224func (fake *Model) DBSnapshotCallCount() int {
1225	fake.dBSnapshotMutex.RLock()
1226	defer fake.dBSnapshotMutex.RUnlock()
1227	return len(fake.dBSnapshotArgsForCall)
1228}
1229
1230func (fake *Model) DBSnapshotCalls(stub func(string) (*db.Snapshot, error)) {
1231	fake.dBSnapshotMutex.Lock()
1232	defer fake.dBSnapshotMutex.Unlock()
1233	fake.DBSnapshotStub = stub
1234}
1235
1236func (fake *Model) DBSnapshotArgsForCall(i int) string {
1237	fake.dBSnapshotMutex.RLock()
1238	defer fake.dBSnapshotMutex.RUnlock()
1239	argsForCall := fake.dBSnapshotArgsForCall[i]
1240	return argsForCall.arg1
1241}
1242
1243func (fake *Model) DBSnapshotReturns(result1 *db.Snapshot, result2 error) {
1244	fake.dBSnapshotMutex.Lock()
1245	defer fake.dBSnapshotMutex.Unlock()
1246	fake.DBSnapshotStub = nil
1247	fake.dBSnapshotReturns = struct {
1248		result1 *db.Snapshot
1249		result2 error
1250	}{result1, result2}
1251}
1252
1253func (fake *Model) DBSnapshotReturnsOnCall(i int, result1 *db.Snapshot, result2 error) {
1254	fake.dBSnapshotMutex.Lock()
1255	defer fake.dBSnapshotMutex.Unlock()
1256	fake.DBSnapshotStub = nil
1257	if fake.dBSnapshotReturnsOnCall == nil {
1258		fake.dBSnapshotReturnsOnCall = make(map[int]struct {
1259			result1 *db.Snapshot
1260			result2 error
1261		})
1262	}
1263	fake.dBSnapshotReturnsOnCall[i] = struct {
1264		result1 *db.Snapshot
1265		result2 error
1266	}{result1, result2}
1267}
1268
1269func (fake *Model) DelayScan(arg1 string, arg2 time.Duration) {
1270	fake.delayScanMutex.Lock()
1271	fake.delayScanArgsForCall = append(fake.delayScanArgsForCall, struct {
1272		arg1 string
1273		arg2 time.Duration
1274	}{arg1, arg2})
1275	stub := fake.DelayScanStub
1276	fake.recordInvocation("DelayScan", []interface{}{arg1, arg2})
1277	fake.delayScanMutex.Unlock()
1278	if stub != nil {
1279		fake.DelayScanStub(arg1, arg2)
1280	}
1281}
1282
1283func (fake *Model) DelayScanCallCount() int {
1284	fake.delayScanMutex.RLock()
1285	defer fake.delayScanMutex.RUnlock()
1286	return len(fake.delayScanArgsForCall)
1287}
1288
1289func (fake *Model) DelayScanCalls(stub func(string, time.Duration)) {
1290	fake.delayScanMutex.Lock()
1291	defer fake.delayScanMutex.Unlock()
1292	fake.DelayScanStub = stub
1293}
1294
1295func (fake *Model) DelayScanArgsForCall(i int) (string, time.Duration) {
1296	fake.delayScanMutex.RLock()
1297	defer fake.delayScanMutex.RUnlock()
1298	argsForCall := fake.delayScanArgsForCall[i]
1299	return argsForCall.arg1, argsForCall.arg2
1300}
1301
1302func (fake *Model) DeviceStatistics() (map[protocol.DeviceID]stats.DeviceStatistics, error) {
1303	fake.deviceStatisticsMutex.Lock()
1304	ret, specificReturn := fake.deviceStatisticsReturnsOnCall[len(fake.deviceStatisticsArgsForCall)]
1305	fake.deviceStatisticsArgsForCall = append(fake.deviceStatisticsArgsForCall, struct {
1306	}{})
1307	stub := fake.DeviceStatisticsStub
1308	fakeReturns := fake.deviceStatisticsReturns
1309	fake.recordInvocation("DeviceStatistics", []interface{}{})
1310	fake.deviceStatisticsMutex.Unlock()
1311	if stub != nil {
1312		return stub()
1313	}
1314	if specificReturn {
1315		return ret.result1, ret.result2
1316	}
1317	return fakeReturns.result1, fakeReturns.result2
1318}
1319
1320func (fake *Model) DeviceStatisticsCallCount() int {
1321	fake.deviceStatisticsMutex.RLock()
1322	defer fake.deviceStatisticsMutex.RUnlock()
1323	return len(fake.deviceStatisticsArgsForCall)
1324}
1325
1326func (fake *Model) DeviceStatisticsCalls(stub func() (map[protocol.DeviceID]stats.DeviceStatistics, error)) {
1327	fake.deviceStatisticsMutex.Lock()
1328	defer fake.deviceStatisticsMutex.Unlock()
1329	fake.DeviceStatisticsStub = stub
1330}
1331
1332func (fake *Model) DeviceStatisticsReturns(result1 map[protocol.DeviceID]stats.DeviceStatistics, result2 error) {
1333	fake.deviceStatisticsMutex.Lock()
1334	defer fake.deviceStatisticsMutex.Unlock()
1335	fake.DeviceStatisticsStub = nil
1336	fake.deviceStatisticsReturns = struct {
1337		result1 map[protocol.DeviceID]stats.DeviceStatistics
1338		result2 error
1339	}{result1, result2}
1340}
1341
1342func (fake *Model) DeviceStatisticsReturnsOnCall(i int, result1 map[protocol.DeviceID]stats.DeviceStatistics, result2 error) {
1343	fake.deviceStatisticsMutex.Lock()
1344	defer fake.deviceStatisticsMutex.Unlock()
1345	fake.DeviceStatisticsStub = nil
1346	if fake.deviceStatisticsReturnsOnCall == nil {
1347		fake.deviceStatisticsReturnsOnCall = make(map[int]struct {
1348			result1 map[protocol.DeviceID]stats.DeviceStatistics
1349			result2 error
1350		})
1351	}
1352	fake.deviceStatisticsReturnsOnCall[i] = struct {
1353		result1 map[protocol.DeviceID]stats.DeviceStatistics
1354		result2 error
1355	}{result1, result2}
1356}
1357
1358func (fake *Model) DismissPendingDevice(arg1 protocol.DeviceID) error {
1359	fake.dismissPendingDeviceMutex.Lock()
1360	ret, specificReturn := fake.dismissPendingDeviceReturnsOnCall[len(fake.dismissPendingDeviceArgsForCall)]
1361	fake.dismissPendingDeviceArgsForCall = append(fake.dismissPendingDeviceArgsForCall, struct {
1362		arg1 protocol.DeviceID
1363	}{arg1})
1364	stub := fake.DismissPendingDeviceStub
1365	fakeReturns := fake.dismissPendingDeviceReturns
1366	fake.recordInvocation("DismissPendingDevice", []interface{}{arg1})
1367	fake.dismissPendingDeviceMutex.Unlock()
1368	if stub != nil {
1369		return stub(arg1)
1370	}
1371	if specificReturn {
1372		return ret.result1
1373	}
1374	return fakeReturns.result1
1375}
1376
1377func (fake *Model) DismissPendingDeviceCallCount() int {
1378	fake.dismissPendingDeviceMutex.RLock()
1379	defer fake.dismissPendingDeviceMutex.RUnlock()
1380	return len(fake.dismissPendingDeviceArgsForCall)
1381}
1382
1383func (fake *Model) DismissPendingDeviceCalls(stub func(protocol.DeviceID) error) {
1384	fake.dismissPendingDeviceMutex.Lock()
1385	defer fake.dismissPendingDeviceMutex.Unlock()
1386	fake.DismissPendingDeviceStub = stub
1387}
1388
1389func (fake *Model) DismissPendingDeviceArgsForCall(i int) protocol.DeviceID {
1390	fake.dismissPendingDeviceMutex.RLock()
1391	defer fake.dismissPendingDeviceMutex.RUnlock()
1392	argsForCall := fake.dismissPendingDeviceArgsForCall[i]
1393	return argsForCall.arg1
1394}
1395
1396func (fake *Model) DismissPendingDeviceReturns(result1 error) {
1397	fake.dismissPendingDeviceMutex.Lock()
1398	defer fake.dismissPendingDeviceMutex.Unlock()
1399	fake.DismissPendingDeviceStub = nil
1400	fake.dismissPendingDeviceReturns = struct {
1401		result1 error
1402	}{result1}
1403}
1404
1405func (fake *Model) DismissPendingDeviceReturnsOnCall(i int, result1 error) {
1406	fake.dismissPendingDeviceMutex.Lock()
1407	defer fake.dismissPendingDeviceMutex.Unlock()
1408	fake.DismissPendingDeviceStub = nil
1409	if fake.dismissPendingDeviceReturnsOnCall == nil {
1410		fake.dismissPendingDeviceReturnsOnCall = make(map[int]struct {
1411			result1 error
1412		})
1413	}
1414	fake.dismissPendingDeviceReturnsOnCall[i] = struct {
1415		result1 error
1416	}{result1}
1417}
1418
1419func (fake *Model) DismissPendingFolder(arg1 protocol.DeviceID, arg2 string) error {
1420	fake.dismissPendingFolderMutex.Lock()
1421	ret, specificReturn := fake.dismissPendingFolderReturnsOnCall[len(fake.dismissPendingFolderArgsForCall)]
1422	fake.dismissPendingFolderArgsForCall = append(fake.dismissPendingFolderArgsForCall, struct {
1423		arg1 protocol.DeviceID
1424		arg2 string
1425	}{arg1, arg2})
1426	stub := fake.DismissPendingFolderStub
1427	fakeReturns := fake.dismissPendingFolderReturns
1428	fake.recordInvocation("DismissPendingFolder", []interface{}{arg1, arg2})
1429	fake.dismissPendingFolderMutex.Unlock()
1430	if stub != nil {
1431		return stub(arg1, arg2)
1432	}
1433	if specificReturn {
1434		return ret.result1
1435	}
1436	return fakeReturns.result1
1437}
1438
1439func (fake *Model) DismissPendingFolderCallCount() int {
1440	fake.dismissPendingFolderMutex.RLock()
1441	defer fake.dismissPendingFolderMutex.RUnlock()
1442	return len(fake.dismissPendingFolderArgsForCall)
1443}
1444
1445func (fake *Model) DismissPendingFolderCalls(stub func(protocol.DeviceID, string) error) {
1446	fake.dismissPendingFolderMutex.Lock()
1447	defer fake.dismissPendingFolderMutex.Unlock()
1448	fake.DismissPendingFolderStub = stub
1449}
1450
1451func (fake *Model) DismissPendingFolderArgsForCall(i int) (protocol.DeviceID, string) {
1452	fake.dismissPendingFolderMutex.RLock()
1453	defer fake.dismissPendingFolderMutex.RUnlock()
1454	argsForCall := fake.dismissPendingFolderArgsForCall[i]
1455	return argsForCall.arg1, argsForCall.arg2
1456}
1457
1458func (fake *Model) DismissPendingFolderReturns(result1 error) {
1459	fake.dismissPendingFolderMutex.Lock()
1460	defer fake.dismissPendingFolderMutex.Unlock()
1461	fake.DismissPendingFolderStub = nil
1462	fake.dismissPendingFolderReturns = struct {
1463		result1 error
1464	}{result1}
1465}
1466
1467func (fake *Model) DismissPendingFolderReturnsOnCall(i int, result1 error) {
1468	fake.dismissPendingFolderMutex.Lock()
1469	defer fake.dismissPendingFolderMutex.Unlock()
1470	fake.DismissPendingFolderStub = nil
1471	if fake.dismissPendingFolderReturnsOnCall == nil {
1472		fake.dismissPendingFolderReturnsOnCall = make(map[int]struct {
1473			result1 error
1474		})
1475	}
1476	fake.dismissPendingFolderReturnsOnCall[i] = struct {
1477		result1 error
1478	}{result1}
1479}
1480
1481func (fake *Model) DownloadProgress(arg1 protocol.DeviceID, arg2 string, arg3 []protocol.FileDownloadProgressUpdate) error {
1482	var arg3Copy []protocol.FileDownloadProgressUpdate
1483	if arg3 != nil {
1484		arg3Copy = make([]protocol.FileDownloadProgressUpdate, len(arg3))
1485		copy(arg3Copy, arg3)
1486	}
1487	fake.downloadProgressMutex.Lock()
1488	ret, specificReturn := fake.downloadProgressReturnsOnCall[len(fake.downloadProgressArgsForCall)]
1489	fake.downloadProgressArgsForCall = append(fake.downloadProgressArgsForCall, struct {
1490		arg1 protocol.DeviceID
1491		arg2 string
1492		arg3 []protocol.FileDownloadProgressUpdate
1493	}{arg1, arg2, arg3Copy})
1494	stub := fake.DownloadProgressStub
1495	fakeReturns := fake.downloadProgressReturns
1496	fake.recordInvocation("DownloadProgress", []interface{}{arg1, arg2, arg3Copy})
1497	fake.downloadProgressMutex.Unlock()
1498	if stub != nil {
1499		return stub(arg1, arg2, arg3)
1500	}
1501	if specificReturn {
1502		return ret.result1
1503	}
1504	return fakeReturns.result1
1505}
1506
1507func (fake *Model) DownloadProgressCallCount() int {
1508	fake.downloadProgressMutex.RLock()
1509	defer fake.downloadProgressMutex.RUnlock()
1510	return len(fake.downloadProgressArgsForCall)
1511}
1512
1513func (fake *Model) DownloadProgressCalls(stub func(protocol.DeviceID, string, []protocol.FileDownloadProgressUpdate) error) {
1514	fake.downloadProgressMutex.Lock()
1515	defer fake.downloadProgressMutex.Unlock()
1516	fake.DownloadProgressStub = stub
1517}
1518
1519func (fake *Model) DownloadProgressArgsForCall(i int) (protocol.DeviceID, string, []protocol.FileDownloadProgressUpdate) {
1520	fake.downloadProgressMutex.RLock()
1521	defer fake.downloadProgressMutex.RUnlock()
1522	argsForCall := fake.downloadProgressArgsForCall[i]
1523	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
1524}
1525
1526func (fake *Model) DownloadProgressReturns(result1 error) {
1527	fake.downloadProgressMutex.Lock()
1528	defer fake.downloadProgressMutex.Unlock()
1529	fake.DownloadProgressStub = nil
1530	fake.downloadProgressReturns = struct {
1531		result1 error
1532	}{result1}
1533}
1534
1535func (fake *Model) DownloadProgressReturnsOnCall(i int, result1 error) {
1536	fake.downloadProgressMutex.Lock()
1537	defer fake.downloadProgressMutex.Unlock()
1538	fake.DownloadProgressStub = nil
1539	if fake.downloadProgressReturnsOnCall == nil {
1540		fake.downloadProgressReturnsOnCall = make(map[int]struct {
1541			result1 error
1542		})
1543	}
1544	fake.downloadProgressReturnsOnCall[i] = struct {
1545		result1 error
1546	}{result1}
1547}
1548
1549func (fake *Model) FolderErrors(arg1 string) ([]model.FileError, error) {
1550	fake.folderErrorsMutex.Lock()
1551	ret, specificReturn := fake.folderErrorsReturnsOnCall[len(fake.folderErrorsArgsForCall)]
1552	fake.folderErrorsArgsForCall = append(fake.folderErrorsArgsForCall, struct {
1553		arg1 string
1554	}{arg1})
1555	stub := fake.FolderErrorsStub
1556	fakeReturns := fake.folderErrorsReturns
1557	fake.recordInvocation("FolderErrors", []interface{}{arg1})
1558	fake.folderErrorsMutex.Unlock()
1559	if stub != nil {
1560		return stub(arg1)
1561	}
1562	if specificReturn {
1563		return ret.result1, ret.result2
1564	}
1565	return fakeReturns.result1, fakeReturns.result2
1566}
1567
1568func (fake *Model) FolderErrorsCallCount() int {
1569	fake.folderErrorsMutex.RLock()
1570	defer fake.folderErrorsMutex.RUnlock()
1571	return len(fake.folderErrorsArgsForCall)
1572}
1573
1574func (fake *Model) FolderErrorsCalls(stub func(string) ([]model.FileError, error)) {
1575	fake.folderErrorsMutex.Lock()
1576	defer fake.folderErrorsMutex.Unlock()
1577	fake.FolderErrorsStub = stub
1578}
1579
1580func (fake *Model) FolderErrorsArgsForCall(i int) string {
1581	fake.folderErrorsMutex.RLock()
1582	defer fake.folderErrorsMutex.RUnlock()
1583	argsForCall := fake.folderErrorsArgsForCall[i]
1584	return argsForCall.arg1
1585}
1586
1587func (fake *Model) FolderErrorsReturns(result1 []model.FileError, result2 error) {
1588	fake.folderErrorsMutex.Lock()
1589	defer fake.folderErrorsMutex.Unlock()
1590	fake.FolderErrorsStub = nil
1591	fake.folderErrorsReturns = struct {
1592		result1 []model.FileError
1593		result2 error
1594	}{result1, result2}
1595}
1596
1597func (fake *Model) FolderErrorsReturnsOnCall(i int, result1 []model.FileError, result2 error) {
1598	fake.folderErrorsMutex.Lock()
1599	defer fake.folderErrorsMutex.Unlock()
1600	fake.FolderErrorsStub = nil
1601	if fake.folderErrorsReturnsOnCall == nil {
1602		fake.folderErrorsReturnsOnCall = make(map[int]struct {
1603			result1 []model.FileError
1604			result2 error
1605		})
1606	}
1607	fake.folderErrorsReturnsOnCall[i] = struct {
1608		result1 []model.FileError
1609		result2 error
1610	}{result1, result2}
1611}
1612
1613func (fake *Model) FolderProgressBytesCompleted(arg1 string) int64 {
1614	fake.folderProgressBytesCompletedMutex.Lock()
1615	ret, specificReturn := fake.folderProgressBytesCompletedReturnsOnCall[len(fake.folderProgressBytesCompletedArgsForCall)]
1616	fake.folderProgressBytesCompletedArgsForCall = append(fake.folderProgressBytesCompletedArgsForCall, struct {
1617		arg1 string
1618	}{arg1})
1619	stub := fake.FolderProgressBytesCompletedStub
1620	fakeReturns := fake.folderProgressBytesCompletedReturns
1621	fake.recordInvocation("FolderProgressBytesCompleted", []interface{}{arg1})
1622	fake.folderProgressBytesCompletedMutex.Unlock()
1623	if stub != nil {
1624		return stub(arg1)
1625	}
1626	if specificReturn {
1627		return ret.result1
1628	}
1629	return fakeReturns.result1
1630}
1631
1632func (fake *Model) FolderProgressBytesCompletedCallCount() int {
1633	fake.folderProgressBytesCompletedMutex.RLock()
1634	defer fake.folderProgressBytesCompletedMutex.RUnlock()
1635	return len(fake.folderProgressBytesCompletedArgsForCall)
1636}
1637
1638func (fake *Model) FolderProgressBytesCompletedCalls(stub func(string) int64) {
1639	fake.folderProgressBytesCompletedMutex.Lock()
1640	defer fake.folderProgressBytesCompletedMutex.Unlock()
1641	fake.FolderProgressBytesCompletedStub = stub
1642}
1643
1644func (fake *Model) FolderProgressBytesCompletedArgsForCall(i int) string {
1645	fake.folderProgressBytesCompletedMutex.RLock()
1646	defer fake.folderProgressBytesCompletedMutex.RUnlock()
1647	argsForCall := fake.folderProgressBytesCompletedArgsForCall[i]
1648	return argsForCall.arg1
1649}
1650
1651func (fake *Model) FolderProgressBytesCompletedReturns(result1 int64) {
1652	fake.folderProgressBytesCompletedMutex.Lock()
1653	defer fake.folderProgressBytesCompletedMutex.Unlock()
1654	fake.FolderProgressBytesCompletedStub = nil
1655	fake.folderProgressBytesCompletedReturns = struct {
1656		result1 int64
1657	}{result1}
1658}
1659
1660func (fake *Model) FolderProgressBytesCompletedReturnsOnCall(i int, result1 int64) {
1661	fake.folderProgressBytesCompletedMutex.Lock()
1662	defer fake.folderProgressBytesCompletedMutex.Unlock()
1663	fake.FolderProgressBytesCompletedStub = nil
1664	if fake.folderProgressBytesCompletedReturnsOnCall == nil {
1665		fake.folderProgressBytesCompletedReturnsOnCall = make(map[int]struct {
1666			result1 int64
1667		})
1668	}
1669	fake.folderProgressBytesCompletedReturnsOnCall[i] = struct {
1670		result1 int64
1671	}{result1}
1672}
1673
1674func (fake *Model) FolderStatistics() (map[string]stats.FolderStatistics, error) {
1675	fake.folderStatisticsMutex.Lock()
1676	ret, specificReturn := fake.folderStatisticsReturnsOnCall[len(fake.folderStatisticsArgsForCall)]
1677	fake.folderStatisticsArgsForCall = append(fake.folderStatisticsArgsForCall, struct {
1678	}{})
1679	stub := fake.FolderStatisticsStub
1680	fakeReturns := fake.folderStatisticsReturns
1681	fake.recordInvocation("FolderStatistics", []interface{}{})
1682	fake.folderStatisticsMutex.Unlock()
1683	if stub != nil {
1684		return stub()
1685	}
1686	if specificReturn {
1687		return ret.result1, ret.result2
1688	}
1689	return fakeReturns.result1, fakeReturns.result2
1690}
1691
1692func (fake *Model) FolderStatisticsCallCount() int {
1693	fake.folderStatisticsMutex.RLock()
1694	defer fake.folderStatisticsMutex.RUnlock()
1695	return len(fake.folderStatisticsArgsForCall)
1696}
1697
1698func (fake *Model) FolderStatisticsCalls(stub func() (map[string]stats.FolderStatistics, error)) {
1699	fake.folderStatisticsMutex.Lock()
1700	defer fake.folderStatisticsMutex.Unlock()
1701	fake.FolderStatisticsStub = stub
1702}
1703
1704func (fake *Model) FolderStatisticsReturns(result1 map[string]stats.FolderStatistics, result2 error) {
1705	fake.folderStatisticsMutex.Lock()
1706	defer fake.folderStatisticsMutex.Unlock()
1707	fake.FolderStatisticsStub = nil
1708	fake.folderStatisticsReturns = struct {
1709		result1 map[string]stats.FolderStatistics
1710		result2 error
1711	}{result1, result2}
1712}
1713
1714func (fake *Model) FolderStatisticsReturnsOnCall(i int, result1 map[string]stats.FolderStatistics, result2 error) {
1715	fake.folderStatisticsMutex.Lock()
1716	defer fake.folderStatisticsMutex.Unlock()
1717	fake.FolderStatisticsStub = nil
1718	if fake.folderStatisticsReturnsOnCall == nil {
1719		fake.folderStatisticsReturnsOnCall = make(map[int]struct {
1720			result1 map[string]stats.FolderStatistics
1721			result2 error
1722		})
1723	}
1724	fake.folderStatisticsReturnsOnCall[i] = struct {
1725		result1 map[string]stats.FolderStatistics
1726		result2 error
1727	}{result1, result2}
1728}
1729
1730func (fake *Model) GetFolderVersions(arg1 string) (map[string][]versioner.FileVersion, error) {
1731	fake.getFolderVersionsMutex.Lock()
1732	ret, specificReturn := fake.getFolderVersionsReturnsOnCall[len(fake.getFolderVersionsArgsForCall)]
1733	fake.getFolderVersionsArgsForCall = append(fake.getFolderVersionsArgsForCall, struct {
1734		arg1 string
1735	}{arg1})
1736	stub := fake.GetFolderVersionsStub
1737	fakeReturns := fake.getFolderVersionsReturns
1738	fake.recordInvocation("GetFolderVersions", []interface{}{arg1})
1739	fake.getFolderVersionsMutex.Unlock()
1740	if stub != nil {
1741		return stub(arg1)
1742	}
1743	if specificReturn {
1744		return ret.result1, ret.result2
1745	}
1746	return fakeReturns.result1, fakeReturns.result2
1747}
1748
1749func (fake *Model) GetFolderVersionsCallCount() int {
1750	fake.getFolderVersionsMutex.RLock()
1751	defer fake.getFolderVersionsMutex.RUnlock()
1752	return len(fake.getFolderVersionsArgsForCall)
1753}
1754
1755func (fake *Model) GetFolderVersionsCalls(stub func(string) (map[string][]versioner.FileVersion, error)) {
1756	fake.getFolderVersionsMutex.Lock()
1757	defer fake.getFolderVersionsMutex.Unlock()
1758	fake.GetFolderVersionsStub = stub
1759}
1760
1761func (fake *Model) GetFolderVersionsArgsForCall(i int) string {
1762	fake.getFolderVersionsMutex.RLock()
1763	defer fake.getFolderVersionsMutex.RUnlock()
1764	argsForCall := fake.getFolderVersionsArgsForCall[i]
1765	return argsForCall.arg1
1766}
1767
1768func (fake *Model) GetFolderVersionsReturns(result1 map[string][]versioner.FileVersion, result2 error) {
1769	fake.getFolderVersionsMutex.Lock()
1770	defer fake.getFolderVersionsMutex.Unlock()
1771	fake.GetFolderVersionsStub = nil
1772	fake.getFolderVersionsReturns = struct {
1773		result1 map[string][]versioner.FileVersion
1774		result2 error
1775	}{result1, result2}
1776}
1777
1778func (fake *Model) GetFolderVersionsReturnsOnCall(i int, result1 map[string][]versioner.FileVersion, result2 error) {
1779	fake.getFolderVersionsMutex.Lock()
1780	defer fake.getFolderVersionsMutex.Unlock()
1781	fake.GetFolderVersionsStub = nil
1782	if fake.getFolderVersionsReturnsOnCall == nil {
1783		fake.getFolderVersionsReturnsOnCall = make(map[int]struct {
1784			result1 map[string][]versioner.FileVersion
1785			result2 error
1786		})
1787	}
1788	fake.getFolderVersionsReturnsOnCall[i] = struct {
1789		result1 map[string][]versioner.FileVersion
1790		result2 error
1791	}{result1, result2}
1792}
1793
1794func (fake *Model) GetHello(arg1 protocol.DeviceID) protocol.HelloIntf {
1795	fake.getHelloMutex.Lock()
1796	ret, specificReturn := fake.getHelloReturnsOnCall[len(fake.getHelloArgsForCall)]
1797	fake.getHelloArgsForCall = append(fake.getHelloArgsForCall, struct {
1798		arg1 protocol.DeviceID
1799	}{arg1})
1800	stub := fake.GetHelloStub
1801	fakeReturns := fake.getHelloReturns
1802	fake.recordInvocation("GetHello", []interface{}{arg1})
1803	fake.getHelloMutex.Unlock()
1804	if stub != nil {
1805		return stub(arg1)
1806	}
1807	if specificReturn {
1808		return ret.result1
1809	}
1810	return fakeReturns.result1
1811}
1812
1813func (fake *Model) GetHelloCallCount() int {
1814	fake.getHelloMutex.RLock()
1815	defer fake.getHelloMutex.RUnlock()
1816	return len(fake.getHelloArgsForCall)
1817}
1818
1819func (fake *Model) GetHelloCalls(stub func(protocol.DeviceID) protocol.HelloIntf) {
1820	fake.getHelloMutex.Lock()
1821	defer fake.getHelloMutex.Unlock()
1822	fake.GetHelloStub = stub
1823}
1824
1825func (fake *Model) GetHelloArgsForCall(i int) protocol.DeviceID {
1826	fake.getHelloMutex.RLock()
1827	defer fake.getHelloMutex.RUnlock()
1828	argsForCall := fake.getHelloArgsForCall[i]
1829	return argsForCall.arg1
1830}
1831
1832func (fake *Model) GetHelloReturns(result1 protocol.HelloIntf) {
1833	fake.getHelloMutex.Lock()
1834	defer fake.getHelloMutex.Unlock()
1835	fake.GetHelloStub = nil
1836	fake.getHelloReturns = struct {
1837		result1 protocol.HelloIntf
1838	}{result1}
1839}
1840
1841func (fake *Model) GetHelloReturnsOnCall(i int, result1 protocol.HelloIntf) {
1842	fake.getHelloMutex.Lock()
1843	defer fake.getHelloMutex.Unlock()
1844	fake.GetHelloStub = nil
1845	if fake.getHelloReturnsOnCall == nil {
1846		fake.getHelloReturnsOnCall = make(map[int]struct {
1847			result1 protocol.HelloIntf
1848		})
1849	}
1850	fake.getHelloReturnsOnCall[i] = struct {
1851		result1 protocol.HelloIntf
1852	}{result1}
1853}
1854
1855func (fake *Model) GetMtimeMapping(arg1 string, arg2 string) (fs.MtimeMapping, error) {
1856	fake.getMtimeMappingMutex.Lock()
1857	ret, specificReturn := fake.getMtimeMappingReturnsOnCall[len(fake.getMtimeMappingArgsForCall)]
1858	fake.getMtimeMappingArgsForCall = append(fake.getMtimeMappingArgsForCall, struct {
1859		arg1 string
1860		arg2 string
1861	}{arg1, arg2})
1862	stub := fake.GetMtimeMappingStub
1863	fakeReturns := fake.getMtimeMappingReturns
1864	fake.recordInvocation("GetMtimeMapping", []interface{}{arg1, arg2})
1865	fake.getMtimeMappingMutex.Unlock()
1866	if stub != nil {
1867		return stub(arg1, arg2)
1868	}
1869	if specificReturn {
1870		return ret.result1, ret.result2
1871	}
1872	return fakeReturns.result1, fakeReturns.result2
1873}
1874
1875func (fake *Model) GetMtimeMappingCallCount() int {
1876	fake.getMtimeMappingMutex.RLock()
1877	defer fake.getMtimeMappingMutex.RUnlock()
1878	return len(fake.getMtimeMappingArgsForCall)
1879}
1880
1881func (fake *Model) GetMtimeMappingCalls(stub func(string, string) (fs.MtimeMapping, error)) {
1882	fake.getMtimeMappingMutex.Lock()
1883	defer fake.getMtimeMappingMutex.Unlock()
1884	fake.GetMtimeMappingStub = stub
1885}
1886
1887func (fake *Model) GetMtimeMappingArgsForCall(i int) (string, string) {
1888	fake.getMtimeMappingMutex.RLock()
1889	defer fake.getMtimeMappingMutex.RUnlock()
1890	argsForCall := fake.getMtimeMappingArgsForCall[i]
1891	return argsForCall.arg1, argsForCall.arg2
1892}
1893
1894func (fake *Model) GetMtimeMappingReturns(result1 fs.MtimeMapping, result2 error) {
1895	fake.getMtimeMappingMutex.Lock()
1896	defer fake.getMtimeMappingMutex.Unlock()
1897	fake.GetMtimeMappingStub = nil
1898	fake.getMtimeMappingReturns = struct {
1899		result1 fs.MtimeMapping
1900		result2 error
1901	}{result1, result2}
1902}
1903
1904func (fake *Model) GetMtimeMappingReturnsOnCall(i int, result1 fs.MtimeMapping, result2 error) {
1905	fake.getMtimeMappingMutex.Lock()
1906	defer fake.getMtimeMappingMutex.Unlock()
1907	fake.GetMtimeMappingStub = nil
1908	if fake.getMtimeMappingReturnsOnCall == nil {
1909		fake.getMtimeMappingReturnsOnCall = make(map[int]struct {
1910			result1 fs.MtimeMapping
1911			result2 error
1912		})
1913	}
1914	fake.getMtimeMappingReturnsOnCall[i] = struct {
1915		result1 fs.MtimeMapping
1916		result2 error
1917	}{result1, result2}
1918}
1919
1920func (fake *Model) GlobalDirectoryTree(arg1 string, arg2 string, arg3 int, arg4 bool) ([]*model.TreeEntry, error) {
1921	fake.globalDirectoryTreeMutex.Lock()
1922	ret, specificReturn := fake.globalDirectoryTreeReturnsOnCall[len(fake.globalDirectoryTreeArgsForCall)]
1923	fake.globalDirectoryTreeArgsForCall = append(fake.globalDirectoryTreeArgsForCall, struct {
1924		arg1 string
1925		arg2 string
1926		arg3 int
1927		arg4 bool
1928	}{arg1, arg2, arg3, arg4})
1929	stub := fake.GlobalDirectoryTreeStub
1930	fakeReturns := fake.globalDirectoryTreeReturns
1931	fake.recordInvocation("GlobalDirectoryTree", []interface{}{arg1, arg2, arg3, arg4})
1932	fake.globalDirectoryTreeMutex.Unlock()
1933	if stub != nil {
1934		return stub(arg1, arg2, arg3, arg4)
1935	}
1936	if specificReturn {
1937		return ret.result1, ret.result2
1938	}
1939	return fakeReturns.result1, fakeReturns.result2
1940}
1941
1942func (fake *Model) GlobalDirectoryTreeCallCount() int {
1943	fake.globalDirectoryTreeMutex.RLock()
1944	defer fake.globalDirectoryTreeMutex.RUnlock()
1945	return len(fake.globalDirectoryTreeArgsForCall)
1946}
1947
1948func (fake *Model) GlobalDirectoryTreeCalls(stub func(string, string, int, bool) ([]*model.TreeEntry, error)) {
1949	fake.globalDirectoryTreeMutex.Lock()
1950	defer fake.globalDirectoryTreeMutex.Unlock()
1951	fake.GlobalDirectoryTreeStub = stub
1952}
1953
1954func (fake *Model) GlobalDirectoryTreeArgsForCall(i int) (string, string, int, bool) {
1955	fake.globalDirectoryTreeMutex.RLock()
1956	defer fake.globalDirectoryTreeMutex.RUnlock()
1957	argsForCall := fake.globalDirectoryTreeArgsForCall[i]
1958	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4
1959}
1960
1961func (fake *Model) GlobalDirectoryTreeReturns(result1 []*model.TreeEntry, result2 error) {
1962	fake.globalDirectoryTreeMutex.Lock()
1963	defer fake.globalDirectoryTreeMutex.Unlock()
1964	fake.GlobalDirectoryTreeStub = nil
1965	fake.globalDirectoryTreeReturns = struct {
1966		result1 []*model.TreeEntry
1967		result2 error
1968	}{result1, result2}
1969}
1970
1971func (fake *Model) GlobalDirectoryTreeReturnsOnCall(i int, result1 []*model.TreeEntry, result2 error) {
1972	fake.globalDirectoryTreeMutex.Lock()
1973	defer fake.globalDirectoryTreeMutex.Unlock()
1974	fake.GlobalDirectoryTreeStub = nil
1975	if fake.globalDirectoryTreeReturnsOnCall == nil {
1976		fake.globalDirectoryTreeReturnsOnCall = make(map[int]struct {
1977			result1 []*model.TreeEntry
1978			result2 error
1979		})
1980	}
1981	fake.globalDirectoryTreeReturnsOnCall[i] = struct {
1982		result1 []*model.TreeEntry
1983		result2 error
1984	}{result1, result2}
1985}
1986
1987func (fake *Model) Index(arg1 protocol.DeviceID, arg2 string, arg3 []protocol.FileInfo) error {
1988	var arg3Copy []protocol.FileInfo
1989	if arg3 != nil {
1990		arg3Copy = make([]protocol.FileInfo, len(arg3))
1991		copy(arg3Copy, arg3)
1992	}
1993	fake.indexMutex.Lock()
1994	ret, specificReturn := fake.indexReturnsOnCall[len(fake.indexArgsForCall)]
1995	fake.indexArgsForCall = append(fake.indexArgsForCall, struct {
1996		arg1 protocol.DeviceID
1997		arg2 string
1998		arg3 []protocol.FileInfo
1999	}{arg1, arg2, arg3Copy})
2000	stub := fake.IndexStub
2001	fakeReturns := fake.indexReturns
2002	fake.recordInvocation("Index", []interface{}{arg1, arg2, arg3Copy})
2003	fake.indexMutex.Unlock()
2004	if stub != nil {
2005		return stub(arg1, arg2, arg3)
2006	}
2007	if specificReturn {
2008		return ret.result1
2009	}
2010	return fakeReturns.result1
2011}
2012
2013func (fake *Model) IndexCallCount() int {
2014	fake.indexMutex.RLock()
2015	defer fake.indexMutex.RUnlock()
2016	return len(fake.indexArgsForCall)
2017}
2018
2019func (fake *Model) IndexCalls(stub func(protocol.DeviceID, string, []protocol.FileInfo) error) {
2020	fake.indexMutex.Lock()
2021	defer fake.indexMutex.Unlock()
2022	fake.IndexStub = stub
2023}
2024
2025func (fake *Model) IndexArgsForCall(i int) (protocol.DeviceID, string, []protocol.FileInfo) {
2026	fake.indexMutex.RLock()
2027	defer fake.indexMutex.RUnlock()
2028	argsForCall := fake.indexArgsForCall[i]
2029	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
2030}
2031
2032func (fake *Model) IndexReturns(result1 error) {
2033	fake.indexMutex.Lock()
2034	defer fake.indexMutex.Unlock()
2035	fake.IndexStub = nil
2036	fake.indexReturns = struct {
2037		result1 error
2038	}{result1}
2039}
2040
2041func (fake *Model) IndexReturnsOnCall(i int, result1 error) {
2042	fake.indexMutex.Lock()
2043	defer fake.indexMutex.Unlock()
2044	fake.IndexStub = nil
2045	if fake.indexReturnsOnCall == nil {
2046		fake.indexReturnsOnCall = make(map[int]struct {
2047			result1 error
2048		})
2049	}
2050	fake.indexReturnsOnCall[i] = struct {
2051		result1 error
2052	}{result1}
2053}
2054
2055func (fake *Model) IndexUpdate(arg1 protocol.DeviceID, arg2 string, arg3 []protocol.FileInfo) error {
2056	var arg3Copy []protocol.FileInfo
2057	if arg3 != nil {
2058		arg3Copy = make([]protocol.FileInfo, len(arg3))
2059		copy(arg3Copy, arg3)
2060	}
2061	fake.indexUpdateMutex.Lock()
2062	ret, specificReturn := fake.indexUpdateReturnsOnCall[len(fake.indexUpdateArgsForCall)]
2063	fake.indexUpdateArgsForCall = append(fake.indexUpdateArgsForCall, struct {
2064		arg1 protocol.DeviceID
2065		arg2 string
2066		arg3 []protocol.FileInfo
2067	}{arg1, arg2, arg3Copy})
2068	stub := fake.IndexUpdateStub
2069	fakeReturns := fake.indexUpdateReturns
2070	fake.recordInvocation("IndexUpdate", []interface{}{arg1, arg2, arg3Copy})
2071	fake.indexUpdateMutex.Unlock()
2072	if stub != nil {
2073		return stub(arg1, arg2, arg3)
2074	}
2075	if specificReturn {
2076		return ret.result1
2077	}
2078	return fakeReturns.result1
2079}
2080
2081func (fake *Model) IndexUpdateCallCount() int {
2082	fake.indexUpdateMutex.RLock()
2083	defer fake.indexUpdateMutex.RUnlock()
2084	return len(fake.indexUpdateArgsForCall)
2085}
2086
2087func (fake *Model) IndexUpdateCalls(stub func(protocol.DeviceID, string, []protocol.FileInfo) error) {
2088	fake.indexUpdateMutex.Lock()
2089	defer fake.indexUpdateMutex.Unlock()
2090	fake.IndexUpdateStub = stub
2091}
2092
2093func (fake *Model) IndexUpdateArgsForCall(i int) (protocol.DeviceID, string, []protocol.FileInfo) {
2094	fake.indexUpdateMutex.RLock()
2095	defer fake.indexUpdateMutex.RUnlock()
2096	argsForCall := fake.indexUpdateArgsForCall[i]
2097	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
2098}
2099
2100func (fake *Model) IndexUpdateReturns(result1 error) {
2101	fake.indexUpdateMutex.Lock()
2102	defer fake.indexUpdateMutex.Unlock()
2103	fake.IndexUpdateStub = nil
2104	fake.indexUpdateReturns = struct {
2105		result1 error
2106	}{result1}
2107}
2108
2109func (fake *Model) IndexUpdateReturnsOnCall(i int, result1 error) {
2110	fake.indexUpdateMutex.Lock()
2111	defer fake.indexUpdateMutex.Unlock()
2112	fake.IndexUpdateStub = nil
2113	if fake.indexUpdateReturnsOnCall == nil {
2114		fake.indexUpdateReturnsOnCall = make(map[int]struct {
2115			result1 error
2116		})
2117	}
2118	fake.indexUpdateReturnsOnCall[i] = struct {
2119		result1 error
2120	}{result1}
2121}
2122
2123func (fake *Model) LoadIgnores(arg1 string) ([]string, []string, error) {
2124	fake.loadIgnoresMutex.Lock()
2125	ret, specificReturn := fake.loadIgnoresReturnsOnCall[len(fake.loadIgnoresArgsForCall)]
2126	fake.loadIgnoresArgsForCall = append(fake.loadIgnoresArgsForCall, struct {
2127		arg1 string
2128	}{arg1})
2129	stub := fake.LoadIgnoresStub
2130	fakeReturns := fake.loadIgnoresReturns
2131	fake.recordInvocation("LoadIgnores", []interface{}{arg1})
2132	fake.loadIgnoresMutex.Unlock()
2133	if stub != nil {
2134		return stub(arg1)
2135	}
2136	if specificReturn {
2137		return ret.result1, ret.result2, ret.result3
2138	}
2139	return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3
2140}
2141
2142func (fake *Model) LoadIgnoresCallCount() int {
2143	fake.loadIgnoresMutex.RLock()
2144	defer fake.loadIgnoresMutex.RUnlock()
2145	return len(fake.loadIgnoresArgsForCall)
2146}
2147
2148func (fake *Model) LoadIgnoresCalls(stub func(string) ([]string, []string, error)) {
2149	fake.loadIgnoresMutex.Lock()
2150	defer fake.loadIgnoresMutex.Unlock()
2151	fake.LoadIgnoresStub = stub
2152}
2153
2154func (fake *Model) LoadIgnoresArgsForCall(i int) string {
2155	fake.loadIgnoresMutex.RLock()
2156	defer fake.loadIgnoresMutex.RUnlock()
2157	argsForCall := fake.loadIgnoresArgsForCall[i]
2158	return argsForCall.arg1
2159}
2160
2161func (fake *Model) LoadIgnoresReturns(result1 []string, result2 []string, result3 error) {
2162	fake.loadIgnoresMutex.Lock()
2163	defer fake.loadIgnoresMutex.Unlock()
2164	fake.LoadIgnoresStub = nil
2165	fake.loadIgnoresReturns = struct {
2166		result1 []string
2167		result2 []string
2168		result3 error
2169	}{result1, result2, result3}
2170}
2171
2172func (fake *Model) LoadIgnoresReturnsOnCall(i int, result1 []string, result2 []string, result3 error) {
2173	fake.loadIgnoresMutex.Lock()
2174	defer fake.loadIgnoresMutex.Unlock()
2175	fake.LoadIgnoresStub = nil
2176	if fake.loadIgnoresReturnsOnCall == nil {
2177		fake.loadIgnoresReturnsOnCall = make(map[int]struct {
2178			result1 []string
2179			result2 []string
2180			result3 error
2181		})
2182	}
2183	fake.loadIgnoresReturnsOnCall[i] = struct {
2184		result1 []string
2185		result2 []string
2186		result3 error
2187	}{result1, result2, result3}
2188}
2189
2190func (fake *Model) LocalChangedFolderFiles(arg1 string, arg2 int, arg3 int) ([]db.FileInfoTruncated, error) {
2191	fake.localChangedFolderFilesMutex.Lock()
2192	ret, specificReturn := fake.localChangedFolderFilesReturnsOnCall[len(fake.localChangedFolderFilesArgsForCall)]
2193	fake.localChangedFolderFilesArgsForCall = append(fake.localChangedFolderFilesArgsForCall, struct {
2194		arg1 string
2195		arg2 int
2196		arg3 int
2197	}{arg1, arg2, arg3})
2198	stub := fake.LocalChangedFolderFilesStub
2199	fakeReturns := fake.localChangedFolderFilesReturns
2200	fake.recordInvocation("LocalChangedFolderFiles", []interface{}{arg1, arg2, arg3})
2201	fake.localChangedFolderFilesMutex.Unlock()
2202	if stub != nil {
2203		return stub(arg1, arg2, arg3)
2204	}
2205	if specificReturn {
2206		return ret.result1, ret.result2
2207	}
2208	return fakeReturns.result1, fakeReturns.result2
2209}
2210
2211func (fake *Model) LocalChangedFolderFilesCallCount() int {
2212	fake.localChangedFolderFilesMutex.RLock()
2213	defer fake.localChangedFolderFilesMutex.RUnlock()
2214	return len(fake.localChangedFolderFilesArgsForCall)
2215}
2216
2217func (fake *Model) LocalChangedFolderFilesCalls(stub func(string, int, int) ([]db.FileInfoTruncated, error)) {
2218	fake.localChangedFolderFilesMutex.Lock()
2219	defer fake.localChangedFolderFilesMutex.Unlock()
2220	fake.LocalChangedFolderFilesStub = stub
2221}
2222
2223func (fake *Model) LocalChangedFolderFilesArgsForCall(i int) (string, int, int) {
2224	fake.localChangedFolderFilesMutex.RLock()
2225	defer fake.localChangedFolderFilesMutex.RUnlock()
2226	argsForCall := fake.localChangedFolderFilesArgsForCall[i]
2227	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
2228}
2229
2230func (fake *Model) LocalChangedFolderFilesReturns(result1 []db.FileInfoTruncated, result2 error) {
2231	fake.localChangedFolderFilesMutex.Lock()
2232	defer fake.localChangedFolderFilesMutex.Unlock()
2233	fake.LocalChangedFolderFilesStub = nil
2234	fake.localChangedFolderFilesReturns = struct {
2235		result1 []db.FileInfoTruncated
2236		result2 error
2237	}{result1, result2}
2238}
2239
2240func (fake *Model) LocalChangedFolderFilesReturnsOnCall(i int, result1 []db.FileInfoTruncated, result2 error) {
2241	fake.localChangedFolderFilesMutex.Lock()
2242	defer fake.localChangedFolderFilesMutex.Unlock()
2243	fake.LocalChangedFolderFilesStub = nil
2244	if fake.localChangedFolderFilesReturnsOnCall == nil {
2245		fake.localChangedFolderFilesReturnsOnCall = make(map[int]struct {
2246			result1 []db.FileInfoTruncated
2247			result2 error
2248		})
2249	}
2250	fake.localChangedFolderFilesReturnsOnCall[i] = struct {
2251		result1 []db.FileInfoTruncated
2252		result2 error
2253	}{result1, result2}
2254}
2255
2256func (fake *Model) NeedFolderFiles(arg1 string, arg2 int, arg3 int) ([]db.FileInfoTruncated, []db.FileInfoTruncated, []db.FileInfoTruncated, error) {
2257	fake.needFolderFilesMutex.Lock()
2258	ret, specificReturn := fake.needFolderFilesReturnsOnCall[len(fake.needFolderFilesArgsForCall)]
2259	fake.needFolderFilesArgsForCall = append(fake.needFolderFilesArgsForCall, struct {
2260		arg1 string
2261		arg2 int
2262		arg3 int
2263	}{arg1, arg2, arg3})
2264	stub := fake.NeedFolderFilesStub
2265	fakeReturns := fake.needFolderFilesReturns
2266	fake.recordInvocation("NeedFolderFiles", []interface{}{arg1, arg2, arg3})
2267	fake.needFolderFilesMutex.Unlock()
2268	if stub != nil {
2269		return stub(arg1, arg2, arg3)
2270	}
2271	if specificReturn {
2272		return ret.result1, ret.result2, ret.result3, ret.result4
2273	}
2274	return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3, fakeReturns.result4
2275}
2276
2277func (fake *Model) NeedFolderFilesCallCount() int {
2278	fake.needFolderFilesMutex.RLock()
2279	defer fake.needFolderFilesMutex.RUnlock()
2280	return len(fake.needFolderFilesArgsForCall)
2281}
2282
2283func (fake *Model) NeedFolderFilesCalls(stub func(string, int, int) ([]db.FileInfoTruncated, []db.FileInfoTruncated, []db.FileInfoTruncated, error)) {
2284	fake.needFolderFilesMutex.Lock()
2285	defer fake.needFolderFilesMutex.Unlock()
2286	fake.NeedFolderFilesStub = stub
2287}
2288
2289func (fake *Model) NeedFolderFilesArgsForCall(i int) (string, int, int) {
2290	fake.needFolderFilesMutex.RLock()
2291	defer fake.needFolderFilesMutex.RUnlock()
2292	argsForCall := fake.needFolderFilesArgsForCall[i]
2293	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
2294}
2295
2296func (fake *Model) NeedFolderFilesReturns(result1 []db.FileInfoTruncated, result2 []db.FileInfoTruncated, result3 []db.FileInfoTruncated, result4 error) {
2297	fake.needFolderFilesMutex.Lock()
2298	defer fake.needFolderFilesMutex.Unlock()
2299	fake.NeedFolderFilesStub = nil
2300	fake.needFolderFilesReturns = struct {
2301		result1 []db.FileInfoTruncated
2302		result2 []db.FileInfoTruncated
2303		result3 []db.FileInfoTruncated
2304		result4 error
2305	}{result1, result2, result3, result4}
2306}
2307
2308func (fake *Model) NeedFolderFilesReturnsOnCall(i int, result1 []db.FileInfoTruncated, result2 []db.FileInfoTruncated, result3 []db.FileInfoTruncated, result4 error) {
2309	fake.needFolderFilesMutex.Lock()
2310	defer fake.needFolderFilesMutex.Unlock()
2311	fake.NeedFolderFilesStub = nil
2312	if fake.needFolderFilesReturnsOnCall == nil {
2313		fake.needFolderFilesReturnsOnCall = make(map[int]struct {
2314			result1 []db.FileInfoTruncated
2315			result2 []db.FileInfoTruncated
2316			result3 []db.FileInfoTruncated
2317			result4 error
2318		})
2319	}
2320	fake.needFolderFilesReturnsOnCall[i] = struct {
2321		result1 []db.FileInfoTruncated
2322		result2 []db.FileInfoTruncated
2323		result3 []db.FileInfoTruncated
2324		result4 error
2325	}{result1, result2, result3, result4}
2326}
2327
2328func (fake *Model) NumConnections() int {
2329	fake.numConnectionsMutex.Lock()
2330	ret, specificReturn := fake.numConnectionsReturnsOnCall[len(fake.numConnectionsArgsForCall)]
2331	fake.numConnectionsArgsForCall = append(fake.numConnectionsArgsForCall, struct {
2332	}{})
2333	stub := fake.NumConnectionsStub
2334	fakeReturns := fake.numConnectionsReturns
2335	fake.recordInvocation("NumConnections", []interface{}{})
2336	fake.numConnectionsMutex.Unlock()
2337	if stub != nil {
2338		return stub()
2339	}
2340	if specificReturn {
2341		return ret.result1
2342	}
2343	return fakeReturns.result1
2344}
2345
2346func (fake *Model) NumConnectionsCallCount() int {
2347	fake.numConnectionsMutex.RLock()
2348	defer fake.numConnectionsMutex.RUnlock()
2349	return len(fake.numConnectionsArgsForCall)
2350}
2351
2352func (fake *Model) NumConnectionsCalls(stub func() int) {
2353	fake.numConnectionsMutex.Lock()
2354	defer fake.numConnectionsMutex.Unlock()
2355	fake.NumConnectionsStub = stub
2356}
2357
2358func (fake *Model) NumConnectionsReturns(result1 int) {
2359	fake.numConnectionsMutex.Lock()
2360	defer fake.numConnectionsMutex.Unlock()
2361	fake.NumConnectionsStub = nil
2362	fake.numConnectionsReturns = struct {
2363		result1 int
2364	}{result1}
2365}
2366
2367func (fake *Model) NumConnectionsReturnsOnCall(i int, result1 int) {
2368	fake.numConnectionsMutex.Lock()
2369	defer fake.numConnectionsMutex.Unlock()
2370	fake.NumConnectionsStub = nil
2371	if fake.numConnectionsReturnsOnCall == nil {
2372		fake.numConnectionsReturnsOnCall = make(map[int]struct {
2373			result1 int
2374		})
2375	}
2376	fake.numConnectionsReturnsOnCall[i] = struct {
2377		result1 int
2378	}{result1}
2379}
2380
2381func (fake *Model) OnHello(arg1 protocol.DeviceID, arg2 net.Addr, arg3 protocol.Hello) error {
2382	fake.onHelloMutex.Lock()
2383	ret, specificReturn := fake.onHelloReturnsOnCall[len(fake.onHelloArgsForCall)]
2384	fake.onHelloArgsForCall = append(fake.onHelloArgsForCall, struct {
2385		arg1 protocol.DeviceID
2386		arg2 net.Addr
2387		arg3 protocol.Hello
2388	}{arg1, arg2, arg3})
2389	stub := fake.OnHelloStub
2390	fakeReturns := fake.onHelloReturns
2391	fake.recordInvocation("OnHello", []interface{}{arg1, arg2, arg3})
2392	fake.onHelloMutex.Unlock()
2393	if stub != nil {
2394		return stub(arg1, arg2, arg3)
2395	}
2396	if specificReturn {
2397		return ret.result1
2398	}
2399	return fakeReturns.result1
2400}
2401
2402func (fake *Model) OnHelloCallCount() int {
2403	fake.onHelloMutex.RLock()
2404	defer fake.onHelloMutex.RUnlock()
2405	return len(fake.onHelloArgsForCall)
2406}
2407
2408func (fake *Model) OnHelloCalls(stub func(protocol.DeviceID, net.Addr, protocol.Hello) error) {
2409	fake.onHelloMutex.Lock()
2410	defer fake.onHelloMutex.Unlock()
2411	fake.OnHelloStub = stub
2412}
2413
2414func (fake *Model) OnHelloArgsForCall(i int) (protocol.DeviceID, net.Addr, protocol.Hello) {
2415	fake.onHelloMutex.RLock()
2416	defer fake.onHelloMutex.RUnlock()
2417	argsForCall := fake.onHelloArgsForCall[i]
2418	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
2419}
2420
2421func (fake *Model) OnHelloReturns(result1 error) {
2422	fake.onHelloMutex.Lock()
2423	defer fake.onHelloMutex.Unlock()
2424	fake.OnHelloStub = nil
2425	fake.onHelloReturns = struct {
2426		result1 error
2427	}{result1}
2428}
2429
2430func (fake *Model) OnHelloReturnsOnCall(i int, result1 error) {
2431	fake.onHelloMutex.Lock()
2432	defer fake.onHelloMutex.Unlock()
2433	fake.OnHelloStub = nil
2434	if fake.onHelloReturnsOnCall == nil {
2435		fake.onHelloReturnsOnCall = make(map[int]struct {
2436			result1 error
2437		})
2438	}
2439	fake.onHelloReturnsOnCall[i] = struct {
2440		result1 error
2441	}{result1}
2442}
2443
2444func (fake *Model) Override(arg1 string) {
2445	fake.overrideMutex.Lock()
2446	fake.overrideArgsForCall = append(fake.overrideArgsForCall, struct {
2447		arg1 string
2448	}{arg1})
2449	stub := fake.OverrideStub
2450	fake.recordInvocation("Override", []interface{}{arg1})
2451	fake.overrideMutex.Unlock()
2452	if stub != nil {
2453		fake.OverrideStub(arg1)
2454	}
2455}
2456
2457func (fake *Model) OverrideCallCount() int {
2458	fake.overrideMutex.RLock()
2459	defer fake.overrideMutex.RUnlock()
2460	return len(fake.overrideArgsForCall)
2461}
2462
2463func (fake *Model) OverrideCalls(stub func(string)) {
2464	fake.overrideMutex.Lock()
2465	defer fake.overrideMutex.Unlock()
2466	fake.OverrideStub = stub
2467}
2468
2469func (fake *Model) OverrideArgsForCall(i int) string {
2470	fake.overrideMutex.RLock()
2471	defer fake.overrideMutex.RUnlock()
2472	argsForCall := fake.overrideArgsForCall[i]
2473	return argsForCall.arg1
2474}
2475
2476func (fake *Model) PendingDevices() (map[protocol.DeviceID]db.ObservedDevice, error) {
2477	fake.pendingDevicesMutex.Lock()
2478	ret, specificReturn := fake.pendingDevicesReturnsOnCall[len(fake.pendingDevicesArgsForCall)]
2479	fake.pendingDevicesArgsForCall = append(fake.pendingDevicesArgsForCall, struct {
2480	}{})
2481	stub := fake.PendingDevicesStub
2482	fakeReturns := fake.pendingDevicesReturns
2483	fake.recordInvocation("PendingDevices", []interface{}{})
2484	fake.pendingDevicesMutex.Unlock()
2485	if stub != nil {
2486		return stub()
2487	}
2488	if specificReturn {
2489		return ret.result1, ret.result2
2490	}
2491	return fakeReturns.result1, fakeReturns.result2
2492}
2493
2494func (fake *Model) PendingDevicesCallCount() int {
2495	fake.pendingDevicesMutex.RLock()
2496	defer fake.pendingDevicesMutex.RUnlock()
2497	return len(fake.pendingDevicesArgsForCall)
2498}
2499
2500func (fake *Model) PendingDevicesCalls(stub func() (map[protocol.DeviceID]db.ObservedDevice, error)) {
2501	fake.pendingDevicesMutex.Lock()
2502	defer fake.pendingDevicesMutex.Unlock()
2503	fake.PendingDevicesStub = stub
2504}
2505
2506func (fake *Model) PendingDevicesReturns(result1 map[protocol.DeviceID]db.ObservedDevice, result2 error) {
2507	fake.pendingDevicesMutex.Lock()
2508	defer fake.pendingDevicesMutex.Unlock()
2509	fake.PendingDevicesStub = nil
2510	fake.pendingDevicesReturns = struct {
2511		result1 map[protocol.DeviceID]db.ObservedDevice
2512		result2 error
2513	}{result1, result2}
2514}
2515
2516func (fake *Model) PendingDevicesReturnsOnCall(i int, result1 map[protocol.DeviceID]db.ObservedDevice, result2 error) {
2517	fake.pendingDevicesMutex.Lock()
2518	defer fake.pendingDevicesMutex.Unlock()
2519	fake.PendingDevicesStub = nil
2520	if fake.pendingDevicesReturnsOnCall == nil {
2521		fake.pendingDevicesReturnsOnCall = make(map[int]struct {
2522			result1 map[protocol.DeviceID]db.ObservedDevice
2523			result2 error
2524		})
2525	}
2526	fake.pendingDevicesReturnsOnCall[i] = struct {
2527		result1 map[protocol.DeviceID]db.ObservedDevice
2528		result2 error
2529	}{result1, result2}
2530}
2531
2532func (fake *Model) PendingFolders(arg1 protocol.DeviceID) (map[string]db.PendingFolder, error) {
2533	fake.pendingFoldersMutex.Lock()
2534	ret, specificReturn := fake.pendingFoldersReturnsOnCall[len(fake.pendingFoldersArgsForCall)]
2535	fake.pendingFoldersArgsForCall = append(fake.pendingFoldersArgsForCall, struct {
2536		arg1 protocol.DeviceID
2537	}{arg1})
2538	stub := fake.PendingFoldersStub
2539	fakeReturns := fake.pendingFoldersReturns
2540	fake.recordInvocation("PendingFolders", []interface{}{arg1})
2541	fake.pendingFoldersMutex.Unlock()
2542	if stub != nil {
2543		return stub(arg1)
2544	}
2545	if specificReturn {
2546		return ret.result1, ret.result2
2547	}
2548	return fakeReturns.result1, fakeReturns.result2
2549}
2550
2551func (fake *Model) PendingFoldersCallCount() int {
2552	fake.pendingFoldersMutex.RLock()
2553	defer fake.pendingFoldersMutex.RUnlock()
2554	return len(fake.pendingFoldersArgsForCall)
2555}
2556
2557func (fake *Model) PendingFoldersCalls(stub func(protocol.DeviceID) (map[string]db.PendingFolder, error)) {
2558	fake.pendingFoldersMutex.Lock()
2559	defer fake.pendingFoldersMutex.Unlock()
2560	fake.PendingFoldersStub = stub
2561}
2562
2563func (fake *Model) PendingFoldersArgsForCall(i int) protocol.DeviceID {
2564	fake.pendingFoldersMutex.RLock()
2565	defer fake.pendingFoldersMutex.RUnlock()
2566	argsForCall := fake.pendingFoldersArgsForCall[i]
2567	return argsForCall.arg1
2568}
2569
2570func (fake *Model) PendingFoldersReturns(result1 map[string]db.PendingFolder, result2 error) {
2571	fake.pendingFoldersMutex.Lock()
2572	defer fake.pendingFoldersMutex.Unlock()
2573	fake.PendingFoldersStub = nil
2574	fake.pendingFoldersReturns = struct {
2575		result1 map[string]db.PendingFolder
2576		result2 error
2577	}{result1, result2}
2578}
2579
2580func (fake *Model) PendingFoldersReturnsOnCall(i int, result1 map[string]db.PendingFolder, result2 error) {
2581	fake.pendingFoldersMutex.Lock()
2582	defer fake.pendingFoldersMutex.Unlock()
2583	fake.PendingFoldersStub = nil
2584	if fake.pendingFoldersReturnsOnCall == nil {
2585		fake.pendingFoldersReturnsOnCall = make(map[int]struct {
2586			result1 map[string]db.PendingFolder
2587			result2 error
2588		})
2589	}
2590	fake.pendingFoldersReturnsOnCall[i] = struct {
2591		result1 map[string]db.PendingFolder
2592		result2 error
2593	}{result1, result2}
2594}
2595
2596func (fake *Model) RemoteNeedFolderFiles(arg1 string, arg2 protocol.DeviceID, arg3 int, arg4 int) ([]db.FileInfoTruncated, error) {
2597	fake.remoteNeedFolderFilesMutex.Lock()
2598	ret, specificReturn := fake.remoteNeedFolderFilesReturnsOnCall[len(fake.remoteNeedFolderFilesArgsForCall)]
2599	fake.remoteNeedFolderFilesArgsForCall = append(fake.remoteNeedFolderFilesArgsForCall, struct {
2600		arg1 string
2601		arg2 protocol.DeviceID
2602		arg3 int
2603		arg4 int
2604	}{arg1, arg2, arg3, arg4})
2605	stub := fake.RemoteNeedFolderFilesStub
2606	fakeReturns := fake.remoteNeedFolderFilesReturns
2607	fake.recordInvocation("RemoteNeedFolderFiles", []interface{}{arg1, arg2, arg3, arg4})
2608	fake.remoteNeedFolderFilesMutex.Unlock()
2609	if stub != nil {
2610		return stub(arg1, arg2, arg3, arg4)
2611	}
2612	if specificReturn {
2613		return ret.result1, ret.result2
2614	}
2615	return fakeReturns.result1, fakeReturns.result2
2616}
2617
2618func (fake *Model) RemoteNeedFolderFilesCallCount() int {
2619	fake.remoteNeedFolderFilesMutex.RLock()
2620	defer fake.remoteNeedFolderFilesMutex.RUnlock()
2621	return len(fake.remoteNeedFolderFilesArgsForCall)
2622}
2623
2624func (fake *Model) RemoteNeedFolderFilesCalls(stub func(string, protocol.DeviceID, int, int) ([]db.FileInfoTruncated, error)) {
2625	fake.remoteNeedFolderFilesMutex.Lock()
2626	defer fake.remoteNeedFolderFilesMutex.Unlock()
2627	fake.RemoteNeedFolderFilesStub = stub
2628}
2629
2630func (fake *Model) RemoteNeedFolderFilesArgsForCall(i int) (string, protocol.DeviceID, int, int) {
2631	fake.remoteNeedFolderFilesMutex.RLock()
2632	defer fake.remoteNeedFolderFilesMutex.RUnlock()
2633	argsForCall := fake.remoteNeedFolderFilesArgsForCall[i]
2634	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4
2635}
2636
2637func (fake *Model) RemoteNeedFolderFilesReturns(result1 []db.FileInfoTruncated, result2 error) {
2638	fake.remoteNeedFolderFilesMutex.Lock()
2639	defer fake.remoteNeedFolderFilesMutex.Unlock()
2640	fake.RemoteNeedFolderFilesStub = nil
2641	fake.remoteNeedFolderFilesReturns = struct {
2642		result1 []db.FileInfoTruncated
2643		result2 error
2644	}{result1, result2}
2645}
2646
2647func (fake *Model) RemoteNeedFolderFilesReturnsOnCall(i int, result1 []db.FileInfoTruncated, result2 error) {
2648	fake.remoteNeedFolderFilesMutex.Lock()
2649	defer fake.remoteNeedFolderFilesMutex.Unlock()
2650	fake.RemoteNeedFolderFilesStub = nil
2651	if fake.remoteNeedFolderFilesReturnsOnCall == nil {
2652		fake.remoteNeedFolderFilesReturnsOnCall = make(map[int]struct {
2653			result1 []db.FileInfoTruncated
2654			result2 error
2655		})
2656	}
2657	fake.remoteNeedFolderFilesReturnsOnCall[i] = struct {
2658		result1 []db.FileInfoTruncated
2659		result2 error
2660	}{result1, result2}
2661}
2662
2663func (fake *Model) Request(arg1 protocol.DeviceID, arg2 string, arg3 string, arg4 int32, arg5 int32, arg6 int64, arg7 []byte, arg8 uint32, arg9 bool) (protocol.RequestResponse, error) {
2664	var arg7Copy []byte
2665	if arg7 != nil {
2666		arg7Copy = make([]byte, len(arg7))
2667		copy(arg7Copy, arg7)
2668	}
2669	fake.requestMutex.Lock()
2670	ret, specificReturn := fake.requestReturnsOnCall[len(fake.requestArgsForCall)]
2671	fake.requestArgsForCall = append(fake.requestArgsForCall, struct {
2672		arg1 protocol.DeviceID
2673		arg2 string
2674		arg3 string
2675		arg4 int32
2676		arg5 int32
2677		arg6 int64
2678		arg7 []byte
2679		arg8 uint32
2680		arg9 bool
2681	}{arg1, arg2, arg3, arg4, arg5, arg6, arg7Copy, arg8, arg9})
2682	stub := fake.RequestStub
2683	fakeReturns := fake.requestReturns
2684	fake.recordInvocation("Request", []interface{}{arg1, arg2, arg3, arg4, arg5, arg6, arg7Copy, arg8, arg9})
2685	fake.requestMutex.Unlock()
2686	if stub != nil {
2687		return stub(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)
2688	}
2689	if specificReturn {
2690		return ret.result1, ret.result2
2691	}
2692	return fakeReturns.result1, fakeReturns.result2
2693}
2694
2695func (fake *Model) RequestCallCount() int {
2696	fake.requestMutex.RLock()
2697	defer fake.requestMutex.RUnlock()
2698	return len(fake.requestArgsForCall)
2699}
2700
2701func (fake *Model) RequestCalls(stub func(protocol.DeviceID, string, string, int32, int32, int64, []byte, uint32, bool) (protocol.RequestResponse, error)) {
2702	fake.requestMutex.Lock()
2703	defer fake.requestMutex.Unlock()
2704	fake.RequestStub = stub
2705}
2706
2707func (fake *Model) RequestArgsForCall(i int) (protocol.DeviceID, string, string, int32, int32, int64, []byte, uint32, bool) {
2708	fake.requestMutex.RLock()
2709	defer fake.requestMutex.RUnlock()
2710	argsForCall := fake.requestArgsForCall[i]
2711	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4, argsForCall.arg5, argsForCall.arg6, argsForCall.arg7, argsForCall.arg8, argsForCall.arg9
2712}
2713
2714func (fake *Model) RequestReturns(result1 protocol.RequestResponse, result2 error) {
2715	fake.requestMutex.Lock()
2716	defer fake.requestMutex.Unlock()
2717	fake.RequestStub = nil
2718	fake.requestReturns = struct {
2719		result1 protocol.RequestResponse
2720		result2 error
2721	}{result1, result2}
2722}
2723
2724func (fake *Model) RequestReturnsOnCall(i int, result1 protocol.RequestResponse, result2 error) {
2725	fake.requestMutex.Lock()
2726	defer fake.requestMutex.Unlock()
2727	fake.RequestStub = nil
2728	if fake.requestReturnsOnCall == nil {
2729		fake.requestReturnsOnCall = make(map[int]struct {
2730			result1 protocol.RequestResponse
2731			result2 error
2732		})
2733	}
2734	fake.requestReturnsOnCall[i] = struct {
2735		result1 protocol.RequestResponse
2736		result2 error
2737	}{result1, result2}
2738}
2739
2740func (fake *Model) ResetFolder(arg1 string) {
2741	fake.resetFolderMutex.Lock()
2742	fake.resetFolderArgsForCall = append(fake.resetFolderArgsForCall, struct {
2743		arg1 string
2744	}{arg1})
2745	stub := fake.ResetFolderStub
2746	fake.recordInvocation("ResetFolder", []interface{}{arg1})
2747	fake.resetFolderMutex.Unlock()
2748	if stub != nil {
2749		fake.ResetFolderStub(arg1)
2750	}
2751}
2752
2753func (fake *Model) ResetFolderCallCount() int {
2754	fake.resetFolderMutex.RLock()
2755	defer fake.resetFolderMutex.RUnlock()
2756	return len(fake.resetFolderArgsForCall)
2757}
2758
2759func (fake *Model) ResetFolderCalls(stub func(string)) {
2760	fake.resetFolderMutex.Lock()
2761	defer fake.resetFolderMutex.Unlock()
2762	fake.ResetFolderStub = stub
2763}
2764
2765func (fake *Model) ResetFolderArgsForCall(i int) string {
2766	fake.resetFolderMutex.RLock()
2767	defer fake.resetFolderMutex.RUnlock()
2768	argsForCall := fake.resetFolderArgsForCall[i]
2769	return argsForCall.arg1
2770}
2771
2772func (fake *Model) RestoreFolderVersions(arg1 string, arg2 map[string]time.Time) (map[string]error, error) {
2773	fake.restoreFolderVersionsMutex.Lock()
2774	ret, specificReturn := fake.restoreFolderVersionsReturnsOnCall[len(fake.restoreFolderVersionsArgsForCall)]
2775	fake.restoreFolderVersionsArgsForCall = append(fake.restoreFolderVersionsArgsForCall, struct {
2776		arg1 string
2777		arg2 map[string]time.Time
2778	}{arg1, arg2})
2779	stub := fake.RestoreFolderVersionsStub
2780	fakeReturns := fake.restoreFolderVersionsReturns
2781	fake.recordInvocation("RestoreFolderVersions", []interface{}{arg1, arg2})
2782	fake.restoreFolderVersionsMutex.Unlock()
2783	if stub != nil {
2784		return stub(arg1, arg2)
2785	}
2786	if specificReturn {
2787		return ret.result1, ret.result2
2788	}
2789	return fakeReturns.result1, fakeReturns.result2
2790}
2791
2792func (fake *Model) RestoreFolderVersionsCallCount() int {
2793	fake.restoreFolderVersionsMutex.RLock()
2794	defer fake.restoreFolderVersionsMutex.RUnlock()
2795	return len(fake.restoreFolderVersionsArgsForCall)
2796}
2797
2798func (fake *Model) RestoreFolderVersionsCalls(stub func(string, map[string]time.Time) (map[string]error, error)) {
2799	fake.restoreFolderVersionsMutex.Lock()
2800	defer fake.restoreFolderVersionsMutex.Unlock()
2801	fake.RestoreFolderVersionsStub = stub
2802}
2803
2804func (fake *Model) RestoreFolderVersionsArgsForCall(i int) (string, map[string]time.Time) {
2805	fake.restoreFolderVersionsMutex.RLock()
2806	defer fake.restoreFolderVersionsMutex.RUnlock()
2807	argsForCall := fake.restoreFolderVersionsArgsForCall[i]
2808	return argsForCall.arg1, argsForCall.arg2
2809}
2810
2811func (fake *Model) RestoreFolderVersionsReturns(result1 map[string]error, result2 error) {
2812	fake.restoreFolderVersionsMutex.Lock()
2813	defer fake.restoreFolderVersionsMutex.Unlock()
2814	fake.RestoreFolderVersionsStub = nil
2815	fake.restoreFolderVersionsReturns = struct {
2816		result1 map[string]error
2817		result2 error
2818	}{result1, result2}
2819}
2820
2821func (fake *Model) RestoreFolderVersionsReturnsOnCall(i int, result1 map[string]error, result2 error) {
2822	fake.restoreFolderVersionsMutex.Lock()
2823	defer fake.restoreFolderVersionsMutex.Unlock()
2824	fake.RestoreFolderVersionsStub = nil
2825	if fake.restoreFolderVersionsReturnsOnCall == nil {
2826		fake.restoreFolderVersionsReturnsOnCall = make(map[int]struct {
2827			result1 map[string]error
2828			result2 error
2829		})
2830	}
2831	fake.restoreFolderVersionsReturnsOnCall[i] = struct {
2832		result1 map[string]error
2833		result2 error
2834	}{result1, result2}
2835}
2836
2837func (fake *Model) Revert(arg1 string) {
2838	fake.revertMutex.Lock()
2839	fake.revertArgsForCall = append(fake.revertArgsForCall, struct {
2840		arg1 string
2841	}{arg1})
2842	stub := fake.RevertStub
2843	fake.recordInvocation("Revert", []interface{}{arg1})
2844	fake.revertMutex.Unlock()
2845	if stub != nil {
2846		fake.RevertStub(arg1)
2847	}
2848}
2849
2850func (fake *Model) RevertCallCount() int {
2851	fake.revertMutex.RLock()
2852	defer fake.revertMutex.RUnlock()
2853	return len(fake.revertArgsForCall)
2854}
2855
2856func (fake *Model) RevertCalls(stub func(string)) {
2857	fake.revertMutex.Lock()
2858	defer fake.revertMutex.Unlock()
2859	fake.RevertStub = stub
2860}
2861
2862func (fake *Model) RevertArgsForCall(i int) string {
2863	fake.revertMutex.RLock()
2864	defer fake.revertMutex.RUnlock()
2865	argsForCall := fake.revertArgsForCall[i]
2866	return argsForCall.arg1
2867}
2868
2869func (fake *Model) ScanFolder(arg1 string) error {
2870	fake.scanFolderMutex.Lock()
2871	ret, specificReturn := fake.scanFolderReturnsOnCall[len(fake.scanFolderArgsForCall)]
2872	fake.scanFolderArgsForCall = append(fake.scanFolderArgsForCall, struct {
2873		arg1 string
2874	}{arg1})
2875	stub := fake.ScanFolderStub
2876	fakeReturns := fake.scanFolderReturns
2877	fake.recordInvocation("ScanFolder", []interface{}{arg1})
2878	fake.scanFolderMutex.Unlock()
2879	if stub != nil {
2880		return stub(arg1)
2881	}
2882	if specificReturn {
2883		return ret.result1
2884	}
2885	return fakeReturns.result1
2886}
2887
2888func (fake *Model) ScanFolderCallCount() int {
2889	fake.scanFolderMutex.RLock()
2890	defer fake.scanFolderMutex.RUnlock()
2891	return len(fake.scanFolderArgsForCall)
2892}
2893
2894func (fake *Model) ScanFolderCalls(stub func(string) error) {
2895	fake.scanFolderMutex.Lock()
2896	defer fake.scanFolderMutex.Unlock()
2897	fake.ScanFolderStub = stub
2898}
2899
2900func (fake *Model) ScanFolderArgsForCall(i int) string {
2901	fake.scanFolderMutex.RLock()
2902	defer fake.scanFolderMutex.RUnlock()
2903	argsForCall := fake.scanFolderArgsForCall[i]
2904	return argsForCall.arg1
2905}
2906
2907func (fake *Model) ScanFolderReturns(result1 error) {
2908	fake.scanFolderMutex.Lock()
2909	defer fake.scanFolderMutex.Unlock()
2910	fake.ScanFolderStub = nil
2911	fake.scanFolderReturns = struct {
2912		result1 error
2913	}{result1}
2914}
2915
2916func (fake *Model) ScanFolderReturnsOnCall(i int, result1 error) {
2917	fake.scanFolderMutex.Lock()
2918	defer fake.scanFolderMutex.Unlock()
2919	fake.ScanFolderStub = nil
2920	if fake.scanFolderReturnsOnCall == nil {
2921		fake.scanFolderReturnsOnCall = make(map[int]struct {
2922			result1 error
2923		})
2924	}
2925	fake.scanFolderReturnsOnCall[i] = struct {
2926		result1 error
2927	}{result1}
2928}
2929
2930func (fake *Model) ScanFolderSubdirs(arg1 string, arg2 []string) error {
2931	var arg2Copy []string
2932	if arg2 != nil {
2933		arg2Copy = make([]string, len(arg2))
2934		copy(arg2Copy, arg2)
2935	}
2936	fake.scanFolderSubdirsMutex.Lock()
2937	ret, specificReturn := fake.scanFolderSubdirsReturnsOnCall[len(fake.scanFolderSubdirsArgsForCall)]
2938	fake.scanFolderSubdirsArgsForCall = append(fake.scanFolderSubdirsArgsForCall, struct {
2939		arg1 string
2940		arg2 []string
2941	}{arg1, arg2Copy})
2942	stub := fake.ScanFolderSubdirsStub
2943	fakeReturns := fake.scanFolderSubdirsReturns
2944	fake.recordInvocation("ScanFolderSubdirs", []interface{}{arg1, arg2Copy})
2945	fake.scanFolderSubdirsMutex.Unlock()
2946	if stub != nil {
2947		return stub(arg1, arg2)
2948	}
2949	if specificReturn {
2950		return ret.result1
2951	}
2952	return fakeReturns.result1
2953}
2954
2955func (fake *Model) ScanFolderSubdirsCallCount() int {
2956	fake.scanFolderSubdirsMutex.RLock()
2957	defer fake.scanFolderSubdirsMutex.RUnlock()
2958	return len(fake.scanFolderSubdirsArgsForCall)
2959}
2960
2961func (fake *Model) ScanFolderSubdirsCalls(stub func(string, []string) error) {
2962	fake.scanFolderSubdirsMutex.Lock()
2963	defer fake.scanFolderSubdirsMutex.Unlock()
2964	fake.ScanFolderSubdirsStub = stub
2965}
2966
2967func (fake *Model) ScanFolderSubdirsArgsForCall(i int) (string, []string) {
2968	fake.scanFolderSubdirsMutex.RLock()
2969	defer fake.scanFolderSubdirsMutex.RUnlock()
2970	argsForCall := fake.scanFolderSubdirsArgsForCall[i]
2971	return argsForCall.arg1, argsForCall.arg2
2972}
2973
2974func (fake *Model) ScanFolderSubdirsReturns(result1 error) {
2975	fake.scanFolderSubdirsMutex.Lock()
2976	defer fake.scanFolderSubdirsMutex.Unlock()
2977	fake.ScanFolderSubdirsStub = nil
2978	fake.scanFolderSubdirsReturns = struct {
2979		result1 error
2980	}{result1}
2981}
2982
2983func (fake *Model) ScanFolderSubdirsReturnsOnCall(i int, result1 error) {
2984	fake.scanFolderSubdirsMutex.Lock()
2985	defer fake.scanFolderSubdirsMutex.Unlock()
2986	fake.ScanFolderSubdirsStub = nil
2987	if fake.scanFolderSubdirsReturnsOnCall == nil {
2988		fake.scanFolderSubdirsReturnsOnCall = make(map[int]struct {
2989			result1 error
2990		})
2991	}
2992	fake.scanFolderSubdirsReturnsOnCall[i] = struct {
2993		result1 error
2994	}{result1}
2995}
2996
2997func (fake *Model) ScanFolders() map[string]error {
2998	fake.scanFoldersMutex.Lock()
2999	ret, specificReturn := fake.scanFoldersReturnsOnCall[len(fake.scanFoldersArgsForCall)]
3000	fake.scanFoldersArgsForCall = append(fake.scanFoldersArgsForCall, struct {
3001	}{})
3002	stub := fake.ScanFoldersStub
3003	fakeReturns := fake.scanFoldersReturns
3004	fake.recordInvocation("ScanFolders", []interface{}{})
3005	fake.scanFoldersMutex.Unlock()
3006	if stub != nil {
3007		return stub()
3008	}
3009	if specificReturn {
3010		return ret.result1
3011	}
3012	return fakeReturns.result1
3013}
3014
3015func (fake *Model) ScanFoldersCallCount() int {
3016	fake.scanFoldersMutex.RLock()
3017	defer fake.scanFoldersMutex.RUnlock()
3018	return len(fake.scanFoldersArgsForCall)
3019}
3020
3021func (fake *Model) ScanFoldersCalls(stub func() map[string]error) {
3022	fake.scanFoldersMutex.Lock()
3023	defer fake.scanFoldersMutex.Unlock()
3024	fake.ScanFoldersStub = stub
3025}
3026
3027func (fake *Model) ScanFoldersReturns(result1 map[string]error) {
3028	fake.scanFoldersMutex.Lock()
3029	defer fake.scanFoldersMutex.Unlock()
3030	fake.ScanFoldersStub = nil
3031	fake.scanFoldersReturns = struct {
3032		result1 map[string]error
3033	}{result1}
3034}
3035
3036func (fake *Model) ScanFoldersReturnsOnCall(i int, result1 map[string]error) {
3037	fake.scanFoldersMutex.Lock()
3038	defer fake.scanFoldersMutex.Unlock()
3039	fake.ScanFoldersStub = nil
3040	if fake.scanFoldersReturnsOnCall == nil {
3041		fake.scanFoldersReturnsOnCall = make(map[int]struct {
3042			result1 map[string]error
3043		})
3044	}
3045	fake.scanFoldersReturnsOnCall[i] = struct {
3046		result1 map[string]error
3047	}{result1}
3048}
3049
3050func (fake *Model) Serve(arg1 context.Context) error {
3051	fake.serveMutex.Lock()
3052	ret, specificReturn := fake.serveReturnsOnCall[len(fake.serveArgsForCall)]
3053	fake.serveArgsForCall = append(fake.serveArgsForCall, struct {
3054		arg1 context.Context
3055	}{arg1})
3056	stub := fake.ServeStub
3057	fakeReturns := fake.serveReturns
3058	fake.recordInvocation("Serve", []interface{}{arg1})
3059	fake.serveMutex.Unlock()
3060	if stub != nil {
3061		return stub(arg1)
3062	}
3063	if specificReturn {
3064		return ret.result1
3065	}
3066	return fakeReturns.result1
3067}
3068
3069func (fake *Model) ServeCallCount() int {
3070	fake.serveMutex.RLock()
3071	defer fake.serveMutex.RUnlock()
3072	return len(fake.serveArgsForCall)
3073}
3074
3075func (fake *Model) ServeCalls(stub func(context.Context) error) {
3076	fake.serveMutex.Lock()
3077	defer fake.serveMutex.Unlock()
3078	fake.ServeStub = stub
3079}
3080
3081func (fake *Model) ServeArgsForCall(i int) context.Context {
3082	fake.serveMutex.RLock()
3083	defer fake.serveMutex.RUnlock()
3084	argsForCall := fake.serveArgsForCall[i]
3085	return argsForCall.arg1
3086}
3087
3088func (fake *Model) ServeReturns(result1 error) {
3089	fake.serveMutex.Lock()
3090	defer fake.serveMutex.Unlock()
3091	fake.ServeStub = nil
3092	fake.serveReturns = struct {
3093		result1 error
3094	}{result1}
3095}
3096
3097func (fake *Model) ServeReturnsOnCall(i int, result1 error) {
3098	fake.serveMutex.Lock()
3099	defer fake.serveMutex.Unlock()
3100	fake.ServeStub = nil
3101	if fake.serveReturnsOnCall == nil {
3102		fake.serveReturnsOnCall = make(map[int]struct {
3103			result1 error
3104		})
3105	}
3106	fake.serveReturnsOnCall[i] = struct {
3107		result1 error
3108	}{result1}
3109}
3110
3111func (fake *Model) SetIgnores(arg1 string, arg2 []string) error {
3112	var arg2Copy []string
3113	if arg2 != nil {
3114		arg2Copy = make([]string, len(arg2))
3115		copy(arg2Copy, arg2)
3116	}
3117	fake.setIgnoresMutex.Lock()
3118	ret, specificReturn := fake.setIgnoresReturnsOnCall[len(fake.setIgnoresArgsForCall)]
3119	fake.setIgnoresArgsForCall = append(fake.setIgnoresArgsForCall, struct {
3120		arg1 string
3121		arg2 []string
3122	}{arg1, arg2Copy})
3123	stub := fake.SetIgnoresStub
3124	fakeReturns := fake.setIgnoresReturns
3125	fake.recordInvocation("SetIgnores", []interface{}{arg1, arg2Copy})
3126	fake.setIgnoresMutex.Unlock()
3127	if stub != nil {
3128		return stub(arg1, arg2)
3129	}
3130	if specificReturn {
3131		return ret.result1
3132	}
3133	return fakeReturns.result1
3134}
3135
3136func (fake *Model) SetIgnoresCallCount() int {
3137	fake.setIgnoresMutex.RLock()
3138	defer fake.setIgnoresMutex.RUnlock()
3139	return len(fake.setIgnoresArgsForCall)
3140}
3141
3142func (fake *Model) SetIgnoresCalls(stub func(string, []string) error) {
3143	fake.setIgnoresMutex.Lock()
3144	defer fake.setIgnoresMutex.Unlock()
3145	fake.SetIgnoresStub = stub
3146}
3147
3148func (fake *Model) SetIgnoresArgsForCall(i int) (string, []string) {
3149	fake.setIgnoresMutex.RLock()
3150	defer fake.setIgnoresMutex.RUnlock()
3151	argsForCall := fake.setIgnoresArgsForCall[i]
3152	return argsForCall.arg1, argsForCall.arg2
3153}
3154
3155func (fake *Model) SetIgnoresReturns(result1 error) {
3156	fake.setIgnoresMutex.Lock()
3157	defer fake.setIgnoresMutex.Unlock()
3158	fake.SetIgnoresStub = nil
3159	fake.setIgnoresReturns = struct {
3160		result1 error
3161	}{result1}
3162}
3163
3164func (fake *Model) SetIgnoresReturnsOnCall(i int, result1 error) {
3165	fake.setIgnoresMutex.Lock()
3166	defer fake.setIgnoresMutex.Unlock()
3167	fake.SetIgnoresStub = nil
3168	if fake.setIgnoresReturnsOnCall == nil {
3169		fake.setIgnoresReturnsOnCall = make(map[int]struct {
3170			result1 error
3171		})
3172	}
3173	fake.setIgnoresReturnsOnCall[i] = struct {
3174		result1 error
3175	}{result1}
3176}
3177
3178func (fake *Model) StartDeadlockDetector(arg1 time.Duration) {
3179	fake.startDeadlockDetectorMutex.Lock()
3180	fake.startDeadlockDetectorArgsForCall = append(fake.startDeadlockDetectorArgsForCall, struct {
3181		arg1 time.Duration
3182	}{arg1})
3183	stub := fake.StartDeadlockDetectorStub
3184	fake.recordInvocation("StartDeadlockDetector", []interface{}{arg1})
3185	fake.startDeadlockDetectorMutex.Unlock()
3186	if stub != nil {
3187		fake.StartDeadlockDetectorStub(arg1)
3188	}
3189}
3190
3191func (fake *Model) StartDeadlockDetectorCallCount() int {
3192	fake.startDeadlockDetectorMutex.RLock()
3193	defer fake.startDeadlockDetectorMutex.RUnlock()
3194	return len(fake.startDeadlockDetectorArgsForCall)
3195}
3196
3197func (fake *Model) StartDeadlockDetectorCalls(stub func(time.Duration)) {
3198	fake.startDeadlockDetectorMutex.Lock()
3199	defer fake.startDeadlockDetectorMutex.Unlock()
3200	fake.StartDeadlockDetectorStub = stub
3201}
3202
3203func (fake *Model) StartDeadlockDetectorArgsForCall(i int) time.Duration {
3204	fake.startDeadlockDetectorMutex.RLock()
3205	defer fake.startDeadlockDetectorMutex.RUnlock()
3206	argsForCall := fake.startDeadlockDetectorArgsForCall[i]
3207	return argsForCall.arg1
3208}
3209
3210func (fake *Model) State(arg1 string) (string, time.Time, error) {
3211	fake.stateMutex.Lock()
3212	ret, specificReturn := fake.stateReturnsOnCall[len(fake.stateArgsForCall)]
3213	fake.stateArgsForCall = append(fake.stateArgsForCall, struct {
3214		arg1 string
3215	}{arg1})
3216	stub := fake.StateStub
3217	fakeReturns := fake.stateReturns
3218	fake.recordInvocation("State", []interface{}{arg1})
3219	fake.stateMutex.Unlock()
3220	if stub != nil {
3221		return stub(arg1)
3222	}
3223	if specificReturn {
3224		return ret.result1, ret.result2, ret.result3
3225	}
3226	return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3
3227}
3228
3229func (fake *Model) StateCallCount() int {
3230	fake.stateMutex.RLock()
3231	defer fake.stateMutex.RUnlock()
3232	return len(fake.stateArgsForCall)
3233}
3234
3235func (fake *Model) StateCalls(stub func(string) (string, time.Time, error)) {
3236	fake.stateMutex.Lock()
3237	defer fake.stateMutex.Unlock()
3238	fake.StateStub = stub
3239}
3240
3241func (fake *Model) StateArgsForCall(i int) string {
3242	fake.stateMutex.RLock()
3243	defer fake.stateMutex.RUnlock()
3244	argsForCall := fake.stateArgsForCall[i]
3245	return argsForCall.arg1
3246}
3247
3248func (fake *Model) StateReturns(result1 string, result2 time.Time, result3 error) {
3249	fake.stateMutex.Lock()
3250	defer fake.stateMutex.Unlock()
3251	fake.StateStub = nil
3252	fake.stateReturns = struct {
3253		result1 string
3254		result2 time.Time
3255		result3 error
3256	}{result1, result2, result3}
3257}
3258
3259func (fake *Model) StateReturnsOnCall(i int, result1 string, result2 time.Time, result3 error) {
3260	fake.stateMutex.Lock()
3261	defer fake.stateMutex.Unlock()
3262	fake.StateStub = nil
3263	if fake.stateReturnsOnCall == nil {
3264		fake.stateReturnsOnCall = make(map[int]struct {
3265			result1 string
3266			result2 time.Time
3267			result3 error
3268		})
3269	}
3270	fake.stateReturnsOnCall[i] = struct {
3271		result1 string
3272		result2 time.Time
3273		result3 error
3274	}{result1, result2, result3}
3275}
3276
3277func (fake *Model) UsageReportingStats(arg1 *contract.Report, arg2 int, arg3 bool) {
3278	fake.usageReportingStatsMutex.Lock()
3279	fake.usageReportingStatsArgsForCall = append(fake.usageReportingStatsArgsForCall, struct {
3280		arg1 *contract.Report
3281		arg2 int
3282		arg3 bool
3283	}{arg1, arg2, arg3})
3284	stub := fake.UsageReportingStatsStub
3285	fake.recordInvocation("UsageReportingStats", []interface{}{arg1, arg2, arg3})
3286	fake.usageReportingStatsMutex.Unlock()
3287	if stub != nil {
3288		fake.UsageReportingStatsStub(arg1, arg2, arg3)
3289	}
3290}
3291
3292func (fake *Model) UsageReportingStatsCallCount() int {
3293	fake.usageReportingStatsMutex.RLock()
3294	defer fake.usageReportingStatsMutex.RUnlock()
3295	return len(fake.usageReportingStatsArgsForCall)
3296}
3297
3298func (fake *Model) UsageReportingStatsCalls(stub func(*contract.Report, int, bool)) {
3299	fake.usageReportingStatsMutex.Lock()
3300	defer fake.usageReportingStatsMutex.Unlock()
3301	fake.UsageReportingStatsStub = stub
3302}
3303
3304func (fake *Model) UsageReportingStatsArgsForCall(i int) (*contract.Report, int, bool) {
3305	fake.usageReportingStatsMutex.RLock()
3306	defer fake.usageReportingStatsMutex.RUnlock()
3307	argsForCall := fake.usageReportingStatsArgsForCall[i]
3308	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
3309}
3310
3311func (fake *Model) WatchError(arg1 string) error {
3312	fake.watchErrorMutex.Lock()
3313	ret, specificReturn := fake.watchErrorReturnsOnCall[len(fake.watchErrorArgsForCall)]
3314	fake.watchErrorArgsForCall = append(fake.watchErrorArgsForCall, struct {
3315		arg1 string
3316	}{arg1})
3317	stub := fake.WatchErrorStub
3318	fakeReturns := fake.watchErrorReturns
3319	fake.recordInvocation("WatchError", []interface{}{arg1})
3320	fake.watchErrorMutex.Unlock()
3321	if stub != nil {
3322		return stub(arg1)
3323	}
3324	if specificReturn {
3325		return ret.result1
3326	}
3327	return fakeReturns.result1
3328}
3329
3330func (fake *Model) WatchErrorCallCount() int {
3331	fake.watchErrorMutex.RLock()
3332	defer fake.watchErrorMutex.RUnlock()
3333	return len(fake.watchErrorArgsForCall)
3334}
3335
3336func (fake *Model) WatchErrorCalls(stub func(string) error) {
3337	fake.watchErrorMutex.Lock()
3338	defer fake.watchErrorMutex.Unlock()
3339	fake.WatchErrorStub = stub
3340}
3341
3342func (fake *Model) WatchErrorArgsForCall(i int) string {
3343	fake.watchErrorMutex.RLock()
3344	defer fake.watchErrorMutex.RUnlock()
3345	argsForCall := fake.watchErrorArgsForCall[i]
3346	return argsForCall.arg1
3347}
3348
3349func (fake *Model) WatchErrorReturns(result1 error) {
3350	fake.watchErrorMutex.Lock()
3351	defer fake.watchErrorMutex.Unlock()
3352	fake.WatchErrorStub = nil
3353	fake.watchErrorReturns = struct {
3354		result1 error
3355	}{result1}
3356}
3357
3358func (fake *Model) WatchErrorReturnsOnCall(i int, result1 error) {
3359	fake.watchErrorMutex.Lock()
3360	defer fake.watchErrorMutex.Unlock()
3361	fake.WatchErrorStub = nil
3362	if fake.watchErrorReturnsOnCall == nil {
3363		fake.watchErrorReturnsOnCall = make(map[int]struct {
3364			result1 error
3365		})
3366	}
3367	fake.watchErrorReturnsOnCall[i] = struct {
3368		result1 error
3369	}{result1}
3370}
3371
3372func (fake *Model) Invocations() map[string][][]interface{} {
3373	fake.invocationsMutex.RLock()
3374	defer fake.invocationsMutex.RUnlock()
3375	fake.addConnectionMutex.RLock()
3376	defer fake.addConnectionMutex.RUnlock()
3377	fake.availabilityMutex.RLock()
3378	defer fake.availabilityMutex.RUnlock()
3379	fake.bringToFrontMutex.RLock()
3380	defer fake.bringToFrontMutex.RUnlock()
3381	fake.closedMutex.RLock()
3382	defer fake.closedMutex.RUnlock()
3383	fake.clusterConfigMutex.RLock()
3384	defer fake.clusterConfigMutex.RUnlock()
3385	fake.completionMutex.RLock()
3386	defer fake.completionMutex.RUnlock()
3387	fake.connectionMutex.RLock()
3388	defer fake.connectionMutex.RUnlock()
3389	fake.connectionStatsMutex.RLock()
3390	defer fake.connectionStatsMutex.RUnlock()
3391	fake.currentFolderFileMutex.RLock()
3392	defer fake.currentFolderFileMutex.RUnlock()
3393	fake.currentGlobalFileMutex.RLock()
3394	defer fake.currentGlobalFileMutex.RUnlock()
3395	fake.currentIgnoresMutex.RLock()
3396	defer fake.currentIgnoresMutex.RUnlock()
3397	fake.dBSnapshotMutex.RLock()
3398	defer fake.dBSnapshotMutex.RUnlock()
3399	fake.delayScanMutex.RLock()
3400	defer fake.delayScanMutex.RUnlock()
3401	fake.deviceStatisticsMutex.RLock()
3402	defer fake.deviceStatisticsMutex.RUnlock()
3403	fake.dismissPendingDeviceMutex.RLock()
3404	defer fake.dismissPendingDeviceMutex.RUnlock()
3405	fake.dismissPendingFolderMutex.RLock()
3406	defer fake.dismissPendingFolderMutex.RUnlock()
3407	fake.downloadProgressMutex.RLock()
3408	defer fake.downloadProgressMutex.RUnlock()
3409	fake.folderErrorsMutex.RLock()
3410	defer fake.folderErrorsMutex.RUnlock()
3411	fake.folderProgressBytesCompletedMutex.RLock()
3412	defer fake.folderProgressBytesCompletedMutex.RUnlock()
3413	fake.folderStatisticsMutex.RLock()
3414	defer fake.folderStatisticsMutex.RUnlock()
3415	fake.getFolderVersionsMutex.RLock()
3416	defer fake.getFolderVersionsMutex.RUnlock()
3417	fake.getHelloMutex.RLock()
3418	defer fake.getHelloMutex.RUnlock()
3419	fake.getMtimeMappingMutex.RLock()
3420	defer fake.getMtimeMappingMutex.RUnlock()
3421	fake.globalDirectoryTreeMutex.RLock()
3422	defer fake.globalDirectoryTreeMutex.RUnlock()
3423	fake.indexMutex.RLock()
3424	defer fake.indexMutex.RUnlock()
3425	fake.indexUpdateMutex.RLock()
3426	defer fake.indexUpdateMutex.RUnlock()
3427	fake.loadIgnoresMutex.RLock()
3428	defer fake.loadIgnoresMutex.RUnlock()
3429	fake.localChangedFolderFilesMutex.RLock()
3430	defer fake.localChangedFolderFilesMutex.RUnlock()
3431	fake.needFolderFilesMutex.RLock()
3432	defer fake.needFolderFilesMutex.RUnlock()
3433	fake.numConnectionsMutex.RLock()
3434	defer fake.numConnectionsMutex.RUnlock()
3435	fake.onHelloMutex.RLock()
3436	defer fake.onHelloMutex.RUnlock()
3437	fake.overrideMutex.RLock()
3438	defer fake.overrideMutex.RUnlock()
3439	fake.pendingDevicesMutex.RLock()
3440	defer fake.pendingDevicesMutex.RUnlock()
3441	fake.pendingFoldersMutex.RLock()
3442	defer fake.pendingFoldersMutex.RUnlock()
3443	fake.remoteNeedFolderFilesMutex.RLock()
3444	defer fake.remoteNeedFolderFilesMutex.RUnlock()
3445	fake.requestMutex.RLock()
3446	defer fake.requestMutex.RUnlock()
3447	fake.resetFolderMutex.RLock()
3448	defer fake.resetFolderMutex.RUnlock()
3449	fake.restoreFolderVersionsMutex.RLock()
3450	defer fake.restoreFolderVersionsMutex.RUnlock()
3451	fake.revertMutex.RLock()
3452	defer fake.revertMutex.RUnlock()
3453	fake.scanFolderMutex.RLock()
3454	defer fake.scanFolderMutex.RUnlock()
3455	fake.scanFolderSubdirsMutex.RLock()
3456	defer fake.scanFolderSubdirsMutex.RUnlock()
3457	fake.scanFoldersMutex.RLock()
3458	defer fake.scanFoldersMutex.RUnlock()
3459	fake.serveMutex.RLock()
3460	defer fake.serveMutex.RUnlock()
3461	fake.setIgnoresMutex.RLock()
3462	defer fake.setIgnoresMutex.RUnlock()
3463	fake.startDeadlockDetectorMutex.RLock()
3464	defer fake.startDeadlockDetectorMutex.RUnlock()
3465	fake.stateMutex.RLock()
3466	defer fake.stateMutex.RUnlock()
3467	fake.usageReportingStatsMutex.RLock()
3468	defer fake.usageReportingStatsMutex.RUnlock()
3469	fake.watchErrorMutex.RLock()
3470	defer fake.watchErrorMutex.RUnlock()
3471	copiedInvocations := map[string][][]interface{}{}
3472	for key, value := range fake.invocations {
3473		copiedInvocations[key] = value
3474	}
3475	return copiedInvocations
3476}
3477
3478func (fake *Model) recordInvocation(key string, args []interface{}) {
3479	fake.invocationsMutex.Lock()
3480	defer fake.invocationsMutex.Unlock()
3481	if fake.invocations == nil {
3482		fake.invocations = map[string][][]interface{}{}
3483	}
3484	if fake.invocations[key] == nil {
3485		fake.invocations[key] = [][]interface{}{}
3486	}
3487	fake.invocations[key] = append(fake.invocations[key], args)
3488}
3489
3490var _ model.Model = new(Model)
3491