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

import (
	"context"
	"sync"

	"github.com/aws/aws-sdk-go-v2/service/eks"
	"github.com/weaveworks/eksctl/pkg/cfn/manager"
)

type FakeNodeGroupDeleter struct {
	DeleteNodegroupStub        func(context.Context, *eks.DeleteNodegroupInput, ...func(*eks.Options)) (*eks.DeleteNodegroupOutput, error)
	deleteNodegroupMutex       sync.RWMutex
	deleteNodegroupArgsForCall []struct {
		arg1 context.Context
		arg2 *eks.DeleteNodegroupInput
		arg3 []func(*eks.Options)
	}
	deleteNodegroupReturns struct {
		result1 *eks.DeleteNodegroupOutput
		result2 error
	}
	deleteNodegroupReturnsOnCall map[int]struct {
		result1 *eks.DeleteNodegroupOutput
		result2 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeNodeGroupDeleter) DeleteNodegroup(arg1 context.Context, arg2 *eks.DeleteNodegroupInput, arg3 ...func(*eks.Options)) (*eks.DeleteNodegroupOutput, error) {
	fake.deleteNodegroupMutex.Lock()
	ret, specificReturn := fake.deleteNodegroupReturnsOnCall[len(fake.deleteNodegroupArgsForCall)]
	fake.deleteNodegroupArgsForCall = append(fake.deleteNodegroupArgsForCall, struct {
		arg1 context.Context
		arg2 *eks.DeleteNodegroupInput
		arg3 []func(*eks.Options)
	}{arg1, arg2, arg3})
	stub := fake.DeleteNodegroupStub
	fakeReturns := fake.deleteNodegroupReturns
	fake.recordInvocation("DeleteNodegroup", []interface{}{arg1, arg2, arg3})
	fake.deleteNodegroupMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2, arg3...)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeNodeGroupDeleter) DeleteNodegroupCallCount() int {
	fake.deleteNodegroupMutex.RLock()
	defer fake.deleteNodegroupMutex.RUnlock()
	return len(fake.deleteNodegroupArgsForCall)
}

func (fake *FakeNodeGroupDeleter) DeleteNodegroupCalls(stub func(context.Context, *eks.DeleteNodegroupInput, ...func(*eks.Options)) (*eks.DeleteNodegroupOutput, error)) {
	fake.deleteNodegroupMutex.Lock()
	defer fake.deleteNodegroupMutex.Unlock()
	fake.DeleteNodegroupStub = stub
}

func (fake *FakeNodeGroupDeleter) DeleteNodegroupArgsForCall(i int) (context.Context, *eks.DeleteNodegroupInput, []func(*eks.Options)) {
	fake.deleteNodegroupMutex.RLock()
	defer fake.deleteNodegroupMutex.RUnlock()
	argsForCall := fake.deleteNodegroupArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

func (fake *FakeNodeGroupDeleter) DeleteNodegroupReturns(result1 *eks.DeleteNodegroupOutput, result2 error) {
	fake.deleteNodegroupMutex.Lock()
	defer fake.deleteNodegroupMutex.Unlock()
	fake.DeleteNodegroupStub = nil
	fake.deleteNodegroupReturns = struct {
		result1 *eks.DeleteNodegroupOutput
		result2 error
	}{result1, result2}
}

func (fake *FakeNodeGroupDeleter) DeleteNodegroupReturnsOnCall(i int, result1 *eks.DeleteNodegroupOutput, result2 error) {
	fake.deleteNodegroupMutex.Lock()
	defer fake.deleteNodegroupMutex.Unlock()
	fake.DeleteNodegroupStub = nil
	if fake.deleteNodegroupReturnsOnCall == nil {
		fake.deleteNodegroupReturnsOnCall = make(map[int]struct {
			result1 *eks.DeleteNodegroupOutput
			result2 error
		})
	}
	fake.deleteNodegroupReturnsOnCall[i] = struct {
		result1 *eks.DeleteNodegroupOutput
		result2 error
	}{result1, result2}
}

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

func (fake *FakeNodeGroupDeleter) 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 _ manager.NodeGroupDeleter = new(FakeNodeGroupDeleter)
