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

import (
	"context"
	"sync"
	"time"

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

type DeletionRepository struct {
	GetDeletedAtStub        func(context.Context, authorization.Info, string) (*time.Time, error)
	getDeletedAtMutex       sync.RWMutex
	getDeletedAtArgsForCall []struct {
		arg1 context.Context
		arg2 authorization.Info
		arg3 string
	}
	getDeletedAtReturns struct {
		result1 *time.Time
		result2 error
	}
	getDeletedAtReturnsOnCall map[int]struct {
		result1 *time.Time
		result2 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *DeletionRepository) GetDeletedAt(arg1 context.Context, arg2 authorization.Info, arg3 string) (*time.Time, error) {
	fake.getDeletedAtMutex.Lock()
	ret, specificReturn := fake.getDeletedAtReturnsOnCall[len(fake.getDeletedAtArgsForCall)]
	fake.getDeletedAtArgsForCall = append(fake.getDeletedAtArgsForCall, struct {
		arg1 context.Context
		arg2 authorization.Info
		arg3 string
	}{arg1, arg2, arg3})
	stub := fake.GetDeletedAtStub
	fakeReturns := fake.getDeletedAtReturns
	fake.recordInvocation("GetDeletedAt", []interface{}{arg1, arg2, arg3})
	fake.getDeletedAtMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2, arg3)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *DeletionRepository) GetDeletedAtCallCount() int {
	fake.getDeletedAtMutex.RLock()
	defer fake.getDeletedAtMutex.RUnlock()
	return len(fake.getDeletedAtArgsForCall)
}

func (fake *DeletionRepository) GetDeletedAtCalls(stub func(context.Context, authorization.Info, string) (*time.Time, error)) {
	fake.getDeletedAtMutex.Lock()
	defer fake.getDeletedAtMutex.Unlock()
	fake.GetDeletedAtStub = stub
}

func (fake *DeletionRepository) GetDeletedAtArgsForCall(i int) (context.Context, authorization.Info, string) {
	fake.getDeletedAtMutex.RLock()
	defer fake.getDeletedAtMutex.RUnlock()
	argsForCall := fake.getDeletedAtArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

func (fake *DeletionRepository) GetDeletedAtReturns(result1 *time.Time, result2 error) {
	fake.getDeletedAtMutex.Lock()
	defer fake.getDeletedAtMutex.Unlock()
	fake.GetDeletedAtStub = nil
	fake.getDeletedAtReturns = struct {
		result1 *time.Time
		result2 error
	}{result1, result2}
}

func (fake *DeletionRepository) GetDeletedAtReturnsOnCall(i int, result1 *time.Time, result2 error) {
	fake.getDeletedAtMutex.Lock()
	defer fake.getDeletedAtMutex.Unlock()
	fake.GetDeletedAtStub = nil
	if fake.getDeletedAtReturnsOnCall == nil {
		fake.getDeletedAtReturnsOnCall = make(map[int]struct {
			result1 *time.Time
			result2 error
		})
	}
	fake.getDeletedAtReturnsOnCall[i] = struct {
		result1 *time.Time
		result2 error
	}{result1, result2}
}

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