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

package mocks

import (
	"context"

	"github.com/actions/actions-runner-controller/github/actions"
	mock "github.com/stretchr/testify/mock"
)

// NewServerPublisher creates a new instance of ServerPublisher. 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 NewServerPublisher(t interface {
	mock.TestingT
	Cleanup(func())
}) *ServerPublisher {
	mock := &ServerPublisher{}
	mock.Mock.Test(t)

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

	return mock
}

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

type ServerPublisher_Expecter struct {
	mock *mock.Mock
}

func (_m *ServerPublisher) EXPECT() *ServerPublisher_Expecter {
	return &ServerPublisher_Expecter{mock: &_m.Mock}
}

// ListenAndServe provides a mock function for the type ServerPublisher
func (_mock *ServerPublisher) ListenAndServe(ctx context.Context) error {
	ret := _mock.Called(ctx)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
		r0 = returnFunc(ctx)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// ListenAndServe is a helper method to define mock.On call
//   - ctx context.Context
func (_e *ServerPublisher_Expecter) ListenAndServe(ctx interface{}) *ServerPublisher_ListenAndServe_Call {
	return &ServerPublisher_ListenAndServe_Call{Call: _e.mock.On("ListenAndServe", ctx)}
}

func (_c *ServerPublisher_ListenAndServe_Call) Run(run func(ctx context.Context)) *ServerPublisher_ListenAndServe_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		run(
			arg0,
		)
	})
	return _c
}

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

func (_c *ServerPublisher_ListenAndServe_Call) RunAndReturn(run func(ctx context.Context) error) *ServerPublisher_ListenAndServe_Call {
	_c.Call.Return(run)
	return _c
}

// PublishDesiredRunners provides a mock function for the type ServerPublisher
func (_mock *ServerPublisher) PublishDesiredRunners(count int) {
	_mock.Called(count)
	return
}

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

// PublishDesiredRunners is a helper method to define mock.On call
//   - count int
func (_e *ServerPublisher_Expecter) PublishDesiredRunners(count interface{}) *ServerPublisher_PublishDesiredRunners_Call {
	return &ServerPublisher_PublishDesiredRunners_Call{Call: _e.mock.On("PublishDesiredRunners", count)}
}

func (_c *ServerPublisher_PublishDesiredRunners_Call) Run(run func(count int)) *ServerPublisher_PublishDesiredRunners_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 int
		if args[0] != nil {
			arg0 = args[0].(int)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *ServerPublisher_PublishDesiredRunners_Call) Return() *ServerPublisher_PublishDesiredRunners_Call {
	_c.Call.Return()
	return _c
}

func (_c *ServerPublisher_PublishDesiredRunners_Call) RunAndReturn(run func(count int)) *ServerPublisher_PublishDesiredRunners_Call {
	_c.Run(run)
	return _c
}

// PublishJobCompleted provides a mock function for the type ServerPublisher
func (_mock *ServerPublisher) PublishJobCompleted(msg *actions.JobCompleted) {
	_mock.Called(msg)
	return
}

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

// PublishJobCompleted is a helper method to define mock.On call
//   - msg *actions.JobCompleted
func (_e *ServerPublisher_Expecter) PublishJobCompleted(msg interface{}) *ServerPublisher_PublishJobCompleted_Call {
	return &ServerPublisher_PublishJobCompleted_Call{Call: _e.mock.On("PublishJobCompleted", msg)}
}

func (_c *ServerPublisher_PublishJobCompleted_Call) Run(run func(msg *actions.JobCompleted)) *ServerPublisher_PublishJobCompleted_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *actions.JobCompleted
		if args[0] != nil {
			arg0 = args[0].(*actions.JobCompleted)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *ServerPublisher_PublishJobCompleted_Call) Return() *ServerPublisher_PublishJobCompleted_Call {
	_c.Call.Return()
	return _c
}

