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

package mocks

import (
	context "context"

	job "github.com/smartcontractkit/chainlink/v2/core/services/job"
	mock "github.com/stretchr/testify/mock"
)

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

type ORM_Expecter struct {
	mock *mock.Mock
}

func (_m *ORM) EXPECT() *ORM_Expecter {
	return &ORM_Expecter{mock: &_m.Mock}
}

// DeleteWorkflowSpec provides a mock function with given fields: ctx, id
func (_m *ORM) DeleteWorkflowSpec(ctx context.Context, id string) error {
	ret := _m.Called(ctx, id)

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

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

	return r0
}

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

// DeleteWorkflowSpec is a helper method to define mock.On call
//   - ctx context.Context
//   - id string
func (_e *ORM_Expecter) DeleteWorkflowSpec(ctx interface{}, id interface{}) *ORM_DeleteWorkflowSpec_Call {
	return &ORM_DeleteWorkflowSpec_Call{Call: _e.mock.On("DeleteWorkflowSpec", ctx, id)}
}

func (_c *ORM_DeleteWorkflowSpec_Call) Run(run func(ctx context.Context, id string)) *ORM_DeleteWorkflowSpec_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string))
	})
	return _c
}

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

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

// GetWorkflowSpec provides a mock function with given fields: ctx, id
func (_m *ORM) GetWorkflowSpec(ctx context.Context, id string) (*job.WorkflowSpec, error) {
	ret := _m.Called(ctx, id)

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

	var r0 *job.WorkflowSpec
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string) (*job.WorkflowSpec, error)); ok {
		return rf(ctx, id)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string) *job.WorkflowSpec); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*job.WorkflowSpec)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = rf(ctx, id)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// GetWorkflowSpec is a helper method to define mock.On call
//   - ctx context.Context
//   - id string
func (_e *ORM_Expecter) GetWorkflowSpec(ctx interface{}, id interface{}) *ORM_GetWorkflowSpec_Call {
	return &ORM_GetWorkflowSpec_Call{Call: _e.mock.On("GetWorkflowSpec", ctx, id)}
}

func (_c *ORM_GetWorkflowSpec_Call) Run(run func(ctx context.Context, id string)) *ORM_GetWorkflowSpec_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string))
	})
	return _c
}

func (_c *ORM_GetWorkflowSpec_Call) Return(_a0 *job.WorkflowSpec, _a1 error) *ORM_GetWorkflowSpec_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *ORM_GetWorkflowSpec_Call) RunAndReturn(run func(context.Context, string) (*job.WorkflowSpec, error)) *ORM_GetWorkflowSpec_Call {
	_c.Call.Return(run)
	return _c
}

// UpsertWorkflowSpec provides a mock function with given fields: ctx, spec
func (_m *ORM) UpsertWorkflowSpec(ctx context.Context, spec *job.WorkflowSpec) (int64, error) {
	ret := _m.Called(ctx, spec)

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

	var r0 int64
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *job.WorkflowSpec) (int64, error)); ok {
		return rf(ctx, spec)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *job.WorkflowSpec) int64); ok {
		r0 = rf(ctx, spec)
	} else {
		r0 = ret.Get(0).(int64)
	}

	if rf, ok := ret.Get(1).(func(context.Context, *job.WorkflowSpec) error); ok {
		r1 = rf(ctx, spec)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// UpsertWorkflowSpec is a helper method to define mock.On call
//   - ctx context.Context
//   - spec *job.WorkflowSpec
func (_e *ORM_Expecter) UpsertWorkflowSpec(ctx interface{}, spec interface{}) *ORM_UpsertWorkflowSpec_Call {
	return &ORM_UpsertWorkflowSpec_Call{Call: _e.mock.On("UpsertWorkflowSpec", ctx, spec)}
}

func (_c *ORM_UpsertWorkflowSpec_Call) Run(run func(ctx context.Context, spec *job.WorkflowSpec)) *ORM_UpsertWorkflowSpec_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(*job.WorkflowSpec))
	})
	return _c
}

func (_c *ORM_UpsertWorkflowSpec_Call) Return(_a0 int64, _a1 error) *ORM_UpsertWorkflowSpec_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *ORM_UpsertWorkflowSpec_Call) RunAndReturn(run func(context.Context, *job.WorkflowSpec) (int64, error)) *ORM_UpsertWorkflowSpec_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
