// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify

package mockpbserverdiscovery

import (
	"github.com/hashicorp/consul/proto-public/pbserverdiscovery"
	mock "github.com/stretchr/testify/mock"
	"google.golang.org/grpc"
)

// NewServerDiscoveryServiceServer creates a new instance of ServerDiscoveryServiceServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewServerDiscoveryServiceServer(t interface {
	mock.TestingT
	Cleanup(func())
}) *ServerDiscoveryServiceServer {
	mock := &ServerDiscoveryServiceServer{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}

// ServerDiscoveryServiceServer is an autogenerated mock type for the ServerDiscoveryServiceServer type
type ServerDiscoveryServiceServer struct {
	mock.Mock
}

type ServerDiscoveryServiceServer_Expecter struct {
	mock *mock.Mock
}

func (_m *ServerDiscoveryServiceServer) EXPECT() *ServerDiscoveryServiceServer_Expecter {
	return &ServerDiscoveryServiceServer_Expecter{mock: &_m.Mock}
}

// WatchServers provides a mock function for the type ServerDiscoveryServiceServer
func (_mock *ServerDiscoveryServiceServer) WatchServers(watchServersRequest *pbserverdiscovery.WatchServersRequest, serverStreamingServer grpc.ServerStreamingServer[pbserverdiscovery.WatchServersResponse]) error {
	ret := _mock.Called(watchServersRequest, serverStreamingServer)

	if len(ret) == 0 {
		panic("no return value specified for WatchServers")
	}

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(*pbserverdiscovery.WatchServersRequest, grpc.ServerStreamingServer[pbserverdiscovery.WatchServersResponse]) error); ok {
		r0 = returnFunc(watchServersRequest, serverStreamingServer)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

// ServerDiscoveryServiceServer_WatchServers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchServers'
type ServerDiscoveryServiceServer_WatchServers_Call struct {
	*mock.Call
}

// WatchServers is a helper method to define mock.On call
//   - watchServersRequest *pbserverdiscovery.WatchServersRequest
//   - serverStreamingServer grpc.ServerStreamingServer[pbserverdiscovery.WatchServersResponse]
func (_e *ServerDiscoveryServiceServer_Expecter) WatchServers(watchServersRequest interface{}, serverStreamingServer interface{}) *ServerDiscoveryServiceServer_WatchServers_Call {
	return &ServerDiscoveryServiceServer_WatchServers_Call{Call: _e.mock.On("WatchServers", watchServersRequest, serverStreamingServer)}
}

func (_c *ServerDiscoveryServiceServer_WatchServers_Call) Run(run func(watchServersRequest *pbserverdiscovery.WatchServersRequest, serverStreamingServer grpc.ServerStreamingServer[pbserverdiscovery.WatchServersResponse])) *ServerDiscoveryServiceServer_WatchServers_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *pbserverdiscovery.WatchServersRequest
		if args[0] != nil {
			arg0 = args[0].(*pbserverdiscovery.WatchServersRequest)
		}
		var arg1 grpc.ServerStreamingServer[pbserverdiscovery.WatchServersResponse]
		if args[1] != nil {
			arg1 = args[1].(grpc.ServerStreamingServer[pbserverdiscovery.WatchServersResponse])
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *ServerDiscoveryServiceServer_WatchServers_Call) Return(err error) *ServerDiscoveryServiceServer_WatchServers_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *ServerDiscoveryServiceServer_WatchServers_Call) RunAndReturn(run func(watchServersRequest *pbserverdiscovery.WatchServersRequest, serverStreamingServer grpc.ServerStreamingServer[pbserverdiscovery.WatchServersResponse]) error) *ServerDiscoveryServiceServer_WatchServers_Call {
	_c.Call.Return(run)
	return _c
}
