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

import (
	"context"
	"sync"

	"github.com/livekit/protocol/rpc"
	"github.com/livekit/psrpc"
	"google.golang.org/protobuf/types/known/emptypb"
)

type FakeTypedWHIPParticipantClient struct {
	CloseStub        func()
	closeMutex       sync.RWMutex
	closeArgsForCall []struct {
	}
	DeleteSessionStub        func(context.Context, rpc.ParticipantTopic, *rpc.WHIPParticipantDeleteSessionRequest, ...psrpc.RequestOption) (*emptypb.Empty, error)
	deleteSessionMutex       sync.RWMutex
	deleteSessionArgsForCall []struct {
		arg1 context.Context
		arg2 rpc.ParticipantTopic
		arg3 *rpc.WHIPParticipantDeleteSessionRequest
		arg4 []psrpc.RequestOption
	}
	deleteSessionReturns struct {
		result1 *emptypb.Empty
		result2 error
	}
	deleteSessionReturnsOnCall map[int]struct {
		result1 *emptypb.Empty
		result2 error
	}
	ICERestartStub        func(context.Context, rpc.ParticipantTopic, *rpc.WHIPParticipantICERestartRequest, ...psrpc.RequestOption) (*rpc.WHIPParticipantICERestartResponse, error)
	iCERestartMutex       sync.RWMutex
	iCERestartArgsForCall []struct {
		arg1 context.Context
		arg2 rpc.ParticipantTopic
		arg3 *rpc.WHIPParticipantICERestartRequest
		arg4 []psrpc.RequestOption
	}
	iCERestartReturns struct {
		result1 *rpc.WHIPParticipantICERestartResponse
		result2 error
	}
	iCERestartReturnsOnCall map[int]struct {
		result1 *rpc.WHIPParticipantICERestartResponse
		result2 error
	}
	ICETrickleStub        func(context.Context, rpc.ParticipantTopic, *rpc.WHIPParticipantICETrickleRequest, ...psrpc.RequestOption) (*emptypb.Empty, error)
	iCETrickleMutex       sync.RWMutex
	iCETrickleArgsForCall []struct {
		arg1 context.Context
		arg2 rpc.ParticipantTopic
		arg3 *rpc.WHIPParticipantICETrickleRequest
		arg4 []psrpc.RequestOption
	}
	iCETrickleReturns struct {
		result1 *emptypb.Empty
		result2 error
	}
	iCETrickleReturnsOnCall map[int]struct {
		result1 *emptypb.Empty
		result2 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeTypedWHIPParticipantClient) Close() {
	fake.closeMutex.Lock()
	fake.closeArgsForCall = append(fake.closeArgsForCall, struct {
	}{})
	stub := fake.CloseStub
	fake.recordInvocation("Close", []interface{}{})
	fake.closeMutex.Unlock()
	if stub != nil {
		fake.CloseStub()
	}
}

func (fake *FakeTypedWHIPParticipantClient) CloseCallCount() int {
	fake.closeMutex.RLock()
	defer fake.closeMutex.RUnlock()
	return len(fake.closeArgsForCall)
}

func (fake *FakeTypedWHIPParticipantClient) CloseCalls(stub func()) {
	fake.closeMutex.Lock()
	defer fake.closeMutex.Unlock()
	fake.CloseStub = stub
}

func (fake *FakeTypedWHIPParticipantClient) DeleteSession(arg1 context.Context, arg2 rpc.ParticipantTopic, arg3 *rpc.WHIPParticipantDeleteSessionRequest, arg4 ...psrpc.RequestOption) (*emptypb.Empty, error) {
	fake.deleteSessionMutex.Lock()
	ret, specificReturn := fake.deleteSessionReturnsOnCall[len(fake.deleteSessionArgsForCall)]
	fake.deleteSessionArgsForCall = append(fake.deleteSessionArgsForCall, struct {
		arg1 context.Context
		arg2 rpc.ParticipantTopic
		arg3 *rpc.WHIPParticipantDeleteSessionRequest
		arg4 []psrpc.RequestOption
	}{arg1, arg2, arg3, arg4})
	stub := fake.DeleteSessionStub
	fakeReturns := fake.deleteSessionReturns
	fake.recordInvocation("DeleteSession", []interface{}{arg1, arg2, arg3, arg4})
	fake.deleteSessionMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2, arg3, arg4...)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeTypedWHIPParticipantClient) DeleteSessionCallCount() int {
	fake.deleteSessionMutex.RLock()
	defer fake.deleteSessionMutex.RUnlock()
	return len(fake.deleteSessionArgsForCall)
}

