// Code generated by counterfeiter. DO NOT EDIT.
package fakes

import (
	"iptables-logger/parser"
	"sync"
)

type KernelLogParser struct {
	IsIPTablesLogDataStub        func(line string) bool
	isIPTablesLogDataMutex       sync.RWMutex
	isIPTablesLogDataArgsForCall []struct {
		line string
	}
	isIPTablesLogDataReturns struct {
		result1 bool
	}
	isIPTablesLogDataReturnsOnCall map[int]struct {
		result1 bool
	}
	ParseStub        func(line string) parser.ParsedData
	parseMutex       sync.RWMutex
	parseArgsForCall []struct {
		line string
	}
	parseReturns struct {
		result1 parser.ParsedData
	}
	parseReturnsOnCall map[int]struct {
		result1 parser.ParsedData
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *KernelLogParser) IsIPTablesLogData(line string) bool {
	fake.isIPTablesLogDataMutex.Lock()
	ret, specificReturn := fake.isIPTablesLogDataReturnsOnCall[len(fake.isIPTablesLogDataArgsForCall)]
	fake.isIPTablesLogDataArgsForCall = append(fake.isIPTablesLogDataArgsForCall, struct {
		line string
	}{line})
	fake.recordInvocation("IsIPTablesLogData", []interface{}{line})
	fake.isIPTablesLogDataMutex.Unlock()
	if fake.IsIPTablesLogDataStub != nil {
		return fake.IsIPTablesLogDataStub(line)
	}
	if specificReturn {
		return ret.result1
	}
	return fake.isIPTablesLogDataReturns.result1
}

func (fake *KernelLogParser) IsIPTablesLogDataCallCount() int {
	fake.isIPTablesLogDataMutex.RLock()
	defer fake.isIPTablesLogDataMutex.RUnlock()
	return len(fake.isIPTablesLogDataArgsForCall)
}

func (fake *KernelLogParser) IsIPTablesLogDataArgsForCall(i int) string {
	fake.isIPTablesLogDataMutex.RLock()
	defer fake.isIPTablesLogDataMutex.RUnlock()
	return fake.isIPTablesLogDataArgsForCall[i].line
}

func (fake *KernelLogParser) IsIPTablesLogDataReturns(result1 bool) {
	fake.IsIPTablesLogDataStub = nil
	fake.isIPTablesLogDataReturns = struct {
		result1 bool
	}{result1}
}

func (fake *KernelLogParser) IsIPTablesLogDataReturnsOnCall(i int, result1 bool) {
	fake.IsIPTablesLogDataStub = nil
	if fake.isIPTablesLogDataReturnsOnCall == nil {
		fake.isIPTablesLogDataReturnsOnCall = make(map[int]struct {
			result1 bool
		})
	}
	fake.isIPTablesLogDataReturnsOnCall[i] = struct {
		result1 bool
	}{result1}
}

func (fake *KernelLogParser) Parse(line string) parser.ParsedData {
	fake.parseMutex.Lock()
	ret, specificReturn := fake.parseReturnsOnCall[len(fake.parseArgsForCall)]
	fake.parseArgsForCall = append(fake.parseArgsForCall, struct {
		line string
	}{line})
	fake.recordInvocation("Parse", []interface{}{line})
	fake.parseMutex.Unlock()
	if fake.ParseStub != nil {
		return fake.ParseStub(line)
	}
	if specificReturn {
		return ret.result1
	}
	return fake.parseReturns.result1
}

func (fake *KernelLogParser) ParseCallCount() int {
	fake.parseMutex.RLock()
	defer fake.parseMutex.RUnlock()
	return len(fake.parseArgsForCall)
}

func (fake *KernelLogParser) ParseArgsForCall(i int) string {
	fake.parseMutex.RLock()
	defer fake.parseMutex.RUnlock()
	return fake.parseArgsForCall[i].line
}

func (fake *KernelLogParser) ParseReturns(result1 parser.ParsedData) {
	fake.ParseStub = nil
	fake.parseReturns = struct {
		result1 parser.ParsedData
	}{result1}
}

func (fake *KernelLogParser) ParseReturnsOnCall(i int, result1 parser.ParsedData) {
	fake.ParseStub = nil
	if fake.parseReturnsOnCall == nil {
		fake.parseReturnsOnCall = make(map[int]struct {
			result1 parser.ParsedData
		})
	}
	fake.parseReturnsOnCall[i] = struct {
		result1 parser.ParsedData
	}{result1}
}

func (fake *KernelLogParser) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.isIPTablesLogDataMutex.RLock()
	defer fake.isIPTablesLogDataMutex.RUnlock()
	fake.parseMutex.RLock()
	defer fake.parseMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *KernelLogParser) recordInvocation(key string, args []interface{}) {
	fake.invocationsMutex.Lock()
	defer fake.invocationsMutex.Unlock()
	if fake.invocations == nil {
		fake.invocations = map[string][][]interface{}{}
	}
	if fake.invocations[key] == nil {
		fake.invocations[key] = [][]interface{}{}
	}
	fake.invocations[key] = append(fake.invocations[key], args)
}
