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

import (
	"sync"

	"code.cloudfoundry.org/cli/cf/api/securitygroups/defaults/running"
	"code.cloudfoundry.org/cli/cf/models"
)

type FakeSecurityGroupsRepo struct {
	BindToRunningSetStub        func(string) error
	bindToRunningSetMutex       sync.RWMutex
	bindToRunningSetArgsForCall []struct {
		arg1 string
	}
	bindToRunningSetReturns struct {
		result1 error
	}
	bindToRunningSetReturnsOnCall map[int]struct {
		result1 error
	}
	ListStub        func() ([]models.SecurityGroupFields, error)
	listMutex       sync.RWMutex
	listArgsForCall []struct {
	}
	listReturns struct {
		result1 []models.SecurityGroupFields
		result2 error
	}
	listReturnsOnCall map[int]struct {
		result1 []models.SecurityGroupFields
		result2 error
	}
	UnbindFromRunningSetStub        func(string) error
	unbindFromRunningSetMutex       sync.RWMutex
	unbindFromRunningSetArgsForCall []struct {
		arg1 string
	}
	unbindFromRunningSetReturns struct {
		result1 error
	}
	unbindFromRunningSetReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeSecurityGroupsRepo) BindToRunningSet(arg1 string) error {
	fake.bindToRunningSetMutex.Lock()
	ret, specificReturn := fake.bindToRunningSetReturnsOnCall[len(fake.bindToRunningSetArgsForCall)]
	fake.bindToRunningSetArgsForCall = append(fake.bindToRunningSetArgsForCall, struct {
		arg1 string
	}{arg1})
	fake.recordInvocation("BindToRunningSet", []interface{}{arg1})
	fake.bindToRunningSetMutex.Unlock()
	if fake.BindToRunningSetStub != nil {
		return fake.BindToRunningSetStub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.bindToRunningSetReturns
	return fakeReturns.result1
}

func (fake *FakeSecurityGroupsRepo) BindToRunningSetCallCount() int {
	fake.bindToRunningSetMutex.RLock()
	defer fake.bindToRunningSetMutex.RUnlock()
	return len(fake.bindToRunningSetArgsForCall)
}

func (fake *FakeSecurityGroupsRepo) BindToRunningSetCalls(stub func(string) error) {
	fake.bindToRunningSetMutex.Lock()
	defer fake.bindToRunningSetMutex.Unlock()
	fake.BindToRunningSetStub = stub
}

func (fake *FakeSecurityGroupsRepo) BindToRunningSetArgsForCall(i int) string {
	fake.bindToRunningSetMutex.RLock()
	defer fake.bindToRunningSetMutex.RUnlock()
	argsForCall := fake.bindToRunningSetArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeSecurityGroupsRepo) BindToRunningSetReturns(result1 error) {
	fake.bindToRunningSetMutex.Lock()
	defer fake.bindToRunningSetMutex.Unlock()
	fake.BindToRunningSetStub = nil
	fake.bindToRunningSetReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeSecurityGroupsRepo) BindToRunningSetReturnsOnCall(i int, result1 error) {
	fake.bindToRunningSetMutex.Lock()
	defer fake.bindToRunningSetMutex.Unlock()
	fake.BindToRunningSetStub = nil
	if fake.bindToRunningSetReturnsOnCall == nil {
		fake.bindToRunningSetReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.bindToRunningSetReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeSecurityGroupsRepo) List() ([]models.SecurityGroupFields, error) {
	fake.listMutex.Lock()
	ret, specificReturn := fake.listReturnsOnCall[len(fake.listArgsForCall)]
	fake.listArgsForCall = append(fake.listArgsForCall, struct {
	}{})
	fake.recordInvocation("List", []interface{}{})
	fake.listMutex.Unlock()
	if fake.ListStub != nil {
		return fake.ListStub()
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.listReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeSecurityGroupsRepo) ListCallCount() int {
	fake.listMutex.RLock()
	defer fake.listMutex.RUnlock()
	return len(fake.listArgsForCall)
}

func (fake *FakeSecurityGroupsRepo) ListCalls(stub func() ([]models.SecurityGroupFields, error)) {
	fake.listMutex.Lock()
	defer fake.listMutex.Unlock()
	fake.ListStub = stub
}

func (fake *FakeSecurityGroupsRepo) ListReturns(result1 []models.SecurityGroupFields, result2 error) {
	fake.listMutex.Lock()
	defer fake.listMutex.Unlock()
	fake.ListStub = nil
	fake.listReturns = struct {
		result1 []models.SecurityGroupFields
		result2 error
	}{result1, result2}
}

func (fake *FakeSecurityGroupsRepo) ListReturnsOnCall(i int, result1 []models.SecurityGroupFields, result2 error) {
	fake.listMutex.Lock()
	defer fake.listMutex.Unlock()
	fake.ListStub = nil
	if fake.listReturnsOnCall == nil {
		fake.listReturnsOnCall = make(map[int]struct {
			result1 []models.SecurityGroupFields
			result2 error
		})
	}
	fake.listReturnsOnCall[i] = struct {
		result1 []models.SecurityGroupFields
		result2 error
	}{result1, result2}
}

func (fake *FakeSecurityGroupsRepo) UnbindFromRunningSet(arg1 string) error {
	fake.unbindFromRunningSetMutex.Lock()
	ret, specificReturn := fake.unbindFromRunningSetReturnsOnCall[len(fake.unbindFromRunningSetArgsForCall)]
	fake.unbindFromRunningSetArgsForCall = append(fake.unbindFromRunningSetArgsForCall, struct {
		arg1 string
	}{arg1})
	fake.recordInvocation("UnbindFromRunningSet", []interface{}{arg1})
	fake.unbindFromRunningSetMutex.Unlock()
	if fake.UnbindFromRunningSetStub != nil {
		return fake.UnbindFromRunningSetStub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.unbindFromRunningSetReturns
	return fakeReturns.result1
}

func (fake *FakeSecurityGroupsRepo) UnbindFromRunningSetCallCount() int {
	fake.unbindFromRunningSetMutex.RLock()
	defer fake.unbindFromRunningSetMutex.RUnlock()
	return len(fake.unbindFromRunningSetArgsForCall)
}

func (fake *FakeSecurityGroupsRepo) UnbindFromRunningSetCalls(stub func(string) error) {
	fake.unbindFromRunningSetMutex.Lock()
	defer fake.unbindFromRunningSetMutex.Unlock()
	fake.UnbindFromRunningSetStub = stub
}

func (fake *FakeSecurityGroupsRepo) UnbindFromRunningSetArgsForCall(i int) string {
	fake.unbindFromRunningSetMutex.RLock()
	defer fake.unbindFromRunningSetMutex.RUnlock()
	argsForCall := fake.unbindFromRunningSetArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeSecurityGroupsRepo) UnbindFromRunningSetReturns(result1 error) {
	fake.unbindFromRunningSetMutex.Lock()
	defer fake.unbindFromRunningSetMutex.Unlock()
	fake.UnbindFromRunningSetStub = nil
	fake.unbindFromRunningSetReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeSecurityGroupsRepo) UnbindFromRunningSetReturnsOnCall(i int, result1 error) {
	fake.unbindFromRunningSetMutex.Lock()
	defer fake.unbindFromRunningSetMutex.Unlock()
	fake.UnbindFromRunningSetStub = nil
	if fake.unbindFromRunningSetReturnsOnCall == nil {
		fake.unbindFromRunningSetReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.unbindFromRunningSetReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

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

func (fake *FakeSecurityGroupsRepo) 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)
}

var _ running.SecurityGroupsRepo = new(FakeSecurityGroupsRepo)
