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

package mocks

import (
	context "context"

	blob "github.com/kopia/kopia/repo/blob"

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

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

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

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

	return r0
}

// ConnectionInfo provides a mock function with given fields:
func (_m *Storage) ConnectionInfo() blob.ConnectionInfo {
	ret := _m.Called()

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

	return r0
}

// DeleteBlob provides a mock function with given fields: ctx, blobID
func (_m *Storage) DeleteBlob(ctx context.Context, blobID blob.ID) error {
	ret := _m.Called(ctx, blobID)

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

	return r0
}

// DisplayName provides a mock function with given fields:
func (_m *Storage) DisplayName() string {
	ret := _m.Called()

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

	return r0
}

// ExtendBlobRetention provides a mock function with given fields: ctx, blobID, opts
func (_m *Storage) ExtendBlobRetention(ctx context.Context, blobID blob.ID, opts blob.ExtendOptions) error {
	ret := _m.Called(ctx, blobID, opts)

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

	return r0
}

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

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

	return r0
}

// GetBlob provides a mock function with given fields: ctx, blobID, offset, length, output
func (_m *Storage) GetBlob(ctx context.Context, blobID blob.ID, offset int64, length int64, output blob.OutputBuffer) error {
	ret := _m.Called(ctx, blobID, offset, length, output)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, blob.ID, int64, int64, blob.OutputBuffer) error); ok {
		r0 = rf(ctx, blobID, offset, length, output)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// GetCapacity provides a mock function with given fields: ctx
func (_m *Storage) GetCapacity(ctx context.Context) (blob.Capacity, error) {
	ret := _m.Called(ctx)

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

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

	return r0, r1
}

// GetMetadata provides a mock function with given fields: ctx, blobID
func (_m *Storage) GetMetadata(ctx context.Context, blobID blob.ID) (blob.Metadata, error) {
	ret := _m.Called(ctx, blobID)

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

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

	return r0, r1
}

// IsReadOnly provides a mock function with given fields:
func (_m *Storage) IsReadOnly() bool {
	ret := _m.Called()

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

	return r0
}

// ListBlobs provides a mock function with given fields: ctx, blobIDPrefix, cb
func (_m *Storage) ListBlobs(ctx context.Context, blobIDPrefix blob.ID, cb func(blob.Metadata) error) error {
	ret := _m.Called(ctx, blobIDPrefix, cb)

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

	return r0
}

// PutBlob provides a mock function with given fields: ctx, blobID, data, opts
func (_m *Storage) PutBlob(ctx context.Context, blobID blob.ID, data blob.Bytes, opts blob.PutOptions) error {
	ret := _m.Called(ctx, blobID, data, opts)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, blob.ID, blob.Bytes, blob.PutOptions) error); ok {
		r0 = rf(ctx, blobID, data, opts)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

type mockConstructorTestingTNewStorage interface {
	mock.TestingT
	Cleanup(func())
}

// NewStorage creates a new instance of Storage. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewStorage(t mockConstructorTestingTNewStorage) *Storage {
	mock := &Storage{}
	mock.Mock.Test(t)

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

	return mock
}
