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

import (
	"sync"

	"code.cloudfoundry.org/cli/cf/api/quotas"
	"code.cloudfoundry.org/cli/cf/models"
)

type FakeQuotaRepository struct {
	AssignQuotaToOrgStub        func(string, string) error
	assignQuotaToOrgMutex       sync.RWMutex
	assignQuotaToOrgArgsForCall []struct {
		arg1 string
		arg2 string
	}
	assignQuotaToOrgReturns struct {
		result1 error
	}
	assignQuotaToOrgReturnsOnCall map[int]struct {
		result1 error
	}
	CreateStub        func(models.QuotaFields) error
	createMutex       sync.RWMutex
	createArgsForCall []struct {
		arg1 models.QuotaFields
	}
	createReturns struct {
		result1 error
	}
	createReturnsOnCall map[int]struct {
		result1 error
	}
	DeleteStub        func(string) error
	deleteMutex       sync.RWMutex
	deleteArgsForCall []struct {
		arg1 string
	}
	deleteReturns struct {
		result1 error
	}
	deleteReturnsOnCall map[int]struct {
		result1 error
	}
	FindAllStub        func() ([]models.QuotaFields, error)
	findAllMutex       sync.RWMutex
	findAllArgsForCall []struct {
	}
	findAllReturns struct {
		result1 []models.QuotaFields
		result2 error
	}
	findAllReturnsOnCall map[int]struct {
		result1 []models.QuotaFields
		result2 error
	}
	FindByNameStub        func(string) (models.QuotaFields, error)
	findByNameMutex       sync.RWMutex
	findByNameArgsForCall []struct {
		arg1 string
	}
	findByNameReturns struct {
		result1 models.QuotaFields
		result2 error
	}
	findByNameReturnsOnCall map[int]struct {
		result1 models.QuotaFields
		result2 error
	}
	UpdateStub        func(models.QuotaFields) error
	updateMutex       sync.RWMutex
	updateArgsForCall []struct {
		arg1 models.QuotaFields
	}
	updateReturns struct {
		result1 error
	}
	updateReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeQuotaRepository) AssignQuotaToOrg(arg1 string, arg2 string) error {
	fake.assignQuotaToOrgMutex.Lock()
	ret, specificReturn := fake.assignQuotaToOrgReturnsOnCall[len(fake.assignQuotaToOrgArgsForCall)]
	fake.assignQuotaToOrgArgsForCall = append(fake.assignQuotaToOrgArgsForCall, struct {
		arg1 string
		arg2 string
	}{arg1, arg2})
	fake.recordInvocation("AssignQuotaToOrg", []interface{}{arg1, arg2})
	fake.assignQuotaToOrgMutex.Unlock()
	if fake.AssignQuotaToOrgStub != nil {
		return fake.AssignQuotaToOrgStub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.assignQuotaToOrgReturns
	return fakeReturns.result1
}

func (fake *FakeQuotaRepository) AssignQuotaToOrgCallCount() int {
	fake.assignQuotaToOrgMutex.RLock()
	defer fake.assignQuotaToOrgMutex.RUnlock()
	return len(fake.assignQuotaToOrgArgsForCall)
}

func (fake *FakeQuotaRepository) AssignQuotaToOrgCalls(stub func(string, string) error) {
	fake.assignQuotaToOrgMutex.Lock()
	defer fake.assignQuotaToOrgMutex.Unlock()
	fake.AssignQuotaToOrgStub = stub
}

func (fake *FakeQuotaRepository) AssignQuotaToOrgArgsForCall(i int) (string, string) {
	fake.assignQuotaToOrgMutex.RLock()
	defer fake.assignQuotaToOrgMutex.RUnlock()
	argsForCall := fake.assignQuotaToOrgArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeQuotaRepository) AssignQuotaToOrgReturns(result1 error) {
	fake.assignQuotaToOrgMutex.Lock()
	defer fake.assignQuotaToOrgMutex.Unlock()
	fake.AssignQuotaToOrgStub = nil
	fake.assignQuotaToOrgReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeQuotaRepository) AssignQuotaToOrgReturnsOnCall(i int, result1 error) {
	fake.assignQuotaToOrgMutex.Lock()
	defer fake.assignQuotaToOrgMutex.Unlock()
	fake.AssignQuotaToOrgStub = nil
	if fake.assignQuotaToOrgReturnsOnCall == nil {
		fake.assignQuotaToOrgReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.assignQuotaToOrgReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeQuotaRepository) Create(arg1 models.QuotaFields) error {
	fake.createMutex.Lock()
	ret, specificReturn := fake.createReturnsOnCall[len(fake.createArgsForCall)]
	fake.createArgsForCall = append(fake.createArgsForCall, struct {
		arg1 models.QuotaFields
	}{arg1})
	fake.recordInvocation("Create", []interface{}{arg1})
	fake.createMutex.Unlock()
	if fake.CreateStub != nil {
		return fake.CreateStub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.createReturns
	return fakeReturns.result1
}

func (fake *FakeQuotaRepository) CreateCallCount() int {
	fake.createMutex.RLock()
	defer fake.createMutex.RUnlock()
	return len(fake.createArgsForCall)
}

func (fake *FakeQuotaRepository) CreateCalls(stub func(models.QuotaFields) error) {
	fake.createMutex.Lock()
	defer fake.createMutex.Unlock()
	fake.CreateStub = stub
}

func (fake *FakeQuotaRepository) CreateArgsForCall(i int) models.QuotaFields {
	fake.createMutex.RLock()
	defer fake.createMutex.RUnlock()
	argsForCall := fake.createArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeQuotaRepository) CreateReturns(result1 error) {
	fake.createMutex.Lock()
	defer fake.createMutex.Unlock()
	fake.CreateStub = nil
	fake.createReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeQuotaRepository) CreateReturnsOnCall(i int, result1 error) {
	fake.createMutex.Lock()
	defer fake.createMutex.Unlock()
	fake.CreateStub = nil
	if fake.createReturnsOnCall == nil {
		fake.createReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.createReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeQuotaRepository) Delete(arg1 string) error {
	fake.deleteMutex.Lock()
	ret, specificReturn := fake.deleteReturnsOnCall[len(fake.deleteArgsForCall)]
	fake.deleteArgsForCall = append(fake.deleteArgsForCall, struct {
		arg1 string
	}{arg1})
	fake.recordInvocation("Delete", []interface{}{arg1})
	fake.deleteMutex.Unlock()
	if fake.DeleteStub != nil {
		return fake.DeleteStub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.deleteReturns
	return fakeReturns.result1
}

func (fake *FakeQuotaRepository) DeleteCallCount() int {
	fake.deleteMutex.RLock()
	defer fake.deleteMutex.RUnlock()
	return len(fake.deleteArgsForCall)
}

func (fake *FakeQuotaRepository) DeleteCalls(stub func(string) error) {
	fake.deleteMutex.Lock()
	defer fake.deleteMutex.Unlock()
	fake.DeleteStub = stub
}

func (fake *FakeQuotaRepository) DeleteArgsForCall(i int) string {
	fake.deleteMutex.RLock()
	defer fake.deleteMutex.RUnlock()
	argsForCall := fake.deleteArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeQuotaRepository) DeleteReturns(result1 error) {
	fake.deleteMutex.Lock()
	defer fake.deleteMutex.Unlock()
	fake.DeleteStub = nil
	fake.deleteReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeQuotaRepository) DeleteReturnsOnCall(i int, result1 error) {
	fake.deleteMutex.Lock()
	defer fake.deleteMutex.Unlock()
	fake.DeleteStub = nil
	if fake.deleteReturnsOnCall == nil {
		fake.deleteReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.deleteReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeQuotaRepository) FindAll() ([]models.QuotaFields, error) {
	fake.findAllMutex.Lock()
	ret, specificReturn := fake.findAllReturnsOnCall[len(fake.findAllArgsForCall)]
	fake.findAllArgsForCall = append(fake.findAllArgsForCall, struct {
	}{})
	fake.recordInvocation("FindAll", []interface{}{})
	fake.findAllMutex.Unlock()
	if fake.FindAllStub != nil {
		return fake.FindAllStub()
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.findAllReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeQuotaRepository) FindAllCallCount() int {
	fake.findAllMutex.RLock()
	defer fake.findAllMutex.RUnlock()
	return len(fake.findAllArgsForCall)
}

func (fake *FakeQuotaRepository) FindAllCalls(stub func() ([]models.QuotaFields, error)) {
	fake.findAllMutex.Lock()
	defer fake.findAllMutex.Unlock()
	fake.FindAllStub = stub
}

func (fake *FakeQuotaRepository) FindAllReturns(result1 []models.QuotaFields, result2 error) {
	fake.findAllMutex.Lock()
	defer fake.findAllMutex.Unlock()
	fake.FindAllStub = nil
	fake.findAllReturns = struct {
		result1 []models.QuotaFields
		result2 error
	}{result1, result2}
}

func (fake *FakeQuotaRepository) FindAllReturnsOnCall(i int, result1 []models.QuotaFields, result2 error) {
	fake.findAllMutex.Lock()
	defer fake.findAllMutex.Unlock()
	fake.FindAllStub = nil
	if fake.findAllReturnsOnCall == nil {
		fake.findAllReturnsOnCall = make(map[int]struct {
			result1 []models.QuotaFields
			result2 error
		})
	}
	fake.findAllReturnsOnCall[i] = struct {
		result1 []models.QuotaFields
		result2 error
	}{result1, result2}
}

func (fake *FakeQuotaRepository) FindByName(arg1 string) (models.QuotaFields, error) {
	fake.findByNameMutex.Lock()
	ret, specificReturn := fake.findByNameReturnsOnCall[len(fake.findByNameArgsForCall)]
	fake.findByNameArgsForCall = append(fake.findByNameArgsForCall, struct {
		arg1 string
	}{arg1})
	fake.recordInvocation("FindByName", []interface{}{arg1})
	fake.findByNameMutex.Unlock()
	if fake.FindByNameStub != nil {
		return fake.FindByNameStub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.findByNameReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeQuotaRepository) FindByNameCallCount() int {
	fake.findByNameMutex.RLock()
	defer fake.findByNameMutex.RUnlock()
	return len(fake.findByNameArgsForCall)
}

func (fake *FakeQuotaRepository) FindByNameCalls(stub func(string) (models.QuotaFields, error)) {
	fake.findByNameMutex.Lock()
	defer fake.findByNameMutex.Unlock()
	fake.FindByNameStub = stub
}

func (fake *FakeQuotaRepository) FindByNameArgsForCall(i int) string {
	fake.findByNameMutex.RLock()
	defer fake.findByNameMutex.RUnlock()
	argsForCall := fake.findByNameArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeQuotaRepository) FindByNameReturns(result1 models.QuotaFields, result2 error) {
	fake.findByNameMutex.Lock()
	defer fake.findByNameMutex.Unlock()
	fake.FindByNameStub = nil
	fake.findByNameReturns = struct {
		result1 models.QuotaFields
		result2 error
	}{result1, result2}
}

func (fake *FakeQuotaRepository) FindByNameReturnsOnCall(i int, result1 models.QuotaFields, result2 error) {
	fake.findByNameMutex.Lock()
	defer fake.findByNameMutex.Unlock()
	fake.FindByNameStub = nil
	if fake.findByNameReturnsOnCall == nil {
		fake.findByNameReturnsOnCall = make(map[int]struct {
			result1 models.QuotaFields
			result2 error
		})
	}
	fake.findByNameReturnsOnCall[i] = struct {
		result1 models.QuotaFields
		result2 error
	}{result1, result2}
}

func (fake *FakeQuotaRepository) Update(arg1 models.QuotaFields) error {
	fake.updateMutex.Lock()
	ret, specificReturn := fake.updateReturnsOnCall[len(fake.updateArgsForCall)]
	fake.updateArgsForCall = append(fake.updateArgsForCall, struct {
		arg1 models.QuotaFields
	}{arg1})
	fake.recordInvocation("Update", []interface{}{arg1})
	fake.updateMutex.Unlock()
	if fake.UpdateStub != nil {
		return fake.UpdateStub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.updateReturns
	return fakeReturns.result1
}

func (fake *FakeQuotaRepository) UpdateCallCount() int {
	fake.updateMutex.RLock()
	defer fake.updateMutex.RUnlock()
	return len(fake.updateArgsForCall)
}

func (fake *FakeQuotaRepository) UpdateCalls(stub func(models.QuotaFields) error) {
	fake.updateMutex.Lock()
	defer fake.updateMutex.Unlock()
	fake.UpdateStub = stub
}

func (fake *FakeQuotaRepository) UpdateArgsForCall(i int) models.QuotaFields {
	fake.updateMutex.RLock()
	defer fake.updateMutex.RUnlock()
	argsForCall := fake.updateArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeQuotaRepository) UpdateReturns(result1 error) {
	fake.updateMutex.Lock()
	defer fake.updateMutex.Unlock()
	fake.UpdateStub = nil
	fake.updateReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeQuotaRepository) UpdateReturnsOnCall(i int, result1 error) {
	fake.updateMutex.Lock()
	defer fake.updateMutex.Unlock()
	fake.UpdateStub = nil
	if fake.updateReturnsOnCall == nil {
		fake.updateReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.updateReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeQuotaRepository) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.assignQuotaToOrgMutex.RLock()
	defer fake.assignQuotaToOrgMutex.RUnlock()
	fake.createMutex.RLock()
	defer fake.createMutex.RUnlock()
	fake.deleteMutex.RLock()
	defer fake.deleteMutex.RUnlock()
	fake.findAllMutex.RLock()
	defer fake.findAllMutex.RUnlock()
	fake.findByNameMutex.RLock()
	defer fake.findByNameMutex.RUnlock()
	fake.updateMutex.RLock()
	defer fake.updateMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *FakeQuotaRepository) 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 _ quotas.QuotaRepository = new(FakeQuotaRepository)
