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

package mocks

import (
	context "context"
	io "io"

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

	providerv1beta1 "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
)

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

type Retriever_Expecter struct {
	mock *mock.Mock
}

func (_m *Retriever) EXPECT() *Retriever_Expecter {
	return &Retriever_Expecter{mock: &_m.Mock}
}

// Retrieve provides a mock function with given fields: ctx, rID
func (_m *Retriever) Retrieve(ctx context.Context, rID *providerv1beta1.ResourceId) (io.ReadCloser, error) {
	ret := _m.Called(ctx, rID)

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

	var r0 io.ReadCloser
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId) (io.ReadCloser, error)); ok {
		return rf(ctx, rID)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId) io.ReadCloser); ok {
		r0 = rf(ctx, rID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(io.ReadCloser)
		}
	}

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

	return r0, r1
}

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

// Retrieve is a helper method to define mock.On call
//   - ctx context.Context
//   - rID *providerv1beta1.ResourceId
func (_e *Retriever_Expecter) Retrieve(ctx interface{}, rID interface{}) *Retriever_Retrieve_Call {
	return &Retriever_Retrieve_Call{Call: _e.mock.On("Retrieve", ctx, rID)}
}

func (_c *Retriever_Retrieve_Call) Run(run func(ctx context.Context, rID *providerv1beta1.ResourceId)) *Retriever_Retrieve_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(*providerv1beta1.ResourceId))
	})
	return _c
}

func (_c *Retriever_Retrieve_Call) Return(_a0 io.ReadCloser, _a1 error) *Retriever_Retrieve_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *Retriever_Retrieve_Call) RunAndReturn(run func(context.Context, *providerv1beta1.ResourceId) (io.ReadCloser, error)) *Retriever_Retrieve_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