func (_c *ServerPublisher_PublishJobCompleted_Call) RunAndReturn(run func(msg *actions.JobCompleted)) *ServerPublisher_PublishJobCompleted_Call {
	_c.Run(run)
	return _c
}

// PublishJobStarted provides a mock function for the type ServerPublisher
func (_mock *ServerPublisher) PublishJobStarted(msg *actions.JobStarted) {
	_mock.Called(msg)
	return
}

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

// PublishJobStarted is a helper method to define mock.On call
//   - msg *actions.JobStarted
func (_e *ServerPublisher_Expecter) PublishJobStarted(msg interface{}) *ServerPublisher_PublishJobStarted_Call {
	return &ServerPublisher_PublishJobStarted_Call{Call: _e.mock.On("PublishJobStarted", msg)}
}

func (_c *ServerPublisher_PublishJobStarted_Call) Run(run func(msg *actions.JobStarted)) *ServerPublisher_PublishJobStarted_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *actions.JobStarted
		if args[0] != nil {
			arg0 = args[0].(*actions.JobStarted)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *ServerPublisher_PublishJobStarted_Call) Return() *ServerPublisher_PublishJobStarted_Call {
	_c.Call.Return()
	return _c
}

func (_c *ServerPublisher_PublishJobStarted_Call) RunAndReturn(run func(msg *actions.JobStarted)) *ServerPublisher_PublishJobStarted_Call {
	_c.Run(run)
	return _c
}

// PublishStatic provides a mock function for the type ServerPublisher
func (_mock *ServerPublisher) PublishStatic(min int, max int) {
	_mock.Called(min, max)
	return
}

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

// PublishStatic is a helper method to define mock.On call
//   - min int
//   - max int
func (_e *ServerPublisher_Expecter) PublishStatic(min interface{}, max interface{}) *ServerPublisher_PublishStatic_Call {
	return &ServerPublisher_PublishStatic_Call{Call: _e.mock.On("PublishStatic", min, max)}
}

func (_c *ServerPublisher_PublishStatic_Call) Run(run func(min int, max int)) *ServerPublisher_PublishStatic_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 int
		if args[0] != nil {
			arg0 = args[0].(int)
		}
		var arg1 int
		if args[1] != nil {
			arg1 = args[1].(int)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *ServerPublisher_PublishStatic_Call) Return() *ServerPublisher_PublishStatic_Call {
	_c.Call.Return()
	return _c
}

func (_c *ServerPublisher_PublishStatic_Call) RunAndReturn(run func(min int, max int)) *ServerPublisher_PublishStatic_Call {
	_c.Run(run)
	return _c
}

// PublishStatistics provides a mock function for the type ServerPublisher
func (_mock *ServerPublisher) PublishStatistics(stats *actions.RunnerScaleSetStatistic) {
	_mock.Called(stats)
	return
}

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

// PublishStatistics is a helper method to define mock.On call
//   - stats *actions.RunnerScaleSetStatistic
func (_e *ServerPublisher_Expecter) PublishStatistics(stats interface{}) *ServerPublisher_PublishStatistics_Call {
	return &ServerPublisher_PublishStatistics_Call{Call: _e.mock.On("PublishStatistics", stats)}
}

func (_c *ServerPublisher_PublishStatistics_Call) Run(run func(stats *actions.RunnerScaleSetStatistic)) *ServerPublisher_PublishStatistics_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *actions.RunnerScaleSetStatistic
		if args[0] != nil {
			arg0 = args[0].(*actions.RunnerScaleSetStatistic)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *ServerPublisher_PublishStatistics_Call) Return() *ServerPublisher_PublishStatistics_Call {
	_c.Call.Return()
	return _c
}

func (_c *ServerPublisher_PublishStatistics_Call) RunAndReturn(run func(stats *actions.RunnerScaleSetStatistic)) *ServerPublisher_PublishStatistics_Call {
	_c.Run(run)
	return _c
}
