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

// Package mocks contains mocks for IManagerHelper type
package mocks

import (
	bytes "bytes"
	time "time"

	log "github.com/aws/amazon-ssm-agent/agent/log"
	updateconstants "github.com/aws/amazon-ssm-agent/agent/updateutil/updateconstants"
	mock "github.com/stretchr/testify/mock"
)

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

// ExecCommandWithOutput provides a mock function with given fields: _a0, cmd, workingDir, outputRoot, stdOut, stdErr
func (_m *IManagerHelper) ExecCommandWithOutput(_a0 log.T, cmd string, workingDir string, outputRoot string, stdOut string, stdErr string) (int, updateconstants.UpdateScriptExitCode, *bytes.Buffer, *bytes.Buffer, error) {
	ret := _m.Called(_a0, cmd, workingDir, outputRoot, stdOut, stdErr)

	var r0 int
	if rf, ok := ret.Get(0).(func(log.T, string, string, string, string, string) int); ok {
		r0 = rf(_a0, cmd, workingDir, outputRoot, stdOut, stdErr)
	} else {
		r0 = ret.Get(0).(int)
	}

	var r1 updateconstants.UpdateScriptExitCode
	if rf, ok := ret.Get(1).(func(log.T, string, string, string, string, string) updateconstants.UpdateScriptExitCode); ok {
		r1 = rf(_a0, cmd, workingDir, outputRoot, stdOut, stdErr)
	} else {
		r1 = ret.Get(1).(updateconstants.UpdateScriptExitCode)
	}

	var r2 *bytes.Buffer
	if rf, ok := ret.Get(2).(func(log.T, string, string, string, string, string) *bytes.Buffer); ok {
		r2 = rf(_a0, cmd, workingDir, outputRoot, stdOut, stdErr)
	} else {
		if ret.Get(2) != nil {
			r2 = ret.Get(2).(*bytes.Buffer)
		}
	}

	var r3 *bytes.Buffer
	if rf, ok := ret.Get(3).(func(log.T, string, string, string, string, string) *bytes.Buffer); ok {
		r3 = rf(_a0, cmd, workingDir, outputRoot, stdOut, stdErr)
	} else {
		if ret.Get(3) != nil {
			r3 = ret.Get(3).(*bytes.Buffer)
		}
	}

	var r4 error
	if rf, ok := ret.Get(4).(func(log.T, string, string, string, string, string) error); ok {
		r4 = rf(_a0, cmd, workingDir, outputRoot, stdOut, stdErr)
	} else {
		r4 = ret.Error(4)
	}

	return r0, r1, r2, r3, r4
}

// GetExitCode provides a mock function with given fields: err
func (_m *IManagerHelper) GetExitCode(err error) int {
	ret := _m.Called(err)

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

	return r0
}

// IsCommandAvailable provides a mock function with given fields: cmd
func (_m *IManagerHelper) IsCommandAvailable(cmd string) bool {
	ret := _m.Called(cmd)

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

	return r0
}

// IsExitCodeError provides a mock function with given fields: err
func (_m *IManagerHelper) IsExitCodeError(err error) bool {
	ret := _m.Called(err)

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

	return r0
}

// IsTimeoutError provides a mock function with given fields: err
func (_m *IManagerHelper) IsTimeoutError(err error) bool {
	ret := _m.Called(err)

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

	return r0
}

// RunCommand provides a mock function with given fields: cmd, args
func (_m *IManagerHelper) RunCommand(cmd string, args ...string) (string, error) {
	_va := make([]interface{}, len(args))
	for _i := range args {
		_va[_i] = args[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, cmd)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

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

	var r1 error
	if rf, ok := ret.Get(1).(func(string, ...string) error); ok {
		r1 = rf(cmd, args...)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// RunCommandWithCustomTimeout provides a mock function with given fields: timeout, cmd, args
func (_m *IManagerHelper) RunCommandWithCustomTimeout(timeout time.Duration, cmd string, args ...string) (string, error) {
	_va := make([]interface{}, len(args))
	for _i := range args {
		_va[_i] = args[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, timeout, cmd)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

	var r0 string
	if rf, ok := ret.Get(0).(func(time.Duration, string, ...string) string); ok {
		r0 = rf(timeout, cmd, args...)
	} else {
		r0 = ret.Get(0).(string)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(time.Duration, string, ...string) error); ok {
		r1 = rf(timeout, cmd, args...)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
