// 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/addon"
	"github.com/weaveworks/eksctl/pkg/cfn/builder"
	"github.com/weaveworks/eksctl/pkg/cfn/manager"
)

type FakeStackManager struct {
	CreateStackStub        func(context.Context, string, builder.ResourceSetReader, map[string]string, map[string]string, chan error) error
	createStackMutex       sync.RWMutex
	createStackArgsForCall []struct {
		arg1 context.Context
		arg2 string
		arg3 builder.ResourceSetReader
		arg4 map[string]string
		arg5 map[string]string
		arg6 chan error
	}
	createStackReturns struct {
		result1 error
	}
	createStackReturnsOnCall map[int]struct {
		result1 error
	}
	DeleteStackBySpecStub        func(context.Context, *types.Stack) (*types.Stack, error)
	deleteStackBySpecMutex       sync.RWMutex
	deleteStackBySpecArgsForCall []struct {
		arg1 context.Context
		arg2 *types.Stack
	}
	deleteStackBySpecReturns struct {
		result1 *types.Stack
		result2 error
	}
	deleteStackBySpecReturnsOnCall map[int]struct {
		result1 *types.Stack
		result2 error
	}
	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
	}
	GetIAMAddonsStacksStub        func(context.Context) ([]*types.Stack, error)
	getIAMAddonsStacksMutex       sync.RWMutex
	getIAMAddonsStacksArgsForCall []struct {
		arg1 context.Context
	}
	getIAMAddonsStacksReturns struct {
		result1 []*types.Stack
		result2 error
	}
	getIAMAddonsStacksReturnsOnCall map[int]struct {
		result1 []*types.Stack
		result2 error
	}
	UpdateStackStub        func(context.Context, manager.UpdateStackOptions) error
	updateStackMutex       sync.RWMutex
	updateStackArgsForCall []struct {
		arg1 context.Context
		arg2 manager.UpdateStackOptions
	}
	updateStackReturns struct {
		result1 error
	}
	updateStackReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeStackManager) CreateStack(arg1 context.Context, arg2 string, arg3 builder.ResourceSetReader, arg4 map[string]string, arg5 map[string]string, arg6 chan error) error {
	fake.createStackMutex.Lock()
	ret, specificReturn := fake.createStackReturnsOnCall[len(fake.createStackArgsForCall)]
	fake.createStackArgsForCall = append(fake.createStackArgsForCall, struct {
		arg1 context.Context
		arg2 string
		arg3 builder.ResourceSetReader
		arg4 map[string]string
		arg5 map[string]string
		arg6 chan error
	}{arg1, arg2, arg3, arg4, arg5, arg6})
	stub := fake.CreateStackStub
	fakeReturns := fake.createStackReturns
	fake.recordInvocation("CreateStack", []interface{}{arg1, arg2, arg3, arg4, arg5, arg6})
	fake.createStackMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2, arg3, arg4, arg5, arg6)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeStackManager) CreateStackCallCount() int {
	fake.createStackMutex.RLock()
	defer fake.createStackMutex.RUnlock()
	return len(fake.createStackArgsForCall)
}

func (fake *FakeStackManager) CreateStackCalls(stub func(context.Context, string, builder.ResourceSetReader, map[string]string, map[string]string, chan error) error) {
	fake.createStackMutex.Lock()
	defer fake.createStackMutex.Unlock()
	fake.CreateStackStub = stub
}

func (fake *FakeStackManager) CreateStackArgsForCall(i int) (context.Context, string, builder.ResourceSetReader, map[string]string, map[string]string, chan error) {
	fake.createStackMutex.RLock()
	defer fake.createStackMutex.RUnlock()
	argsForCall := fake.createStackArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4, argsForCall.arg5, argsForCall.arg6
}

