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

import (
	"context"
	"sync"

	"code.cloudfoundry.org/korifi/api/authorization"
	"code.cloudfoundry.org/korifi/api/handlers"
	"code.cloudfoundry.org/korifi/api/repositories"
)

type CFDropletRepository struct {
	GetDropletStub        func(context.Context, authorization.Info, string) (repositories.DropletRecord, error)
	getDropletMutex       sync.RWMutex
	getDropletArgsForCall []struct {
		arg1 context.Context
		arg2 authorization.Info
		arg3 string
	}
	getDropletReturns struct {
		result1 repositories.DropletRecord
		result2 error
	}
	getDropletReturnsOnCall map[int]struct {
		result1 repositories.DropletRecord
		result2 error
	}
	ListDropletsStub        func(context.Context, authorization.Info, repositories.ListDropletsMessage) (repositories.ListResult[repositories.DropletRecord], error)
	listDropletsMutex       sync.RWMutex
	listDropletsArgsForCall []struct {
		arg1 context.Context
		arg2 authorization.Info
		arg3 repositories.ListDropletsMessage
	}
	listDropletsReturns struct {
		result1 repositories.ListResult[repositories.DropletRecord]
		result2 error
	}
	listDropletsReturnsOnCall map[int]struct {
		result1 repositories.ListResult[repositories.DropletRecord]
		result2 error
	}
	UpdateDropletStub        func(context.Context, authorization.Info, repositories.UpdateDropletMessage) (repositories.DropletRecord, error)
	updateDropletMutex       sync.RWMutex
	updateDropletArgsForCall []struct {
		arg1 context.Context
		arg2 authorization.Info
		arg3 repositories.UpdateDropletMessage
	}
	updateDropletReturns struct {
		result1 repositories.DropletRecord
		result2 error
	}
	updateDropletReturnsOnCall map[int]struct {
		result1 repositories.DropletRecord
		result2 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *CFDropletRepository) GetDroplet(arg1 context.Context, arg2 authorization.Info, arg3 string) (repositories.DropletRecord, error) {
	fake.getDropletMutex.Lock()
	ret, specificReturn := fake.getDropletReturnsOnCall[len(fake.getDropletArgsForCall)]
	fake.getDropletArgsForCall = append(fake.getDropletArgsForCall, struct {
		arg1 context.Context
		arg2 authorization.Info
		arg3 string
	}{arg1, arg2, arg3})
	stub := fake.GetDropletStub
	fakeReturns := fake.getDropletReturns
	fake.recordInvocation("GetDroplet", []interface{}{arg1, arg2, arg3})
	fake.getDropletMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2, arg3)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *CFDropletRepository) GetDropletCallCount() int {
	fake.getDropletMutex.RLock()
	defer fake.getDropletMutex.RUnlock()
	return len(fake.getDropletArgsForCall)
}

func (fake *CFDropletRepository) GetDropletCalls(stub func(context.Context, authorization.Info, string) (repositories.DropletRecord, error)) {
	fake.getDropletMutex.Lock()
	defer fake.getDropletMutex.Unlock()
	fake.GetDropletStub = stub
}

func (fake *CFDropletRepository) GetDropletArgsForCall(i int) (context.Context, authorization.Info, string) {
	fake.getDropletMutex.RLock()
	defer fake.getDropletMutex.RUnlock()
	argsForCall := fake.getDropletArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

func (fake *CFDropletRepository) GetDropletReturns(result1 repositories.DropletRecord, result2 error) {
	fake.getDropletMutex.Lock()
	defer fake.getDropletMutex.Unlock()
	fake.GetDropletStub = nil
	fake.getDropletReturns = struct {
		result1 repositories.DropletRecord
		result2 error
	}{result1, result2}
}

func (fake *CFDropletRepository) GetDropletReturnsOnCall(i int, result1 repositories.DropletRecord, result2 error) {
	fake.getDropletMutex.Lock()
	defer fake.getDropletMutex.Unlock()
	fake.GetDropletStub = nil
	if fake.getDropletReturnsOnCall == nil {
		fake.getDropletReturnsOnCall = make(map[int]struct {
			result1 repositories.DropletRecord
			result2 error
		})
	}
	fake.getDropletReturnsOnCall[i] = struct {
		result1 repositories.DropletRecord
		result2 error
	}{result1, result2}
}

func (fake *CFDropletRepository) ListDroplets(arg1 context.Context, arg2 authorization.Info, arg3 repositories.ListDropletsMessage) (repositories.ListResult[repositories.DropletRecord], error) {
	fake.listDropletsMutex.Lock()
	ret, specificReturn := fake.listDropletsReturnsOnCall[len(fake.listDropletsArgsForCall)]
	fake.listDropletsArgsForCall = append(fake.listDropletsArgsForCall, struct {
		arg1 context.Context
		arg2 authorization.Info
		arg3 repositories.ListDropletsMessage
	}{arg1, arg2, arg3})
	stub := fake.ListDropletsStub
	fakeReturns := fake.listDropletsReturns
	fake.recordInvocation("ListDroplets", []interface{}{arg1, arg2, arg3})
	fake.listDropletsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2, arg3)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *CFDropletRepository) ListDropletsCallCount() int {
	fake.listDropletsMutex.RLock()
	defer fake.listDropletsMutex.RUnlock()
	return len(fake.listDropletsArgsForCall)
}

