// Code generated by MockGen. DO NOT EDIT.
// Source: ./api.go
//
// Generated by this command:
//
//	mockgen -source=./api.go -destination=./api_mock.go -package=piece
//

// Package piece is a generated GoMock package.
package piece

import (
	context "context"
	io "io"
	reflect "reflect"

	gomock "go.uber.org/mock/gomock"
)

// MockPieceAPI is a mock of PieceAPI interface.
type MockPieceAPI struct {
	ctrl     *gomock.Controller
	recorder *MockPieceAPIMockRecorder
}

// MockPieceAPIMockRecorder is the mock recorder for MockPieceAPI.
type MockPieceAPIMockRecorder struct {
	mock *MockPieceAPI
}

// NewMockPieceAPI creates a new mock instance.
func NewMockPieceAPI(ctrl *gomock.Controller) *MockPieceAPI {
	mock := &MockPieceAPI{ctrl: ctrl}
	mock.recorder = &MockPieceAPIMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockPieceAPI) EXPECT() *MockPieceAPIMockRecorder {
	return m.recorder
}

// Delete mocks base method.
func (m *MockPieceAPI) Delete(ctx context.Context, key string) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Delete", ctx, key)
	ret0, _ := ret[0].(error)
	return ret0
}

// Delete indicates an expected call of Delete.
func (mr *MockPieceAPIMockRecorder) Delete(ctx, key any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockPieceAPI)(nil).Delete), ctx, key)
}

// DeleteByPrefix mocks base method.
func (m *MockPieceAPI) DeleteByPrefix(ctx context.Context, key string) (uint64, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "DeleteByPrefix", ctx, key)
	ret0, _ := ret[0].(uint64)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// DeleteByPrefix indicates an expected call of DeleteByPrefix.
func (mr *MockPieceAPIMockRecorder) DeleteByPrefix(ctx, key any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteByPrefix", reflect.TypeOf((*MockPieceAPI)(nil).DeleteByPrefix), ctx, key)
}

// Get mocks base method.
func (m *MockPieceAPI) Get(ctx context.Context, key string, offset, limit int64) (io.ReadCloser, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Get", ctx, key, offset, limit)
	ret0, _ := ret[0].(io.ReadCloser)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Get indicates an expected call of Get.
func (mr *MockPieceAPIMockRecorder) Get(ctx, key, offset, limit any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPieceAPI)(nil).Get), ctx, key, offset, limit)
}

// Put mocks base method.
func (m *MockPieceAPI) Put(ctx context.Context, key string, reader io.Reader) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Put", ctx, key, reader)
	ret0, _ := ret[0].(error)
	return ret0
}

// Put indicates an expected call of Put.
func (mr *MockPieceAPIMockRecorder) Put(ctx, key, reader any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockPieceAPI)(nil).Put), ctx, key, reader)
}