func (fake *FakeStackManager) CreateStackReturns(result1 error) {
	fake.createStackMutex.Lock()
	defer fake.createStackMutex.Unlock()
	fake.CreateStackStub = nil
	fake.createStackReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeStackManager) CreateStackReturnsOnCall(i int, result1 error) {
	fake.createStackMutex.Lock()
	defer fake.createStackMutex.Unlock()
	fake.CreateStackStub = nil
	if fake.createStackReturnsOnCall == nil {
		fake.createStackReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.createStackReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeStackManager) DeleteStackBySpec(arg1 context.Context, arg2 *types.Stack) (*types.Stack, error) {
	fake.deleteStackBySpecMutex.Lock()
	ret, specificReturn := fake.deleteStackBySpecReturnsOnCall[len(fake.deleteStackBySpecArgsForCall)]
	fake.deleteStackBySpecArgsForCall = append(fake.deleteStackBySpecArgsForCall, struct {
		arg1 context.Context
		arg2 *types.Stack
	}{arg1, arg2})
	stub := fake.DeleteStackBySpecStub
	fakeReturns := fake.deleteStackBySpecReturns
	fake.recordInvocation("DeleteStackBySpec", []interface{}{arg1, arg2})
	fake.deleteStackBySpecMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeStackManager) DeleteStackBySpecCallCount() int {
	fake.deleteStackBySpecMutex.RLock()
	defer fake.deleteStackBySpecMutex.RUnlock()
	return len(fake.deleteStackBySpecArgsForCall)
}

func (fake *FakeStackManager) DeleteStackBySpecCalls(stub func(context.Context, *types.Stack) (*types.Stack, error)) {
	fake.deleteStackBySpecMutex.Lock()
	defer fake.deleteStackBySpecMutex.Unlock()
	fake.DeleteStackBySpecStub = stub
}

func (fake *FakeStackManager) DeleteStackBySpecArgsForCall(i int) (context.Context, *types.Stack) {
	fake.deleteStackBySpecMutex.RLock()
	defer fake.deleteStackBySpecMutex.RUnlock()
	argsForCall := fake.deleteStackBySpecArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeStackManager) DeleteStackBySpecReturns(result1 *types.Stack, result2 error) {
	fake.deleteStackBySpecMutex.Lock()
	defer fake.deleteStackBySpecMutex.Unlock()
	fake.DeleteStackBySpecStub = nil
	fake.deleteStackBySpecReturns = struct {
		result1 *types.Stack
		result2 error
	}{result1, result2}
}

func (fake *FakeStackManager) DeleteStackBySpecReturnsOnCall(i int, result1 *types.Stack, result2 error) {
	fake.deleteStackBySpecMutex.Lock()
	defer fake.deleteStackBySpecMutex.Unlock()
	fake.DeleteStackBySpecStub = nil
	if fake.deleteStackBySpecReturnsOnCall == nil {
		fake.deleteStackBySpecReturnsOnCall = make(map[int]struct {
			result1 *types.Stack
			result2 error
		})
	}
	fake.deleteStackBySpecReturnsOnCall[i] = struct {
		result1 *types.Stack
		result2 error
	}{result1, result2}
}

func (fake *FakeStackManager) 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 *FakeStackManager) DeleteStackBySpecSyncCallCount() int {
	fake.deleteStackBySpecSyncMutex.RLock()
	defer fake.deleteStackBySpecSyncMutex.RUnlock()
	return len(fake.deleteStackBySpecSyncArgsForCall)
}

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

func (fake *FakeStackManager) 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 *FakeStackManager) DeleteStackBySpecSyncReturns(result1 error) {
	fake.deleteStackBySpecSyncMutex.Lock()
	defer fake.deleteStackBySpecSyncMutex.Unlock()
	fake.DeleteStackBySpecSyncStub = nil
	fake.deleteStackBySpecSyncReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeStackManager) 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 *FakeStackManager) 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 *FakeStackManager) DescribeStackCallCount() int {
	fake.describeStackMutex.RLock()
	defer fake.describeStackMutex.RUnlock()
	return len(fake.describeStackArgsForCall)
}

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

func (fake *FakeStackManager) 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 *FakeStackManager) 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 *FakeStackManager) 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 *FakeStackManager) GetIAMAddonsStacks(arg1 context.Context) ([]*types.Stack, error) {
	fake.getIAMAddonsStacksMutex.Lock()
	ret, specificReturn := fake.getIAMAddonsStacksReturnsOnCall[len(fake.getIAMAddonsStacksArgsForCall)]
	fake.getIAMAddonsStacksArgsForCall = append(fake.getIAMAddonsStacksArgsForCall, struct {
		arg1 context.Context
	}{arg1})
	stub := fake.GetIAMAddonsStacksStub
	fakeReturns := fake.getIAMAddonsStacksReturns
	fake.recordInvocation("GetIAMAddonsStacks", []interface{}{arg1})
	fake.getIAMAddonsStacksMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeStackManager) GetIAMAddonsStacksCallCount() int {
	fake.getIAMAddonsStacksMutex.RLock()
	defer fake.getIAMAddonsStacksMutex.RUnlock()
	return len(fake.getIAMAddonsStacksArgsForCall)
}

