// Code generated by mockery v2.53.0. DO NOT EDIT.

package mocks

import (
	context "context"
	json "encoding/json"

	handlers "github.com/smartcontractkit/chainlink/v2/core/services/gateway/handlers"

	jsonrpc2 "github.com/smartcontractkit/chainlink-common/pkg/jsonrpc2"

	mock "github.com/stretchr/testify/mock"

	time "time"
)

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

type HTTPTriggerHandler_Expecter struct {
	mock *mock.Mock
}

func (_m *HTTPTriggerHandler) EXPECT() *HTTPTriggerHandler_Expecter {
	return &HTTPTriggerHandler_Expecter{mock: &_m.Mock}
}

// Close provides a mock function with no fields
func (_m *HTTPTriggerHandler) Close() error {
	ret := _m.Called()

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

	var r0 error
	if rf, ok := ret.Get(0).(func() error); ok {
		r0 = rf()
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// Close is a helper method to define mock.On call
func (_e *HTTPTriggerHandler_Expecter) Close() *HTTPTriggerHandler_Close_Call {
	return &HTTPTriggerHandler_Close_Call{Call: _e.mock.On("Close")}
}

func (_c *HTTPTriggerHandler_Close_Call) Run(run func()) *HTTPTriggerHandler_Close_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *HTTPTriggerHandler_Close_Call) Return(_a0 error) *HTTPTriggerHandler_Close_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *HTTPTriggerHandler_Close_Call) RunAndReturn(run func() error) *HTTPTriggerHandler_Close_Call {
	_c.Call.Return(run)
	return _c
}

// HandleNodeTriggerResponse provides a mock function with given fields: ctx, resp, nodeAddr
func (_m *HTTPTriggerHandler) HandleNodeTriggerResponse(ctx context.Context, resp *jsonrpc2.Response[json.RawMessage], nodeAddr string) error {
	ret := _m.Called(ctx, resp, nodeAddr)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, *jsonrpc2.Response[json.RawMessage], string) error); ok {
		r0 = rf(ctx, resp, nodeAddr)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// HandleNodeTriggerResponse is a helper method to define mock.On call
//   - ctx context.Context
//   - resp *jsonrpc2.Response[json.RawMessage]
//   - nodeAddr string
func (_e *HTTPTriggerHandler_Expecter) HandleNodeTriggerResponse(ctx interface{}, resp interface{}, nodeAddr interface{}) *HTTPTriggerHandler_HandleNodeTriggerResponse_Call {
	return &HTTPTriggerHandler_HandleNodeTriggerResponse_Call{Call: _e.mock.On("HandleNodeTriggerResponse", ctx, resp, nodeAddr)}
}

func (_c *HTTPTriggerHandler_HandleNodeTriggerResponse_Call) Run(run func(ctx context.Context, resp *jsonrpc2.Response[json.RawMessage], nodeAddr string)) *HTTPTriggerHandler_HandleNodeTriggerResponse_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(*jsonrpc2.Response[json.RawMessage]), args[2].(string))
	})
	return _c
}

func (_c *HTTPTriggerHandler_HandleNodeTriggerResponse_Call) Return(_a0 error) *HTTPTriggerHandler_HandleNodeTriggerResponse_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *HTTPTriggerHandler_HandleNodeTriggerResponse_Call) RunAndReturn(run func(context.Context, *jsonrpc2.Response[json.RawMessage], string) error) *HTTPTriggerHandler_HandleNodeTriggerResponse_Call {
	_c.Call.Return(run)
	return _c
}

// HandleUserTriggerRequest provides a mock function with given fields: ctx, req, callback, requestStartTime
func (_m *HTTPTriggerHandler) HandleUserTriggerRequest(ctx context.Context, req *jsonrpc2.Request[json.RawMessage], callback handlers.Callback, requestStartTime time.Time) error {
	ret := _m.Called(ctx, req, callback, requestStartTime)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, *jsonrpc2.Request[json.RawMessage], handlers.Callback, time.Time) error); ok {
		r0 = rf(ctx, req, callback, requestStartTime)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// HandleUserTriggerRequest is a helper method to define mock.On call
//   - ctx context.Context
//   - req *jsonrpc2.Request[json.RawMessage]
//   - callback handlers.Callback
//   - requestStartTime time.Time
func (_e *HTTPTriggerHandler_Expecter) HandleUserTriggerRequest(ctx interface{}, req interface{}, callback interface{}, requestStartTime interface{}) *HTTPTriggerHandler_HandleUserTriggerRequest_Call {
	return &HTTPTriggerHandler_HandleUserTriggerRequest_Call{Call: _e.mock.On("HandleUserTriggerRequest", ctx, req, callback, requestStartTime)}
}

func (_c *HTTPTriggerHandler_HandleUserTriggerRequest_Call) Run(run func(ctx context.Context, req *jsonrpc2.Request[json.RawMessage], callback handlers.Callback, requestStartTime time.Time)) *HTTPTriggerHandler_HandleUserTriggerRequest_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(*jsonrpc2.Request[json.RawMessage]), args[2].(handlers.Callback), args[3].(time.Time))
	})
	return _c
}

func (_c *HTTPTriggerHandler_HandleUserTriggerRequest_Call) Return(_a0 error) *HTTPTriggerHandler_HandleUserTriggerRequest_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *HTTPTriggerHandler_HandleUserTriggerRequest_Call) RunAndReturn(run func(context.Context, *jsonrpc2.Request[json.RawMessage], handlers.Callback, time.Time) error) *HTTPTriggerHandler_HandleUserTriggerRequest_Call {
	_c.Call.Return(run)
	return _c
}

// Start provides a mock function with given fields: _a0
func (_m *HTTPTriggerHandler) Start(_a0 context.Context) error {
	ret := _m.Called(_a0)

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

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

	return r0
}

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

// Start is a helper method to define mock.On call
//   - _a0 context.Context
func (_e *HTTPTriggerHandler_Expecter) Start(_a0 interface{}) *HTTPTriggerHandler_Start_Call {
	return &HTTPTriggerHandler_Start_Call{Call: _e.mock.On("Start", _a0)}
}

func (_c *HTTPTriggerHandler_Start_Call) Run(run func(_a0 context.Context)) *HTTPTriggerHandler_Start_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context))
	})
	return _c
}

func (_c *HTTPTriggerHandler_Start_Call) Return(_a0 error) *HTTPTriggerHandler_Start_Call {
	_c.Call.Return(_a0)
	return _c
}

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

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

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

	return mock
}
