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

import (
	"context"
	"sync"

	"github.com/aws/aws-sdk-go-v2/service/cloudformation/types"
	"github.com/weaveworks/eksctl/pkg/actions/accessentry"
)

type FakeStackRemover struct {
	DeleteStackBySpecSyncStub        func(context.Context, *types.Stack, chan error) error
	deleteStackBySpecSyncMutex       sync.RWMutex
	deleteStackBySpecSyncArgsForCall []struct {
		arg1 context.Context
		arg2 *types.Stack
		arg3 chan error
	}
	deleteStackBySpecSyncReturns struct {
		result1 error
	}
	deleteStackBySpecSyncReturnsOnCall map[int]struct {
		result1 error
	}
	DescribeStackStub        func(context.Context, *types.Stack) (*types.Stack, error)
	describeStackMutex       sync.RWMutex
	describeStackArgsForCall []struct {
		arg1 context.Context
		arg2 *types.Stack
	}
	describeStackReturns struct {
		result1 *types.Stack
		result2 error
	}
	describeStackReturnsOnCall map[int]struct {
		result1 *types.Stack
		result2 error
	}
	ListAccessEntryStackNamesStub        func(context.Context, string) ([]string, error)
	listAccessEntryStackNamesMutex       sync.RWMutex
	listAccessEntryStackNamesArgsForCall []struct {
		arg1 context.Context
		arg2 string
	}
	listAccessEntryStackNamesReturns struct {
		result1 []string
		result2 error
	}
	listAccessEntryStackNamesReturnsOnCall map[int]struct {
		result1 []string
		result2 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeStackRemover) DeleteStackBySpecSync(arg1 context.Context, arg2 *types.Stack, arg3 chan error) error {
	fake.deleteStackBySpecSyncMutex.Lock()
	ret, specificReturn := fake.deleteStackBySpecSyncReturnsOnCall[len(fake.deleteStackBySpecSyncArgsForCall)]
	fake.deleteStackBySpecSyncArgsForCall = append(fake.deleteStackBySpecSyncArgsForCall, struct {
		arg1 context.Context
		arg2 *types.Stack
		arg3 chan error
	}{arg1, arg2, arg3})
	stub := fake.DeleteStackBySpecSyncStub
	fakeReturns := fake.deleteStackBySpecSyncReturns
	fake.recordInvocation("DeleteStackBySpecSync", []interface{}{arg1, arg2, arg3})
	fake.deleteStackBySpecSyncMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2, arg3)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeStackRemover) DeleteStackBySpecSyncCallCount() int {
	fake.deleteStackBySpecSyncMutex.RLock()
	defer fake.deleteStackBySpecSyncMutex.RUnlock()
	return len(fake.deleteStackBySpecSyncArgsForCall)
}

func (fake *FakeStackRemover) DeleteStackBySpecSyncCalls(stub func(context.Context, *types.Stack, chan error) error) {
	fake.deleteStackBySpecSyncMutex.Lock()
	defer fake.deleteStackBySpecSyncMutex.Unlock()
	fake.DeleteStackBySpecSyncStub = stub
}

