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

package mocks

import (
	"context"

	"github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type Interface_Expecter struct {
	mock *mock.Mock
}

func (_m *Interface) EXPECT() *Interface_Expecter {
	return &Interface_Expecter{mock: &_m.Mock}
}

// Get provides a mock function for the type Interface
func (_mock *Interface) Get(ctx context.Context, ref *v1alpha1.ArtifactRepositoryRefStatus) (*v1alpha1.ArtifactRepository, error) {
	ret := _mock.Called(ctx, ref)

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

	var r0 *v1alpha1.ArtifactRepository
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.ArtifactRepositoryRefStatus) (*v1alpha1.ArtifactRepository, error)); ok {
		return returnFunc(ctx, ref)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.ArtifactRepositoryRefStatus) *v1alpha1.ArtifactRepository); ok {
		r0 = returnFunc(ctx, ref)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v1alpha1.ArtifactRepository)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.ArtifactRepositoryRefStatus) error); ok {
		r1 = returnFunc(ctx, ref)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Get is a helper method to define mock.On call
//   - ctx context.Context
//   - ref *v1alpha1.ArtifactRepositoryRefStatus
func (_e *Interface_Expecter) Get(ctx interface{}, ref interface{}) *Interface_Get_Call {
	return &Interface_Get_Call{Call: _e.mock.On("Get", ctx, ref)}
}

func (_c *Interface_Get_Call) Run(run func(ctx context.Context, ref *v1alpha1.ArtifactRepositoryRefStatus)) *Interface_Get_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *v1alpha1.ArtifactRepositoryRefStatus
		if args[1] != nil {
			arg1 = args[1].(*v1alpha1.ArtifactRepositoryRefStatus)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Interface_Get_Call) Return(artifactRepository *v1alpha1.ArtifactRepository, err error) *Interface_Get_Call {
	_c.Call.Return(artifactRepository, err)
	return _c
}

func (_c *Interface_Get_Call) RunAndReturn(run func(ctx context.Context, ref *v1alpha1.ArtifactRepositoryRefStatus) (*v1alpha1.ArtifactRepository, error)) *Interface_Get_Call {
	_c.Call.Return(run)
	return _c
}

// Resolve provides a mock function for the type Interface
func (_mock *Interface) Resolve(ctx context.Context, ref *v1alpha1.ArtifactRepositoryRef, workflowNamespace string) (*v1alpha1.ArtifactRepositoryRefStatus, error) {
	ret := _mock.Called(ctx, ref, workflowNamespace)

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

	var r0 *v1alpha1.ArtifactRepositoryRefStatus
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.ArtifactRepositoryRef, string) (*v1alpha1.ArtifactRepositoryRefStatus, error)); ok {
		return returnFunc(ctx, ref, workflowNamespace)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.ArtifactRepositoryRef, string) *v1alpha1.ArtifactRepositoryRefStatus); ok {
		r0 = returnFunc(ctx, ref, workflowNamespace)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v1alpha1.ArtifactRepositoryRefStatus)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.ArtifactRepositoryRef, string) error); ok {
		r1 = returnFunc(ctx, ref, workflowNamespace)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Resolve is a helper method to define mock.On call
//   - ctx context.Context
//   - ref *v1alpha1.ArtifactRepositoryRef
//   - workflowNamespace string
func (_e *Interface_Expecter) Resolve(ctx interface{}, ref interface{}, workflowNamespace interface{}) *Interface_Resolve_Call {
	return &Interface_Resolve_Call{Call: _e.mock.On("Resolve", ctx, ref, workflowNamespace)}
}

func (_c *Interface_Resolve_Call) Run(run func(ctx context.Context, ref *v1alpha1.ArtifactRepositoryRef, workflowNamespace string)) *Interface_Resolve_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *v1alpha1.ArtifactRepositoryRef
		if args[1] != nil {
			arg1 = args[1].(*v1alpha1.ArtifactRepositoryRef)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *Interface_Resolve_Call) Return(artifactRepositoryRefStatus *v1alpha1.ArtifactRepositoryRefStatus, err error) *Interface_Resolve_Call {
	_c.Call.Return(artifactRepositoryRefStatus, err)
	return _c
}

func (_c *Interface_Resolve_Call) RunAndReturn(run func(ctx context.Context, ref *v1alpha1.ArtifactRepositoryRef, workflowNamespace string) (*v1alpha1.ArtifactRepositoryRefStatus, error)) *Interface_Resolve_Call {
	_c.Call.Return(run)
	return _c
}