func (fake *FakeTypedWHIPParticipantClient) DeleteSessionCalls(stub func(context.Context, rpc.ParticipantTopic, *rpc.WHIPParticipantDeleteSessionRequest, ...psrpc.RequestOption) (*emptypb.Empty, error)) {
	fake.deleteSessionMutex.Lock()
	defer fake.deleteSessionMutex.Unlock()
	fake.DeleteSessionStub = stub
}

func (fake *FakeTypedWHIPParticipantClient) DeleteSessionArgsForCall(i int) (context.Context, rpc.ParticipantTopic, *rpc.WHIPParticipantDeleteSessionRequest, []psrpc.RequestOption) {
	fake.deleteSessionMutex.RLock()
	defer fake.deleteSessionMutex.RUnlock()
	argsForCall := fake.deleteSessionArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4
}

func (fake *FakeTypedWHIPParticipantClient) DeleteSessionReturns(result1 *emptypb.Empty, result2 error) {
	fake.deleteSessionMutex.Lock()
	defer fake.deleteSessionMutex.Unlock()
	fake.DeleteSessionStub = nil
	fake.deleteSessionReturns = struct {
		result1 *emptypb.Empty
		result2 error
	}{result1, result2}
}

func (fake *FakeTypedWHIPParticipantClient) DeleteSessionReturnsOnCall(i int, result1 *emptypb.Empty, result2 error) {
	fake.deleteSessionMutex.Lock()
	defer fake.deleteSessionMutex.Unlock()
	fake.DeleteSessionStub = nil
	if fake.deleteSessionReturnsOnCall == nil {
		fake.deleteSessionReturnsOnCall = make(map[int]struct {
			result1 *emptypb.Empty
			result2 error
		})
	}
	fake.deleteSessionReturnsOnCall[i] = struct {
		result1 *emptypb.Empty
		result2 error
	}{result1, result2}
}

func (fake *FakeTypedWHIPParticipantClient) ICERestart(arg1 context.Context, arg2 rpc.ParticipantTopic, arg3 *rpc.WHIPParticipantICERestartRequest, arg4 ...psrpc.RequestOption) (*rpc.WHIPParticipantICERestartResponse, error) {
	fake.iCERestartMutex.Lock()
	ret, specificReturn := fake.iCERestartReturnsOnCall[len(fake.iCERestartArgsForCall)]
	fake.iCERestartArgsForCall = append(fake.iCERestartArgsForCall, struct {
		arg1 context.Context
		arg2 rpc.ParticipantTopic
		arg3 *rpc.WHIPParticipantICERestartRequest
		arg4 []psrpc.RequestOption
	}{arg1, arg2, arg3, arg4})
	stub := fake.ICERestartStub
	fakeReturns := fake.iCERestartReturns
	fake.recordInvocation("ICERestart", []interface{}{arg1, arg2, arg3, arg4})
	fake.iCERestartMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2, arg3, arg4...)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeTypedWHIPParticipantClient) ICERestartCallCount() int {
	fake.iCERestartMutex.RLock()
	defer fake.iCERestartMutex.RUnlock()
	return len(fake.iCERestartArgsForCall)
}

func (fake *FakeTypedWHIPParticipantClient) ICERestartCalls(stub func(context.Context, rpc.ParticipantTopic, *rpc.WHIPParticipantICERestartRequest, ...psrpc.RequestOption) (*rpc.WHIPParticipantICERestartResponse, error)) {
	fake.iCERestartMutex.Lock()
	defer fake.iCERestartMutex.Unlock()
	fake.ICERestartStub = stub
}

func (fake *FakeTypedWHIPParticipantClient) ICERestartArgsForCall(i int) (context.Context, rpc.ParticipantTopic, *rpc.WHIPParticipantICERestartRequest, []psrpc.RequestOption) {
	fake.iCERestartMutex.RLock()
	defer fake.iCERestartMutex.RUnlock()
	argsForCall := fake.iCERestartArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4
}

