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

package mocks

import (
	context "context"
	time "time"

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

	udmrepo "github.com/vmware-tanzu/velero/pkg/repository/udmrepo"
)

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

// Close provides a mock function with given fields: ctx
func (_m *BackupRepo) Close(ctx context.Context) error {
	ret := _m.Called(ctx)

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

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

	return r0
}

// ConcatenateObjects provides a mock function with given fields: ctx, objectIDs
func (_m *BackupRepo) ConcatenateObjects(ctx context.Context, objectIDs []udmrepo.ID) (udmrepo.ID, error) {
	ret := _m.Called(ctx, objectIDs)

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

	var r0 udmrepo.ID
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, []udmrepo.ID) (udmrepo.ID, error)); ok {
		return rf(ctx, objectIDs)
	}
	if rf, ok := ret.Get(0).(func(context.Context, []udmrepo.ID) udmrepo.ID); ok {
		r0 = rf(ctx, objectIDs)
	} else {
		r0 = ret.Get(0).(udmrepo.ID)
	}

	if rf, ok := ret.Get(1).(func(context.Context, []udmrepo.ID) error); ok {
		r1 = rf(ctx, objectIDs)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// DeleteManifest provides a mock function with given fields: ctx, id
func (_m *BackupRepo) DeleteManifest(ctx context.Context, id udmrepo.ID) error {
	ret := _m.Called(ctx, id)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, udmrepo.ID) error); ok {
		r0 = rf(ctx, id)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// FindManifests provides a mock function with given fields: ctx, filter
func (_m *BackupRepo) FindManifests(ctx context.Context, filter udmrepo.ManifestFilter) ([]*udmrepo.ManifestEntryMetadata, error) {
	ret := _m.Called(ctx, filter)

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

	var r0 []*udmrepo.ManifestEntryMetadata
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, udmrepo.ManifestFilter) ([]*udmrepo.ManifestEntryMetadata, error)); ok {
		return rf(ctx, filter)
	}
	if rf, ok := ret.Get(0).(func(context.Context, udmrepo.ManifestFilter) []*udmrepo.ManifestEntryMetadata); ok {
		r0 = rf(ctx, filter)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*udmrepo.ManifestEntryMetadata)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, udmrepo.ManifestFilter) error); ok {
		r1 = rf(ctx, filter)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Flush provides a mock function with given fields: ctx
func (_m *BackupRepo) Flush(ctx context.Context) error {
	ret := _m.Called(ctx)

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

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

	return r0
}

// GetAdvancedFeatures provides a mock function with given fields:
func (_m *BackupRepo) GetAdvancedFeatures() udmrepo.AdvancedFeatureInfo {
	ret := _m.Called()

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

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

	return r0
}

// GetManifest provides a mock function with given fields: ctx, id, mani
func (_m *BackupRepo) GetManifest(ctx context.Context, id udmrepo.ID, mani *udmrepo.RepoManifest) error {
	ret := _m.Called(ctx, id, mani)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, udmrepo.ID, *udmrepo.RepoManifest) error); ok {
		r0 = rf(ctx, id, mani)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// NewObjectWriter provides a mock function with given fields: ctx, opt
func (_m *BackupRepo) NewObjectWriter(ctx context.Context, opt udmrepo.ObjectWriteOptions) udmrepo.ObjectWriter {
	ret := _m.Called(ctx, opt)

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

	var r0 udmrepo.ObjectWriter
	if rf, ok := ret.Get(0).(func(context.Context, udmrepo.ObjectWriteOptions) udmrepo.ObjectWriter); ok {
		r0 = rf(ctx, opt)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(udmrepo.ObjectWriter)
		}
	}

	return r0
}

// OpenObject provides a mock function with given fields: ctx, id
func (_m *BackupRepo) OpenObject(ctx context.Context, id udmrepo.ID) (udmrepo.ObjectReader, error) {
	ret := _m.Called(ctx, id)

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

	var r0 udmrepo.ObjectReader
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, udmrepo.ID) (udmrepo.ObjectReader, error)); ok {
		return rf(ctx, id)
	}
	if rf, ok := ret.Get(0).(func(context.Context, udmrepo.ID) udmrepo.ObjectReader); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(udmrepo.ObjectReader)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, udmrepo.ID) error); ok {
		r1 = rf(ctx, id)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// PutManifest provides a mock function with given fields: ctx, mani
func (_m *BackupRepo) PutManifest(ctx context.Context, mani udmrepo.RepoManifest) (udmrepo.ID, error) {
	ret := _m.Called(ctx, mani)

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

	var r0 udmrepo.ID
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, udmrepo.RepoManifest) (udmrepo.ID, error)); ok {
		return rf(ctx, mani)
	}
	if rf, ok := ret.Get(0).(func(context.Context, udmrepo.RepoManifest) udmrepo.ID); ok {
		r0 = rf(ctx, mani)
	} else {
		r0 = ret.Get(0).(udmrepo.ID)
	}

	if rf, ok := ret.Get(1).(func(context.Context, udmrepo.RepoManifest) error); ok {
		r1 = rf(ctx, mani)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Time provides a mock function with given fields:
func (_m *BackupRepo) Time() time.Time {
	ret := _m.Called()

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

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

	return r0
}

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

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

	return mock
}