func (fake *CFDropletRepository) ListDropletsCalls(stub func(context.Context, authorization.Info, repositories.ListDropletsMessage) (repositories.ListResult[repositories.DropletRecord], error)) {
	fake.listDropletsMutex.Lock()
	defer fake.listDropletsMutex.Unlock()
	fake.ListDropletsStub = stub
}

func (fake *CFDropletRepository) ListDropletsArgsForCall(i int) (context.Context, authorization.Info, repositories.ListDropletsMessage) {
	fake.listDropletsMutex.RLock()
	defer fake.listDropletsMutex.RUnlock()
	argsForCall := fake.listDropletsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

func (fake *CFDropletRepository) ListDropletsReturns(result1 repositories.ListResult[repositories.DropletRecord], result2 error) {
	fake.listDropletsMutex.Lock()
	defer fake.listDropletsMutex.Unlock()
	fake.ListDropletsStub = nil
	fake.listDropletsReturns = struct {
		result1 repositories.ListResult[repositories.DropletRecord]
		result2 error
	}{result1, result2}
}

func (fake *CFDropletRepository) ListDropletsReturnsOnCall(i int, result1 repositories.ListResult[repositories.DropletRecord], result2 error) {
	fake.listDropletsMutex.Lock()
	defer fake.listDropletsMutex.Unlock()
	fake.ListDropletsStub = nil
	if fake.listDropletsReturnsOnCall == nil {
		fake.listDropletsReturnsOnCall = make(map[int]struct {
			result1 repositories.ListResult[repositories.DropletRecord]
			result2 error
		})
	}
	fake.listDropletsReturnsOnCall[i] = struct {
		result1 repositories.ListResult[repositories.DropletRecord]
		result2 error
	}{result1, result2}
}

func (fake *CFDropletRepository) UpdateDroplet(arg1 context.Context, arg2 authorization.Info, arg3 repositories.UpdateDropletMessage) (repositories.DropletRecord, error) {
	fake.updateDropletMutex.Lock()
	ret, specificReturn := fake.updateDropletReturnsOnCall[len(fake.updateDropletArgsForCall)]
	fake.updateDropletArgsForCall = append(fake.updateDropletArgsForCall, struct {
		arg1 context.Context
		arg2 authorization.Info
		arg3 repositories.UpdateDropletMessage
	}{arg1, arg2, arg3})
	stub := fake.UpdateDropletStub
	fakeReturns := fake.updateDropletReturns
	fake.recordInvocation("UpdateDroplet", []interface{}{arg1, arg2, arg3})
	fake.updateDropletMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2, arg3)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *CFDropletRepository) UpdateDropletCallCount() int {
	fake.updateDropletMutex.RLock()
	defer fake.updateDropletMutex.RUnlock()
	return len(fake.updateDropletArgsForCall)
}

func (fake *CFDropletRepository) UpdateDropletCalls(stub func(context.Context, authorization.Info, repositories.UpdateDropletMessage) (repositories.DropletRecord, error)) {
	fake.updateDropletMutex.Lock()
	defer fake.updateDropletMutex.Unlock()
	fake.UpdateDropletStub = stub
}

func (fake *CFDropletRepository) UpdateDropletArgsForCall(i int) (context.Context, authorization.Info, repositories.UpdateDropletMessage) {
	fake.updateDropletMutex.RLock()
	defer fake.updateDropletMutex.RUnlock()
	argsForCall := fake.updateDropletArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

func (fake *CFDropletRepository) UpdateDropletReturns(result1 repositories.DropletRecord, result2 error) {
	fake.updateDropletMutex.Lock()
	defer fake.updateDropletMutex.Unlock()
	fake.UpdateDropletStub = nil
	fake.updateDropletReturns = struct {
		result1 repositories.DropletRecord
		result2 error
	}{result1, result2}
}

func (fake *CFDropletRepository) UpdateDropletReturnsOnCall(i int, result1 repositories.DropletRecord, result2 error) {
	fake.updateDropletMutex.Lock()
	defer fake.updateDropletMutex.Unlock()
	fake.UpdateDropletStub = nil
	if fake.updateDropletReturnsOnCall == nil {
		fake.updateDropletReturnsOnCall = make(map[int]struct {
			result1 repositories.DropletRecord
			result2 error
		})
	}
	fake.updateDropletReturnsOnCall[i] = struct {
		result1 repositories.DropletRecord
		result2 error
	}{result1, result2}
}

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

func (fake *CFDropletRepository) 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 _ handlers.CFDropletRepository = new(CFDropletRepository)
