// Code generated by MockGen. DO NOT EDIT.
// Source: transaction.go

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

import (
	"context"
	"reflect"

	"github.com/golang/mock/gomock"

	"github.com/avito-tech/go-transaction-manager/trm/v2"
)

// MockNestedTrFactory is a mock of NestedTrFactory interface.
type MockNestedTrFactory struct {
	ctrl     *gomock.Controller
	recorder *MockNestedTrFactoryMockRecorder
}

// MockNestedTrFactoryMockRecorder is the mock recorder for MockNestedTrFactory.
type MockNestedTrFactoryMockRecorder struct {
	mock *MockNestedTrFactory
}

// NewMockNestedTrFactory creates a new mock instance.
func NewMockNestedTrFactory(ctrl *gomock.Controller) *MockNestedTrFactory {
	mock := &MockNestedTrFactory{ctrl: ctrl}
	mock.recorder = &MockNestedTrFactoryMockRecorder{mock}
	return mock
}

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

// Begin mocks base method.
func (m *MockNestedTrFactory) Begin(ctx context.Context, s trm.Settings) (context.Context, trm.Transaction, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Begin", ctx, s)
	ret0, _ := ret[0].(context.Context)
	ret1, _ := ret[1].(trm.Transaction)
	ret2, _ := ret[2].(error)
	return ret0, ret1, ret2
}

// Begin indicates an expected call of Begin.
func (mr *MockNestedTrFactoryMockRecorder) Begin(ctx, s interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Begin", reflect.TypeOf((*MockNestedTrFactory)(nil).Begin), ctx, s)
}

// MockTransaction is a mock of Transaction interface.
type MockTransaction struct {
	ctrl     *gomock.Controller
	recorder *MockTransactionMockRecorder
}

// MockTransactionMockRecorder is the mock recorder for MockTransaction.
type MockTransactionMockRecorder struct {
	mock *MockTransaction
}

// NewMockTransaction creates a new mock instance.
func NewMockTransaction(ctrl *gomock.Controller) *MockTransaction {
	mock := &MockTransaction{ctrl: ctrl}
	mock.recorder = &MockTransactionMockRecorder{mock}
	return mock
}

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

// Closed mocks base method.
func (m *MockTransaction) Closed() <-chan struct{} {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Closed")
	ret0, _ := ret[0].(<-chan struct{})
	return ret0
}

// Closed indicates an expected call of Closed.
func (mr *MockTransactionMockRecorder) Closed() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Closed", reflect.TypeOf((*MockTransaction)(nil).Closed))
}

// Commit mocks base method.
func (m *MockTransaction) Commit(arg0 context.Context) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Commit", arg0)
	ret0, _ := ret[0].(error)
	return ret0
}

// Commit indicates an expected call of Commit.
func (mr *MockTransactionMockRecorder) Commit(arg0 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Commit", reflect.TypeOf((*MockTransaction)(nil).Commit), arg0)
}

// IsActive mocks base method.
func (m *MockTransaction) IsActive() bool {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "IsActive")
	ret0, _ := ret[0].(bool)
	return ret0
}

// IsActive indicates an expected call of IsActive.
func (mr *MockTransactionMockRecorder) IsActive() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsActive", reflect.TypeOf((*MockTransaction)(nil).IsActive))
}

// Rollback mocks base method.
func (m *MockTransaction) Rollback(arg0 context.Context) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Rollback", arg0)
	ret0, _ := ret[0].(error)
	return ret0
}

// Rollback indicates an expected call of Rollback.
func (mr *MockTransactionMockRecorder) Rollback(arg0 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Rollback", reflect.TypeOf((*MockTransaction)(nil).Rollback), arg0)
}

// Transaction mocks base method.
func (m *MockTransaction) Transaction() interface{} {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Transaction")
	ret0, _ := ret[0].(interface{})
	return ret0
}

// Transaction indicates an expected call of Transaction.
func (mr *MockTransactionMockRecorder) Transaction() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Transaction", reflect.TypeOf((*MockTransaction)(nil).Transaction))
}

// MocktransactionWithSP is a mock of transactionWithSP interface.
type MocktransactionWithSP struct {
	ctrl     *gomock.Controller
	recorder *MocktransactionWithSPMockRecorder
}

// MocktransactionWithSPMockRecorder is the mock recorder for MocktransactionWithSP.
type MocktransactionWithSPMockRecorder struct {
	mock *MocktransactionWithSP
}

// NewMocktransactionWithSP creates a new mock instance.
func NewMocktransactionWithSP(ctrl *gomock.Controller) *MocktransactionWithSP {
	mock := &MocktransactionWithSP{ctrl: ctrl}
	mock.recorder = &MocktransactionWithSPMockRecorder{mock}
	return mock
}

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

// Begin mocks base method.
func (m *MocktransactionWithSP) Begin(ctx context.Context, s trm.Settings) (context.Context, trm.Transaction, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Begin", ctx, s)
	ret0, _ := ret[0].(context.Context)
	ret1, _ := ret[1].(trm.Transaction)
	ret2, _ := ret[2].(error)
	return ret0, ret1, ret2
}

// Begin indicates an expected call of Begin.
func (mr *MocktransactionWithSPMockRecorder) Begin(ctx, s interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Begin", reflect.TypeOf((*MocktransactionWithSP)(nil).Begin), ctx, s)
}

// Closed mocks base method.
func (m *MocktransactionWithSP) Closed() <-chan struct{} {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Closed")
	ret0, _ := ret[0].(<-chan struct{})
	return ret0
}

// Closed indicates an expected call of Closed.
func (mr *MocktransactionWithSPMockRecorder) Closed() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Closed", reflect.TypeOf((*MocktransactionWithSP)(nil).Closed))
}

// Commit mocks base method.
func (m *MocktransactionWithSP) Commit(arg0 context.Context) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Commit", arg0)
	ret0, _ := ret[0].(error)
	return ret0
}

// Commit indicates an expected call of Commit.
func (mr *MocktransactionWithSPMockRecorder) Commit(arg0 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Commit", reflect.TypeOf((*MocktransactionWithSP)(nil).Commit), arg0)
}

// IsActive mocks base method.
func (m *MocktransactionWithSP) IsActive() bool {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "IsActive")
	ret0, _ := ret[0].(bool)
	return ret0
}

// IsActive indicates an expected call of IsActive.
func (mr *MocktransactionWithSPMockRecorder) IsActive() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsActive", reflect.TypeOf((*MocktransactionWithSP)(nil).IsActive))
}

// Rollback mocks base method.
func (m *MocktransactionWithSP) Rollback(arg0 context.Context) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Rollback", arg0)
	ret0, _ := ret[0].(error)
	return ret0
}

// Rollback indicates an expected call of Rollback.
func (mr *MocktransactionWithSPMockRecorder) Rollback(arg0 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Rollback", reflect.TypeOf((*MocktransactionWithSP)(nil).Rollback), arg0)
}

// Transaction mocks base method.
func (m *MocktransactionWithSP) Transaction() interface{} {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Transaction")
	ret0, _ := ret[0].(interface{})
	return ret0
}

// Transaction indicates an expected call of Transaction.
func (mr *MocktransactionWithSPMockRecorder) Transaction() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Transaction", reflect.TypeOf((*MocktransactionWithSP)(nil).Transaction))
}