func (fake *FakeTypedWHIPParticipantClient) ICERestartReturns(result1 *rpc.WHIPParticipantICERestartResponse, result2 error) {
	fake.iCERestartMutex.Lock()
	defer fake.iCERestartMutex.Unlock()
	fake.ICERestartStub = nil
	fake.iCERestartReturns = struct {
		result1 *rpc.WHIPParticipantICERestartResponse
		result2 error
	}{result1, result2}
}

func (fake *FakeTypedWHIPParticipantClient) ICERestartReturnsOnCall(i int, result1 *rpc.WHIPParticipantICERestartResponse, result2 error) {
	fake.iCERestartMutex.Lock()
	defer fake.iCERestartMutex.Unlock()
	fake.ICERestartStub = nil
	if fake.iCERestartReturnsOnCall == nil {
		fake.iCERestartReturnsOnCall = make(map[int]struct {
			result1 *rpc.WHIPParticipantICERestartResponse
			result2 error
		})
	}
	fake.iCERestartReturnsOnCall[i] = struct {
		result1 *rpc.WHIPParticipantICERestartResponse
		result2 error
	}{result1, result2}
}

func (fake *FakeTypedWHIPParticipantClient) ICETrickle(arg1 context.Context, arg2 rpc.ParticipantTopic, arg3 *rpc.WHIPParticipantICETrickleRequest, arg4 ...psrpc.RequestOption) (*emptypb.Empty, error) {
	fake.iCETrickleMutex.Lock()
	ret, specificReturn := fake.iCETrickleReturnsOnCall[len(fake.iCETrickleArgsForCall)]
	fake.iCETrickleArgsForCall = append(fake.iCETrickleArgsForCall, struct {
		arg1 context.Context
		arg2 rpc.ParticipantTopic
		arg3 *rpc.WHIPParticipantICETrickleRequest
		arg4 []psrpc.RequestOption
	}{arg1, arg2, arg3, arg4})
	stub := fake.ICETrickleStub
	fakeReturns := fake.iCETrickleReturns
	fake.recordInvocation("ICETrickle", []interface{}{arg1, arg2, arg3, arg4})
	fake.iCETrickleMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2, arg3, arg4...)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeTypedWHIPParticipantClient) ICETrickleCallCount() int {
	fake.iCETrickleMutex.RLock()
	defer fake.iCETrickleMutex.RUnlock()
	return len(fake.iCETrickleArgsForCall)
}

func (fake *FakeTypedWHIPParticipantClient) ICETrickleCalls(stub func(context.Context, rpc.ParticipantTopic, *rpc.WHIPParticipantICETrickleRequest, ...psrpc.RequestOption) (*emptypb.Empty, error)) {
	fake.iCETrickleMutex.Lock()
	defer fake.iCETrickleMutex.Unlock()
	fake.ICETrickleStub = stub
}

func (fake *FakeTypedWHIPParticipantClient) ICETrickleArgsForCall(i int) (context.Context, rpc.ParticipantTopic, *rpc.WHIPParticipantICETrickleRequest, []psrpc.RequestOption) {
	fake.iCETrickleMutex.RLock()
	defer fake.iCETrickleMutex.RUnlock()
	argsForCall := fake.iCETrickleArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4
}

func (fake *FakeTypedWHIPParticipantClient) ICETrickleReturns(result1 *emptypb.Empty, result2 error) {
	fake.iCETrickleMutex.Lock()
	defer fake.iCETrickleMutex.Unlock()
	fake.ICETrickleStub = nil
	fake.iCETrickleReturns = struct {
		result1 *emptypb.Empty
		result2 error
	}{result1, result2}
}

func (fake *FakeTypedWHIPParticipantClient) ICETrickleReturnsOnCall(i int, result1 *emptypb.Empty, result2 error) {
	fake.iCETrickleMutex.Lock()
	defer fake.iCETrickleMutex.Unlock()
	fake.ICETrickleStub = nil
	if fake.iCETrickleReturnsOnCall == nil {
		fake.iCETrickleReturnsOnCall = make(map[int]struct {
			result1 *emptypb.Empty
			result2 error
		})
	}
	fake.iCETrickleReturnsOnCall[i] = struct {
		result1 *emptypb.Empty
		result2 error
	}{result1, result2}
}

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

func (fake *FakeTypedWHIPParticipantClient) 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 _ rpc.TypedWHIPParticipantClient = new(FakeTypedWHIPParticipantClient)