func (fake *FakeStackRemover) DeleteStackBySpecSyncArgsForCall(i int) (context.Context, *types.Stack, chan error) {
	fake.deleteStackBySpecSyncMutex.RLock()
	defer fake.deleteStackBySpecSyncMutex.RUnlock()
	argsForCall := fake.deleteStackBySpecSyncArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

func (fake *FakeStackRemover) DeleteStackBySpecSyncReturns(result1 error) {
	fake.deleteStackBySpecSyncMutex.Lock()
	defer fake.deleteStackBySpecSyncMutex.Unlock()
	fake.DeleteStackBySpecSyncStub = nil
	fake.deleteStackBySpecSyncReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeStackRemover) DeleteStackBySpecSyncReturnsOnCall(i int, result1 error) {
	fake.deleteStackBySpecSyncMutex.Lock()
	defer fake.deleteStackBySpecSyncMutex.Unlock()
	fake.DeleteStackBySpecSyncStub = nil
	if fake.deleteStackBySpecSyncReturnsOnCall == nil {
		fake.deleteStackBySpecSyncReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.deleteStackBySpecSyncReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeStackRemover) DescribeStack(arg1 context.Context, arg2 *types.Stack) (*types.Stack, error) {
	fake.describeStackMutex.Lock()
	ret, specificReturn := fake.describeStackReturnsOnCall[len(fake.describeStackArgsForCall)]
	fake.describeStackArgsForCall = append(fake.describeStackArgsForCall, struct {
		arg1 context.Context
		arg2 *types.Stack
	}{arg1, arg2})
	stub := fake.DescribeStackStub
	fakeReturns := fake.describeStackReturns
	fake.recordInvocation("DescribeStack", []interface{}{arg1, arg2})
	fake.describeStackMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeStackRemover) DescribeStackCallCount() int {
	fake.describeStackMutex.RLock()
	defer fake.describeStackMutex.RUnlock()
	return len(fake.describeStackArgsForCall)
}

func (fake *FakeStackRemover) DescribeStackCalls(stub func(context.Context, *types.Stack) (*types.Stack, error)) {
	fake.describeStackMutex.Lock()
	defer fake.describeStackMutex.Unlock()
	fake.DescribeStackStub = stub
}

func (fake *FakeStackRemover) DescribeStackArgsForCall(i int) (context.Context, *types.Stack) {
	fake.describeStackMutex.RLock()
	defer fake.describeStackMutex.RUnlock()
	argsForCall := fake.describeStackArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeStackRemover) DescribeStackReturns(result1 *types.Stack, result2 error) {
	fake.describeStackMutex.Lock()
	defer fake.describeStackMutex.Unlock()
	fake.DescribeStackStub = nil
	fake.describeStackReturns = struct {
		result1 *types.Stack
		result2 error
	}{result1, result2}
}

func (fake *FakeStackRemover) DescribeStackReturnsOnCall(i int, result1 *types.Stack, result2 error) {
	fake.describeStackMutex.Lock()
	defer fake.describeStackMutex.Unlock()
	fake.DescribeStackStub = nil
	if fake.describeStackReturnsOnCall == nil {
		fake.describeStackReturnsOnCall = make(map[int]struct {
			result1 *types.Stack
			result2 error
		})
	}
	fake.describeStackReturnsOnCall[i] = struct {
		result1 *types.Stack
		result2 error
	}{result1, result2}
}

func (fake *FakeStackRemover) ListAccessEntryStackNames(arg1 context.Context, arg2 string) ([]string, error) {
	fake.listAccessEntryStackNamesMutex.Lock()
	ret, specificReturn := fake.listAccessEntryStackNamesReturnsOnCall[len(fake.listAccessEntryStackNamesArgsForCall)]
	fake.listAccessEntryStackNamesArgsForCall = append(fake.listAccessEntryStackNamesArgsForCall, struct {
		arg1 context.Context
		arg2 string
	}{arg1, arg2})
	stub := fake.ListAccessEntryStackNamesStub
	fakeReturns := fake.listAccessEntryStackNamesReturns
	fake.recordInvocation("ListAccessEntryStackNames", []interface{}{arg1, arg2})
	fake.listAccessEntryStackNamesMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeStackRemover) ListAccessEntryStackNamesCallCount() int {
	fake.listAccessEntryStackNamesMutex.RLock()
	defer fake.listAccessEntryStackNamesMutex.RUnlock()
	return len(fake.listAccessEntryStackNamesArgsForCall)
}

func (fake *FakeStackRemover) ListAccessEntryStackNamesCalls(stub func(context.Context, string) ([]string, error)) {
	fake.listAccessEntryStackNamesMutex.Lock()
	defer fake.listAccessEntryStackNamesMutex.Unlock()
	fake.ListAccessEntryStackNamesStub = stub
}

func (fake *FakeStackRemover) ListAccessEntryStackNamesArgsForCall(i int) (context.Context, string) {
	fake.listAccessEntryStackNamesMutex.RLock()
	defer fake.listAccessEntryStackNamesMutex.RUnlock()
	argsForCall := fake.listAccessEntryStackNamesArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeStackRemover) ListAccessEntryStackNamesReturns(result1 []string, result2 error) {
	fake.listAccessEntryStackNamesMutex.Lock()
	defer fake.listAccessEntryStackNamesMutex.Unlock()
	fake.ListAccessEntryStackNamesStub = nil
	fake.listAccessEntryStackNamesReturns = struct {
		result1 []string
		result2 error
	}{result1, result2}
}

func (fake *FakeStackRemover) ListAccessEntryStackNamesReturnsOnCall(i int, result1 []string, result2 error) {
	fake.listAccessEntryStackNamesMutex.Lock()
	defer fake.listAccessEntryStackNamesMutex.Unlock()
	fake.ListAccessEntryStackNamesStub = nil
	if fake.listAccessEntryStackNamesReturnsOnCall == nil {
		fake.listAccessEntryStackNamesReturnsOnCall = make(map[int]struct {
			result1 []string
			result2 error
		})
	}
	fake.listAccessEntryStackNamesReturnsOnCall[i] = struct {
		result1 []string
		result2 error
	}{result1, result2}
}

func (fake *FakeStackRemover) 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 *FakeStackRemover) 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 _ accessentry.StackRemover = new(FakeStackRemover)
