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

import (
	"sync"

	"code.cloudfoundry.org/cli/plugin"
)

type VersionGetter struct {
	GetStub        func() plugin.VersionType
	getMutex       sync.RWMutex
	getArgsForCall []struct{}
	getReturns     struct {
		result1 plugin.VersionType
	}
	getReturnsOnCall map[int]struct {
		result1 plugin.VersionType
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *VersionGetter) Get() plugin.VersionType {
	fake.getMutex.Lock()
	ret, specificReturn := fake.getReturnsOnCall[len(fake.getArgsForCall)]
	fake.getArgsForCall = append(fake.getArgsForCall, struct{}{})
	fake.recordInvocation("Get", []interface{}{})
	fake.getMutex.Unlock()
	if fake.GetStub != nil {
		return fake.GetStub()
	}
	if specificReturn {
		return ret.result1
	}
	return fake.getReturns.result1
}

func (fake *VersionGetter) GetCallCount() int {
	fake.getMutex.RLock()
	defer fake.getMutex.RUnlock()
	return len(fake.getArgsForCall)
}

func (fake *VersionGetter) GetReturns(result1 plugin.VersionType) {
	fake.GetStub = nil
	fake.getReturns = struct {
		result1 plugin.VersionType
	}{result1}
}

func (fake *VersionGetter) GetReturnsOnCall(i int, result1 plugin.VersionType) {
	fake.GetStub = nil
	if fake.getReturnsOnCall == nil {
		fake.getReturnsOnCall = make(map[int]struct {
			result1 plugin.VersionType
		})
	}
	fake.getReturnsOnCall[i] = struct {
		result1 plugin.VersionType
	}{result1}
}

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

func (fake *VersionGetter) 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)
}