func (fake *FakeStackManager) GetIAMAddonsStacksCalls(stub func(context.Context) ([]*types.Stack, error)) {
	fake.getIAMAddonsStacksMutex.Lock()
	defer fake.getIAMAddonsStacksMutex.Unlock()
	fake.GetIAMAddonsStacksStub = stub
}

func (fake *FakeStackManager) GetIAMAddonsStacksArgsForCall(i int) context.Context {
	fake.getIAMAddonsStacksMutex.RLock()
	defer fake.getIAMAddonsStacksMutex.RUnlock()
	argsForCall := fake.getIAMAddonsStacksArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeStackManager) GetIAMAddonsStacksReturns(result1 []*types.Stack, result2 error) {
	fake.getIAMAddonsStacksMutex.Lock()
	defer fake.getIAMAddonsStacksMutex.Unlock()
	fake.GetIAMAddonsStacksStub = nil
	fake.getIAMAddonsStacksReturns = struct {
		result1 []*types.Stack
		result2 error
	}{result1, result2}
}

func (fake *FakeStackManager) GetIAMAddonsStacksReturnsOnCall(i int, result1 []*types.Stack, result2 error) {
	fake.getIAMAddonsStacksMutex.Lock()
	defer fake.getIAMAddonsStacksMutex.Unlock()
	fake.GetIAMAddonsStacksStub = nil
	if fake.getIAMAddonsStacksReturnsOnCall == nil {
		fake.getIAMAddonsStacksReturnsOnCall = make(map[int]struct {
			result1 []*types.Stack
			result2 error
		})
	}
	fake.getIAMAddonsStacksReturnsOnCall[i] = struct {
		result1 []*types.Stack
		result2 error
	}{result1, result2}
}

func (fake *FakeStackManager) UpdateStack(arg1 context.Context, arg2 manager.UpdateStackOptions) error {
	fake.updateStackMutex.Lock()
	ret, specificReturn := fake.updateStackReturnsOnCall[len(fake.updateStackArgsForCall)]
	fake.updateStackArgsForCall = append(fake.updateStackArgsForCall, struct {
		arg1 context.Context
		arg2 manager.UpdateStackOptions
	}{arg1, arg2})
	stub := fake.UpdateStackStub
	fakeReturns := fake.updateStackReturns
	fake.recordInvocation("UpdateStack", []interface{}{arg1, arg2})
	fake.updateStackMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeStackManager) UpdateStackCallCount() int {
	fake.updateStackMutex.RLock()
	defer fake.updateStackMutex.RUnlock()
	return len(fake.updateStackArgsForCall)
}

func (fake *FakeStackManager) UpdateStackCalls(stub func(context.Context, manager.UpdateStackOptions) error) {
	fake.updateStackMutex.Lock()
	defer fake.updateStackMutex.Unlock()
	fake.UpdateStackStub = stub
}

func (fake *FakeStackManager) UpdateStackArgsForCall(i int) (context.Context, manager.UpdateStackOptions) {
	fake.updateStackMutex.RLock()
	defer fake.updateStackMutex.RUnlock()
	argsForCall := fake.updateStackArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeStackManager) UpdateStackReturns(result1 error) {
	fake.updateStackMutex.Lock()
	defer fake.updateStackMutex.Unlock()
	fake.UpdateStackStub = nil
	fake.updateStackReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeStackManager) UpdateStackReturnsOnCall(i int, result1 error) {
	fake.updateStackMutex.Lock()
	defer fake.updateStackMutex.Unlock()
	fake.UpdateStackStub = nil
	if fake.updateStackReturnsOnCall == nil {
		fake.updateStackReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.updateStackReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeStackManager) 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 *FakeStackManager) 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 _ addon.StackManager = new(FakeStackManager)
