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

package s3v2

import (
	"context"
	"time"

	mock "github.com/stretchr/testify/mock"
	"gitlab.com/gitlab-org/gitlab-runner/cache"
)

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

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

	return mock
}

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

type mockS3Presigner_Expecter struct {
	mock *mock.Mock
}

func (_m *mockS3Presigner) EXPECT() *mockS3Presigner_Expecter {
	return &mockS3Presigner_Expecter{mock: &_m.Mock}
}

// FetchCredentialsForRole provides a mock function for the type mockS3Presigner
func (_mock *mockS3Presigner) FetchCredentialsForRole(ctx context.Context, roleARN string, bucketName string, objectName string, upload bool, timeout time.Duration) (map[string]string, error) {
	ret := _mock.Called(ctx, roleARN, bucketName, objectName, upload, timeout)

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

	var r0 map[string]string
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, bool, time.Duration) (map[string]string, error)); ok {
		return returnFunc(ctx, roleARN, bucketName, objectName, upload, timeout)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, bool, time.Duration) map[string]string); ok {
		r0 = returnFunc(ctx, roleARN, bucketName, objectName, upload, timeout)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(map[string]string)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, string, bool, time.Duration) error); ok {
		r1 = returnFunc(ctx, roleARN, bucketName, objectName, upload, timeout)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// FetchCredentialsForRole is a helper method to define mock.On call
//   - ctx context.Context
//   - roleARN string
//   - bucketName string
//   - objectName string
//   - upload bool
//   - timeout time.Duration
func (_e *mockS3Presigner_Expecter) FetchCredentialsForRole(ctx interface{}, roleARN interface{}, bucketName interface{}, objectName interface{}, upload interface{}, timeout interface{}) *mockS3Presigner_FetchCredentialsForRole_Call {
	return &mockS3Presigner_FetchCredentialsForRole_Call{Call: _e.mock.On("FetchCredentialsForRole", ctx, roleARN, bucketName, objectName, upload, timeout)}
}

func (_c *mockS3Presigner_FetchCredentialsForRole_Call) Run(run func(ctx context.Context, roleARN string, bucketName string, objectName string, upload bool, timeout time.Duration)) *mockS3Presigner_FetchCredentialsForRole_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		var arg3 string
		if args[3] != nil {
			arg3 = args[3].(string)
		}
		var arg4 bool
		if args[4] != nil {
			arg4 = args[4].(bool)
		}
		var arg5 time.Duration
		if args[5] != nil {
			arg5 = args[5].(time.Duration)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
			arg4,
			arg5,
		)
	})
	return _c
}

func (_c *mockS3Presigner_FetchCredentialsForRole_Call) Return(stringToString map[string]string, err error) *mockS3Presigner_FetchCredentialsForRole_Call {
	_c.Call.Return(stringToString, err)
	return _c
}

func (_c *mockS3Presigner_FetchCredentialsForRole_Call) RunAndReturn(run func(ctx context.Context, roleARN string, bucketName string, objectName string, upload bool, timeout time.Duration) (map[string]string, error)) *mockS3Presigner_FetchCredentialsForRole_Call {
	_c.Call.Return(run)
	return _c
}

// PresignURL provides a mock function for the type mockS3Presigner
func (_mock *mockS3Presigner) PresignURL(ctx context.Context, method string, bucketName string, objectName string, metadata map[string]string, expires time.Duration) (cache.PresignedURL, error) {
	ret := _mock.Called(ctx, method, bucketName, objectName, metadata, expires)

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

	var r0 cache.PresignedURL
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, map[string]string, time.Duration) (cache.PresignedURL, error)); ok {
		return returnFunc(ctx, method, bucketName, objectName, metadata, expires)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, map[string]string, time.Duration) cache.PresignedURL); ok {
		r0 = returnFunc(ctx, method, bucketName, objectName, metadata, expires)
	} else {
		r0 = ret.Get(0).(cache.PresignedURL)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, string, map[string]string, time.Duration) error); ok {
		r1 = returnFunc(ctx, method, bucketName, objectName, metadata, expires)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// PresignURL is a helper method to define mock.On call
//   - ctx context.Context
//   - method string
//   - bucketName string
//   - objectName string
//   - metadata map[string]string
//   - expires time.Duration
func (_e *mockS3Presigner_Expecter) PresignURL(ctx interface{}, method interface{}, bucketName interface{}, objectName interface{}, metadata interface{}, expires interface{}) *mockS3Presigner_PresignURL_Call {
	return &mockS3Presigner_PresignURL_Call{Call: _e.mock.On("PresignURL", ctx, method, bucketName, objectName, metadata, expires)}
}

func (_c *mockS3Presigner_PresignURL_Call) Run(run func(ctx context.Context, method string, bucketName string, objectName string, metadata map[string]string, expires time.Duration)) *mockS3Presigner_PresignURL_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		var arg3 string
		if args[3] != nil {
			arg3 = args[3].(string)
		}
		var arg4 map[string]string
		if args[4] != nil {
			arg4 = args[4].(map[string]string)
		}
		var arg5 time.Duration
		if args[5] != nil {
			arg5 = args[5].(time.Duration)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
			arg4,
			arg5,
		)
	})
	return _c
}

func (_c *mockS3Presigner_PresignURL_Call) Return(presignedURL cache.PresignedURL, err error) *mockS3Presigner_PresignURL_Call {
	_c.Call.Return(presignedURL, err)
	return _c
}

func (_c *mockS3Presigner_PresignURL_Call) RunAndReturn(run func(ctx context.Context, method string, bucketName string, objectName string, metadata map[string]string, expires time.Duration) (cache.PresignedURL, error)) *mockS3Presigner_PresignURL_Call {
	_c.Call.Return(run)
	return _c
}

// ServerSideEncryptionType provides a mock function for the type mockS3Presigner
func (_mock *mockS3Presigner) ServerSideEncryptionType() string {
	ret := _mock.Called()

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

	var r0 string
	if returnFunc, ok := ret.Get(0).(func() string); ok {
		r0 = returnFunc()
	} else {
		r0 = ret.Get(0).(string)
	}
	return r0
}

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

// ServerSideEncryptionType is a helper method to define mock.On call
func (_e *mockS3Presigner_Expecter) ServerSideEncryptionType() *mockS3Presigner_ServerSideEncryptionType_Call {
	return &mockS3Presigner_ServerSideEncryptionType_Call{Call: _e.mock.On("ServerSideEncryptionType")}
}

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

func (_c *mockS3Presigner_ServerSideEncryptionType_Call) Return(s string) *mockS3Presigner_ServerSideEncryptionType_Call {
	_c.Call.Return(s)
	return _c
}

func (_c *mockS3Presigner_ServerSideEncryptionType_Call) RunAndReturn(run func() string) *mockS3Presigner_ServerSideEncryptionType_Call {
	_c.Call.Return(run)
	return _c
}
