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

package common

import (
	context "context"

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

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

// Abort provides a mock function with given fields:
func (_m *MockJobTrace) Abort() bool {
	ret := _m.Called()

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

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

	return r0
}

// Cancel provides a mock function with given fields:
func (_m *MockJobTrace) Cancel() bool {
	ret := _m.Called()

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

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

	return r0
}

// Fail provides a mock function with given fields: err, failureData
func (_m *MockJobTrace) Fail(err error, failureData JobFailureData) error {
	ret := _m.Called(err, failureData)

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

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

	return r0
}

// IsStdout provides a mock function with given fields:
func (_m *MockJobTrace) IsStdout() bool {
	ret := _m.Called()

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

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

	return r0
}

// SetAbortFunc provides a mock function with given fields: abortFunc
func (_m *MockJobTrace) SetAbortFunc(abortFunc context.CancelFunc) {
	_m.Called(abortFunc)
}

// SetCancelFunc provides a mock function with given fields: cancelFunc
func (_m *MockJobTrace) SetCancelFunc(cancelFunc context.CancelFunc) {
	_m.Called(cancelFunc)
}

// SetDebugModeEnabled provides a mock function with given fields: isEnabled
func (_m *MockJobTrace) SetDebugModeEnabled(isEnabled bool) {
	_m.Called(isEnabled)
}

// SetFailuresCollector provides a mock function with given fields: fc
func (_m *MockJobTrace) SetFailuresCollector(fc FailuresCollector) {
	_m.Called(fc)
}

// SetSupportedFailureReasonMapper provides a mock function with given fields: f
func (_m *MockJobTrace) SetSupportedFailureReasonMapper(f SupportedFailureReasonMapper) {
	_m.Called(f)
}

// Success provides a mock function with given fields:
func (_m *MockJobTrace) Success() error {
	ret := _m.Called()

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

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

	return r0
}

// Write provides a mock function with given fields: p
func (_m *MockJobTrace) Write(p []byte) (int, error) {
	ret := _m.Called(p)

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

	var r0 int
	var r1 error
	if rf, ok := ret.Get(0).(func([]byte) (int, error)); ok {
		return rf(p)
	}
	if rf, ok := ret.Get(0).(func([]byte) int); ok {
		r0 = rf(p)
	} else {
		r0 = ret.Get(0).(int)
	}

	if rf, ok := ret.Get(1).(func([]byte) error); ok {
		r1 = rf(p)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

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

	return mock
}
