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

import (
	"sync"

	"code.cloudfoundry.org/cli/cf/commands/service"
	"code.cloudfoundry.org/cli/cf/models"
)

type FakeRouteServiceUnbinder struct {
	UnbindRouteStub        func(models.Route, models.ServiceInstance) error
	unbindRouteMutex       sync.RWMutex
	unbindRouteArgsForCall []struct {
		arg1 models.Route
		arg2 models.ServiceInstance
	}
	unbindRouteReturns struct {
		result1 error
	}
	unbindRouteReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeRouteServiceUnbinder) UnbindRoute(arg1 models.Route, arg2 models.ServiceInstance) error {
	fake.unbindRouteMutex.Lock()
	ret, specificReturn := fake.unbindRouteReturnsOnCall[len(fake.unbindRouteArgsForCall)]
	fake.unbindRouteArgsForCall = append(fake.unbindRouteArgsForCall, struct {
		arg1 models.Route
		arg2 models.ServiceInstance
	}{arg1, arg2})
	fake.recordInvocation("UnbindRoute", []interface{}{arg1, arg2})
	fake.unbindRouteMutex.Unlock()
	if fake.UnbindRouteStub != nil {
		return fake.UnbindRouteStub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.unbindRouteReturns
	return fakeReturns.result1
}

func (fake *FakeRouteServiceUnbinder) UnbindRouteCallCount() int {
	fake.unbindRouteMutex.RLock()
	defer fake.unbindRouteMutex.RUnlock()
	return len(fake.unbindRouteArgsForCall)
}

func (fake *FakeRouteServiceUnbinder) UnbindRouteCalls(stub func(models.Route, models.ServiceInstance) error) {
	fake.unbindRouteMutex.Lock()
	defer fake.unbindRouteMutex.Unlock()
	fake.UnbindRouteStub = stub
}

func (fake *FakeRouteServiceUnbinder) UnbindRouteArgsForCall(i int) (models.Route, models.ServiceInstance) {
	fake.unbindRouteMutex.RLock()
	defer fake.unbindRouteMutex.RUnlock()
	argsForCall := fake.unbindRouteArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeRouteServiceUnbinder) UnbindRouteReturns(result1 error) {
	fake.unbindRouteMutex.Lock()
	defer fake.unbindRouteMutex.Unlock()
	fake.UnbindRouteStub = nil
	fake.unbindRouteReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeRouteServiceUnbinder) UnbindRouteReturnsOnCall(i int, result1 error) {
	fake.unbindRouteMutex.Lock()
	defer fake.unbindRouteMutex.Unlock()
	fake.UnbindRouteStub = nil
	if fake.unbindRouteReturnsOnCall == nil {
		fake.unbindRouteReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.unbindRouteReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

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

func (fake *FakeRouteServiceUnbinder) 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 _ service.RouteServiceUnbinder = new(FakeRouteServiceUnbinder)
