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

import (
	"sync"

	"github.com/weaveworks/eksctl/pkg/actions/nodegroup"
	"github.com/weaveworks/eksctl/pkg/apis/eksctl.io/v1alpha5"
)

type FakeAuthConfigMapUpdater struct {
	RemoveNodeGroupStub        func(*v1alpha5.NodeGroup) error
	removeNodeGroupMutex       sync.RWMutex
	removeNodeGroupArgsForCall []struct {
		arg1 *v1alpha5.NodeGroup
	}
	removeNodeGroupReturns struct {
		result1 error
	}
	removeNodeGroupReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeAuthConfigMapUpdater) RemoveNodeGroup(arg1 *v1alpha5.NodeGroup) error {
	fake.removeNodeGroupMutex.Lock()
	ret, specificReturn := fake.removeNodeGroupReturnsOnCall[len(fake.removeNodeGroupArgsForCall)]
	fake.removeNodeGroupArgsForCall = append(fake.removeNodeGroupArgsForCall, struct {
		arg1 *v1alpha5.NodeGroup
	}{arg1})
	stub := fake.RemoveNodeGroupStub
	fakeReturns := fake.removeNodeGroupReturns
	fake.recordInvocation("RemoveNodeGroup", []interface{}{arg1})
	fake.removeNodeGroupMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeAuthConfigMapUpdater) RemoveNodeGroupCallCount() int {
	fake.removeNodeGroupMutex.RLock()
	defer fake.removeNodeGroupMutex.RUnlock()
	return len(fake.removeNodeGroupArgsForCall)
}

func (fake *FakeAuthConfigMapUpdater) RemoveNodeGroupCalls(stub func(*v1alpha5.NodeGroup) error) {
	fake.removeNodeGroupMutex.Lock()
	defer fake.removeNodeGroupMutex.Unlock()
	fake.RemoveNodeGroupStub = stub
}

func (fake *FakeAuthConfigMapUpdater) RemoveNodeGroupArgsForCall(i int) *v1alpha5.NodeGroup {
	fake.removeNodeGroupMutex.RLock()
	defer fake.removeNodeGroupMutex.RUnlock()
	argsForCall := fake.removeNodeGroupArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeAuthConfigMapUpdater) RemoveNodeGroupReturns(result1 error) {
	fake.removeNodeGroupMutex.Lock()
	defer fake.removeNodeGroupMutex.Unlock()
	fake.RemoveNodeGroupStub = nil
	fake.removeNodeGroupReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeAuthConfigMapUpdater) RemoveNodeGroupReturnsOnCall(i int, result1 error) {
	fake.removeNodeGroupMutex.Lock()
	defer fake.removeNodeGroupMutex.Unlock()
	fake.RemoveNodeGroupStub = nil
	if fake.removeNodeGroupReturnsOnCall == nil {
		fake.removeNodeGroupReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.removeNodeGroupReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

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

func (fake *FakeAuthConfigMapUpdater) 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 _ nodegroup.AuthConfigMapUpdater = new(FakeAuthConfigMapUpdater)
