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

import (
	"sync"

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

type FakeSecurityGroupsRepo struct {
	BindToStagingSetStub        func(string) error
	bindToStagingSetMutex       sync.RWMutex
	bindToStagingSetArgsForCall []struct {
		arg1 string
	}
	bindToStagingSetReturns struct {
		result1 error
	}
	bindToStagingSetReturnsOnCall 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
	}
	UnbindFromStagingSetStub        func(string) error
	unbindFromStagingSetMutex       sync.RWMutex
	unbindFromStagingSetArgsForCall []struct {
		arg1 string
	}
	unbindFromStagingSetReturns struct {
		result1 error
	}
	unbindFromStagingSetReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeSecurityGroupsRepo) BindToStagingSet(arg1 string) error {
	fake.bindToStagingSetMutex.Lock()
	ret, specificReturn := fake.bindToStagingSetReturnsOnCall[len(fake.bindToStagingSetArgsForCall)]
	fake.bindToStagingSetArgsForCall = append(fake.bindToStagingSetArgsForCall, struct {
		arg1 string
	}{arg1})
	fake.recordInvocation("BindToStagingSet", []interface{}{arg1})
	fake.bindToStagingSetMutex.Unlock()
	if fake.BindToStagingSetStub != nil {
		return fake.BindToStagingSetStub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.bindToStagingSetReturns
	return fakeReturns.result1
}

func (fake *FakeSecurityGroupsRepo) BindToStagingSetCallCount() int {
	fake.bindToStagingSetMutex.RLock()
	defer fake.bindToStagingSetMutex.RUnlock()
	return len(fake.bindToStagingSetArgsForCall)
}

func (fake *FakeSecurityGroupsRepo) BindToStagingSetCalls(stub func(string) error) {
	fake.bindToStagingSetMutex.Lock()
	defer fake.bindToStagingSetMutex.Unlock()
	fake.BindToStagingSetStub = stub
}

func (fake *FakeSecurityGroupsRepo) BindToStagingSetArgsForCall(i int) string {
	fake.bindToStagingSetMutex.RLock()
	defer fake.bindToStagingSetMutex.RUnlock()
	argsForCall := fake.bindToStagingSetArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeSecurityGroupsRepo) BindToStagingSetReturns(result1 error) {
	fake.bindToStagingSetMutex.Lock()
	defer fake.bindToStagingSetMutex.Unlock()
	fake.BindToStagingSetStub = nil
	fake.bindToStagingSetReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeSecurityGroupsRepo) BindToStagingSetReturnsOnCall(i int, result1 error) {
	fake.bindToStagingSetMutex.Lock()
	defer fake.bindToStagingSetMutex.Unlock()
	fake.BindToStagingSetStub = nil
	if fake.bindToStagingSetReturnsOnCall == nil {
		fake.bindToStagingSetReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.bindToStagingSetReturnsOnCall[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) UnbindFromStagingSet(arg1 string) error {
	fake.unbindFromStagingSetMutex.Lock()
	ret, specificReturn := fake.unbindFromStagingSetReturnsOnCall[len(fake.unbindFromStagingSetArgsForCall)]
	fake.unbindFromStagingSetArgsForCall = append(fake.unbindFromStagingSetArgsForCall, struct {
		arg1 string
	}{arg1})
	fake.recordInvocation("UnbindFromStagingSet", []interface{}{arg1})
	fake.unbindFromStagingSetMutex.Unlock()
	if fake.UnbindFromStagingSetStub != nil {
		return fake.UnbindFromStagingSetStub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.unbindFromStagingSetReturns
	return fakeReturns.result1
}

func (fake *FakeSecurityGroupsRepo) UnbindFromStagingSetCallCount() int {
	fake.unbindFromStagingSetMutex.RLock()
	defer fake.unbindFromStagingSetMutex.RUnlock()
	return len(fake.unbindFromStagingSetArgsForCall)
}

func (fake *FakeSecurityGroupsRepo) UnbindFromStagingSetCalls(stub func(string) error) {
	fake.unbindFromStagingSetMutex.Lock()
	defer fake.unbindFromStagingSetMutex.Unlock()
	fake.UnbindFromStagingSetStub = stub
}

func (fake *FakeSecurityGroupsRepo) UnbindFromStagingSetArgsForCall(i int) string {
	fake.unbindFromStagingSetMutex.RLock()
	defer fake.unbindFromStagingSetMutex.RUnlock()
	argsForCall := fake.unbindFromStagingSetArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeSecurityGroupsRepo) UnbindFromStagingSetReturns(result1 error) {
	fake.unbindFromStagingSetMutex.Lock()
	defer fake.unbindFromStagingSetMutex.Unlock()
	fake.UnbindFromStagingSetStub = nil
	fake.unbindFromStagingSetReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeSecurityGroupsRepo) UnbindFromStagingSetReturnsOnCall(i int, result1 error) {
	fake.unbindFromStagingSetMutex.Lock()
	defer fake.unbindFromStagingSetMutex.Unlock()
	fake.UnbindFromStagingSetStub = nil
	if fake.unbindFromStagingSetReturnsOnCall == nil {
		fake.unbindFromStagingSetReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.unbindFromStagingSetReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeSecurityGroupsRepo) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.bindToStagingSetMutex.RLock()
	defer fake.bindToStagingSetMutex.RUnlock()
	fake.listMutex.RLock()
	defer fake.listMutex.RUnlock()
	fake.unbindFromStagingSetMutex.RLock()
	defer fake.unbindFromStagingSetMutex.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 _ staging.SecurityGroupsRepo = new(FakeSecurityGroupsRepo)
