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

import (
	"context"
	"sync"

	"github.com/weaveworks/eksctl/pkg/actions/label"
)

type FakeService struct {
	GetLabelsStub        func(context.Context, string) (map[string]string, error)
	getLabelsMutex       sync.RWMutex
	getLabelsArgsForCall []struct {
		arg1 context.Context
		arg2 string
	}
	getLabelsReturns struct {
		result1 map[string]string
		result2 error
	}
	getLabelsReturnsOnCall map[int]struct {
		result1 map[string]string
		result2 error
	}
	UpdateLabelsStub        func(context.Context, string, map[string]string, []string) error
	updateLabelsMutex       sync.RWMutex
	updateLabelsArgsForCall []struct {
		arg1 context.Context
		arg2 string
		arg3 map[string]string
		arg4 []string
	}
	updateLabelsReturns struct {
		result1 error
	}
	updateLabelsReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeService) GetLabels(arg1 context.Context, arg2 string) (map[string]string, error) {
	fake.getLabelsMutex.Lock()
	ret, specificReturn := fake.getLabelsReturnsOnCall[len(fake.getLabelsArgsForCall)]
	fake.getLabelsArgsForCall = append(fake.getLabelsArgsForCall, struct {
		arg1 context.Context
		arg2 string
	}{arg1, arg2})
	stub := fake.GetLabelsStub
	fakeReturns := fake.getLabelsReturns
	fake.recordInvocation("GetLabels", []interface{}{arg1, arg2})
	fake.getLabelsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeService) GetLabelsCallCount() int {
	fake.getLabelsMutex.RLock()
	defer fake.getLabelsMutex.RUnlock()
	return len(fake.getLabelsArgsForCall)
}

func (fake *FakeService) GetLabelsCalls(stub func(context.Context, string) (map[string]string, error)) {
	fake.getLabelsMutex.Lock()
	defer fake.getLabelsMutex.Unlock()
	fake.GetLabelsStub = stub
}

func (fake *FakeService) GetLabelsArgsForCall(i int) (context.Context, string) {
	fake.getLabelsMutex.RLock()
	defer fake.getLabelsMutex.RUnlock()
	argsForCall := fake.getLabelsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeService) GetLabelsReturns(result1 map[string]string, result2 error) {
	fake.getLabelsMutex.Lock()
	defer fake.getLabelsMutex.Unlock()
	fake.GetLabelsStub = nil
	fake.getLabelsReturns = struct {
		result1 map[string]string
		result2 error
	}{result1, result2}
}

func (fake *FakeService) GetLabelsReturnsOnCall(i int, result1 map[string]string, result2 error) {
	fake.getLabelsMutex.Lock()
	defer fake.getLabelsMutex.Unlock()
	fake.GetLabelsStub = nil
	if fake.getLabelsReturnsOnCall == nil {
		fake.getLabelsReturnsOnCall = make(map[int]struct {
			result1 map[string]string
			result2 error
		})
	}
	fake.getLabelsReturnsOnCall[i] = struct {
		result1 map[string]string
		result2 error
	}{result1, result2}
}

func (fake *FakeService) UpdateLabels(arg1 context.Context, arg2 string, arg3 map[string]string, arg4 []string) error {
	var arg4Copy []string
	if arg4 != nil {
		arg4Copy = make([]string, len(arg4))
		copy(arg4Copy, arg4)
	}
	fake.updateLabelsMutex.Lock()
	ret, specificReturn := fake.updateLabelsReturnsOnCall[len(fake.updateLabelsArgsForCall)]
	fake.updateLabelsArgsForCall = append(fake.updateLabelsArgsForCall, struct {
		arg1 context.Context
		arg2 string
		arg3 map[string]string
		arg4 []string
	}{arg1, arg2, arg3, arg4Copy})
	stub := fake.UpdateLabelsStub
	fakeReturns := fake.updateLabelsReturns
	fake.recordInvocation("UpdateLabels", []interface{}{arg1, arg2, arg3, arg4Copy})
	fake.updateLabelsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2, arg3, arg4)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeService) UpdateLabelsCallCount() int {
	fake.updateLabelsMutex.RLock()
	defer fake.updateLabelsMutex.RUnlock()
	return len(fake.updateLabelsArgsForCall)
}

func (fake *FakeService) UpdateLabelsCalls(stub func(context.Context, string, map[string]string, []string) error) {
	fake.updateLabelsMutex.Lock()
	defer fake.updateLabelsMutex.Unlock()
	fake.UpdateLabelsStub = stub
}

func (fake *FakeService) UpdateLabelsArgsForCall(i int) (context.Context, string, map[string]string, []string) {
	fake.updateLabelsMutex.RLock()
	defer fake.updateLabelsMutex.RUnlock()
	argsForCall := fake.updateLabelsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4
}

func (fake *FakeService) UpdateLabelsReturns(result1 error) {
	fake.updateLabelsMutex.Lock()
	defer fake.updateLabelsMutex.Unlock()
	fake.UpdateLabelsStub = nil
	fake.updateLabelsReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeService) UpdateLabelsReturnsOnCall(i int, result1 error) {
	fake.updateLabelsMutex.Lock()
	defer fake.updateLabelsMutex.Unlock()
	fake.UpdateLabelsStub = nil
	if fake.updateLabelsReturnsOnCall == nil {
		fake.updateLabelsReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.updateLabelsReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeService) 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 *FakeService) 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 _ label.Service = new(FakeService)
