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

import (
	"sync"

	"github.com/livekit/livekit-server/pkg/rtc/types"
	"github.com/livekit/protocol/livekit"
)

type FakeDataDownTrack struct {
	HandleStub        func() uint16
	handleMutex       sync.RWMutex
	handleArgsForCall []struct {
	}
	handleReturns struct {
		result1 uint16
	}
	handleReturnsOnCall map[int]struct {
		result1 uint16
	}
	PublishDataTrackStub        func() types.DataTrack
	publishDataTrackMutex       sync.RWMutex
	publishDataTrackArgsForCall []struct {
	}
	publishDataTrackReturns struct {
		result1 types.DataTrack
	}
	publishDataTrackReturnsOnCall map[int]struct {
		result1 types.DataTrack
	}
	UpdateSubscriptionOptionsStub        func(*livekit.DataTrackSubscriptionOptions)
	updateSubscriptionOptionsMutex       sync.RWMutex
	updateSubscriptionOptionsArgsForCall []struct {
		arg1 *livekit.DataTrackSubscriptionOptions
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeDataDownTrack) Handle() uint16 {
	fake.handleMutex.Lock()
	ret, specificReturn := fake.handleReturnsOnCall[len(fake.handleArgsForCall)]
	fake.handleArgsForCall = append(fake.handleArgsForCall, struct {
	}{})
	stub := fake.HandleStub
	fakeReturns := fake.handleReturns
	fake.recordInvocation("Handle", []interface{}{})
	fake.handleMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeDataDownTrack) HandleCallCount() int {
	fake.handleMutex.RLock()
	defer fake.handleMutex.RUnlock()
	return len(fake.handleArgsForCall)
}

func (fake *FakeDataDownTrack) HandleCalls(stub func() uint16) {
	fake.handleMutex.Lock()
	defer fake.handleMutex.Unlock()
	fake.HandleStub = stub
}

func (fake *FakeDataDownTrack) HandleReturns(result1 uint16) {
	fake.handleMutex.Lock()
	defer fake.handleMutex.Unlock()
	fake.HandleStub = nil
	fake.handleReturns = struct {
		result1 uint16
	}{result1}
}

func (fake *FakeDataDownTrack) HandleReturnsOnCall(i int, result1 uint16) {
	fake.handleMutex.Lock()
	defer fake.handleMutex.Unlock()
	fake.HandleStub = nil
	if fake.handleReturnsOnCall == nil {
		fake.handleReturnsOnCall = make(map[int]struct {
			result1 uint16
		})
	}
	fake.handleReturnsOnCall[i] = struct {
		result1 uint16
	}{result1}
}

func (fake *FakeDataDownTrack) PublishDataTrack() types.DataTrack {
	fake.publishDataTrackMutex.Lock()
	ret, specificReturn := fake.publishDataTrackReturnsOnCall[len(fake.publishDataTrackArgsForCall)]
	fake.publishDataTrackArgsForCall = append(fake.publishDataTrackArgsForCall, struct {
	}{})
	stub := fake.PublishDataTrackStub
	fakeReturns := fake.publishDataTrackReturns
	fake.recordInvocation("PublishDataTrack", []interface{}{})
	fake.publishDataTrackMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeDataDownTrack) PublishDataTrackCallCount() int {
	fake.publishDataTrackMutex.RLock()
	defer fake.publishDataTrackMutex.RUnlock()
	return len(fake.publishDataTrackArgsForCall)
}

func (fake *FakeDataDownTrack) PublishDataTrackCalls(stub func() types.DataTrack) {
	fake.publishDataTrackMutex.Lock()
	defer fake.publishDataTrackMutex.Unlock()
	fake.PublishDataTrackStub = stub
}

func (fake *FakeDataDownTrack) PublishDataTrackReturns(result1 types.DataTrack) {
	fake.publishDataTrackMutex.Lock()
	defer fake.publishDataTrackMutex.Unlock()
	fake.PublishDataTrackStub = nil
	fake.publishDataTrackReturns = struct {
		result1 types.DataTrack
	}{result1}
}

func (fake *FakeDataDownTrack) PublishDataTrackReturnsOnCall(i int, result1 types.DataTrack) {
	fake.publishDataTrackMutex.Lock()
	defer fake.publishDataTrackMutex.Unlock()
	fake.PublishDataTrackStub = nil
	if fake.publishDataTrackReturnsOnCall == nil {
		fake.publishDataTrackReturnsOnCall = make(map[int]struct {
			result1 types.DataTrack
		})
	}
	fake.publishDataTrackReturnsOnCall[i] = struct {
		result1 types.DataTrack
	}{result1}
}

func (fake *FakeDataDownTrack) UpdateSubscriptionOptions(arg1 *livekit.DataTrackSubscriptionOptions) {
	fake.updateSubscriptionOptionsMutex.Lock()
	fake.updateSubscriptionOptionsArgsForCall = append(fake.updateSubscriptionOptionsArgsForCall, struct {
		arg1 *livekit.DataTrackSubscriptionOptions
	}{arg1})
	stub := fake.UpdateSubscriptionOptionsStub
	fake.recordInvocation("UpdateSubscriptionOptions", []interface{}{arg1})
	fake.updateSubscriptionOptionsMutex.Unlock()
	if stub != nil {
		fake.UpdateSubscriptionOptionsStub(arg1)
	}
}

func (fake *FakeDataDownTrack) UpdateSubscriptionOptionsCallCount() int {
	fake.updateSubscriptionOptionsMutex.RLock()
	defer fake.updateSubscriptionOptionsMutex.RUnlock()
	return len(fake.updateSubscriptionOptionsArgsForCall)
}

func (fake *FakeDataDownTrack) UpdateSubscriptionOptionsCalls(stub func(*livekit.DataTrackSubscriptionOptions)) {
	fake.updateSubscriptionOptionsMutex.Lock()
	defer fake.updateSubscriptionOptionsMutex.Unlock()
	fake.UpdateSubscriptionOptionsStub = stub
}

func (fake *FakeDataDownTrack) UpdateSubscriptionOptionsArgsForCall(i int) *livekit.DataTrackSubscriptionOptions {
	fake.updateSubscriptionOptionsMutex.RLock()
	defer fake.updateSubscriptionOptionsMutex.RUnlock()
	argsForCall := fake.updateSubscriptionOptionsArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeDataDownTrack) 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 *FakeDataDownTrack) 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 _ types.DataDownTrack = new(FakeDataDownTrack)
