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

import (
	"sync"

	"code.cloudfoundry.org/cli/cf/configuration"
)

type FakeDataInterface struct {
	JSONMarshalV3Stub        func() ([]byte, error)
	jSONMarshalV3Mutex       sync.RWMutex
	jSONMarshalV3ArgsForCall []struct {
	}
	jSONMarshalV3Returns struct {
		result1 []byte
		result2 error
	}
	jSONMarshalV3ReturnsOnCall map[int]struct {
		result1 []byte
		result2 error
	}
	JSONUnmarshalV3Stub        func([]byte) error
	jSONUnmarshalV3Mutex       sync.RWMutex
	jSONUnmarshalV3ArgsForCall []struct {
		arg1 []byte
	}
	jSONUnmarshalV3Returns struct {
		result1 error
	}
	jSONUnmarshalV3ReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeDataInterface) JSONMarshalV3() ([]byte, error) {
	fake.jSONMarshalV3Mutex.Lock()
	ret, specificReturn := fake.jSONMarshalV3ReturnsOnCall[len(fake.jSONMarshalV3ArgsForCall)]
	fake.jSONMarshalV3ArgsForCall = append(fake.jSONMarshalV3ArgsForCall, struct {
	}{})
	fake.recordInvocation("JSONMarshalV3", []interface{}{})
	fake.jSONMarshalV3Mutex.Unlock()
	if fake.JSONMarshalV3Stub != nil {
		return fake.JSONMarshalV3Stub()
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.jSONMarshalV3Returns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeDataInterface) JSONMarshalV3CallCount() int {
	fake.jSONMarshalV3Mutex.RLock()
	defer fake.jSONMarshalV3Mutex.RUnlock()
	return len(fake.jSONMarshalV3ArgsForCall)
}

func (fake *FakeDataInterface) JSONMarshalV3Calls(stub func() ([]byte, error)) {
	fake.jSONMarshalV3Mutex.Lock()
	defer fake.jSONMarshalV3Mutex.Unlock()
	fake.JSONMarshalV3Stub = stub
}

func (fake *FakeDataInterface) JSONMarshalV3Returns(result1 []byte, result2 error) {
	fake.jSONMarshalV3Mutex.Lock()
	defer fake.jSONMarshalV3Mutex.Unlock()
	fake.JSONMarshalV3Stub = nil
	fake.jSONMarshalV3Returns = struct {
		result1 []byte
		result2 error
	}{result1, result2}
}

func (fake *FakeDataInterface) JSONMarshalV3ReturnsOnCall(i int, result1 []byte, result2 error) {
	fake.jSONMarshalV3Mutex.Lock()
	defer fake.jSONMarshalV3Mutex.Unlock()
	fake.JSONMarshalV3Stub = nil
	if fake.jSONMarshalV3ReturnsOnCall == nil {
		fake.jSONMarshalV3ReturnsOnCall = make(map[int]struct {
			result1 []byte
			result2 error
		})
	}
	fake.jSONMarshalV3ReturnsOnCall[i] = struct {
		result1 []byte
		result2 error
	}{result1, result2}
}

func (fake *FakeDataInterface) JSONUnmarshalV3(arg1 []byte) error {
	var arg1Copy []byte
	if arg1 != nil {
		arg1Copy = make([]byte, len(arg1))
		copy(arg1Copy, arg1)
	}
	fake.jSONUnmarshalV3Mutex.Lock()
	ret, specificReturn := fake.jSONUnmarshalV3ReturnsOnCall[len(fake.jSONUnmarshalV3ArgsForCall)]
	fake.jSONUnmarshalV3ArgsForCall = append(fake.jSONUnmarshalV3ArgsForCall, struct {
		arg1 []byte
	}{arg1Copy})
	fake.recordInvocation("JSONUnmarshalV3", []interface{}{arg1Copy})
	fake.jSONUnmarshalV3Mutex.Unlock()
	if fake.JSONUnmarshalV3Stub != nil {
		return fake.JSONUnmarshalV3Stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.jSONUnmarshalV3Returns
	return fakeReturns.result1
}

func (fake *FakeDataInterface) JSONUnmarshalV3CallCount() int {
	fake.jSONUnmarshalV3Mutex.RLock()
	defer fake.jSONUnmarshalV3Mutex.RUnlock()
	return len(fake.jSONUnmarshalV3ArgsForCall)
}

func (fake *FakeDataInterface) JSONUnmarshalV3Calls(stub func([]byte) error) {
	fake.jSONUnmarshalV3Mutex.Lock()
	defer fake.jSONUnmarshalV3Mutex.Unlock()
	fake.JSONUnmarshalV3Stub = stub
}

func (fake *FakeDataInterface) JSONUnmarshalV3ArgsForCall(i int) []byte {
	fake.jSONUnmarshalV3Mutex.RLock()
	defer fake.jSONUnmarshalV3Mutex.RUnlock()
	argsForCall := fake.jSONUnmarshalV3ArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeDataInterface) JSONUnmarshalV3Returns(result1 error) {
	fake.jSONUnmarshalV3Mutex.Lock()
	defer fake.jSONUnmarshalV3Mutex.Unlock()
	fake.JSONUnmarshalV3Stub = nil
	fake.jSONUnmarshalV3Returns = struct {
		result1 error
	}{result1}
}

func (fake *FakeDataInterface) JSONUnmarshalV3ReturnsOnCall(i int, result1 error) {
	fake.jSONUnmarshalV3Mutex.Lock()
	defer fake.jSONUnmarshalV3Mutex.Unlock()
	fake.JSONUnmarshalV3Stub = nil
	if fake.jSONUnmarshalV3ReturnsOnCall == nil {
		fake.jSONUnmarshalV3ReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.jSONUnmarshalV3ReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

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

func (fake *FakeDataInterface) 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 _ configuration.DataInterface = new(FakeDataInterface)
