// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/cloudwan/gohan/db/transaction (interfaces: Transaction)

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

import (
	context "context"
	pagination "github.com/cloudwan/gohan/db/pagination"
	transaction "github.com/cloudwan/gohan/db/transaction"
	schema "github.com/cloudwan/gohan/schema"
	gomock "github.com/golang/mock/gomock"
	sqlx "github.com/jmoiron/sqlx"
	reflect "reflect"
)

// 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
}

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

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

// Closed mocks base method
func (m *MockTransaction) Closed() bool {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Closed")
	ret0, _ := ret[0].(bool)
	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() error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Commit")
	ret0, _ := ret[0].(error)
	return ret0
}

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

// Count mocks base method
func (m *MockTransaction) Count(arg0 context.Context, arg1 *schema.Schema, arg2 transaction.Filter) (uint64, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Count", arg0, arg1, arg2)
	ret0, _ := ret[0].(uint64)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

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

// Create mocks base method
func (m *MockTransaction) Create(arg0 context.Context, arg1 *schema.Resource) (transaction.Result, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Create", arg0, arg1)
	ret0, _ := ret[0].(transaction.Result)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

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

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

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

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

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

// Exec mocks base method
func (m *MockTransaction) Exec(arg0 context.Context, arg1 string, arg2 ...interface{}) error {
	m.ctrl.T.Helper()
	varargs := []interface{}{arg0, arg1}
	for _, a := range arg2 {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "Exec", varargs...)
	ret0, _ := ret[0].(error)
	return ret0
}

// Exec indicates an expected call of Exec
func (mr *MockTransactionMockRecorder) Exec(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	varargs := append([]interface{}{arg0, arg1}, arg2...)
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exec", reflect.TypeOf((*MockTransaction)(nil).Exec), varargs...)
}

// Fetch mocks base method
func (m *MockTransaction) Fetch(arg0 context.Context, arg1 *schema.Schema, arg2 transaction.Filter, arg3 *transaction.ViewOptions) (*schema.Resource, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Fetch", arg0, arg1, arg2, arg3)
	ret0, _ := ret[0].(*schema.Resource)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

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

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

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

// List mocks base method
func (m *MockTransaction) List(arg0 context.Context, arg1 *schema.Schema, arg2 transaction.Filter, arg3 *transaction.ViewOptions, arg4 *pagination.Paginator) ([]*schema.Resource, uint64, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "List", arg0, arg1, arg2, arg3, arg4)
	ret0, _ := ret[0].([]*schema.Resource)
	ret1, _ := ret[1].(uint64)
	ret2, _ := ret[2].(error)
	return ret0, ret1, ret2
}

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

// LockFetch mocks base method
func (m *MockTransaction) LockFetch(arg0 context.Context, arg1 *schema.Schema, arg2 transaction.Filter, arg3 schema.LockPolicy, arg4 *transaction.ViewOptions) (*schema.Resource, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "LockFetch", arg0, arg1, arg2, arg3, arg4)
	ret0, _ := ret[0].(*schema.Resource)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

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

// LockList mocks base method
func (m *MockTransaction) LockList(arg0 context.Context, arg1 *schema.Schema, arg2 transaction.Filter, arg3 *transaction.ViewOptions, arg4 *pagination.Paginator, arg5 schema.LockPolicy) ([]*schema.Resource, uint64, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "LockList", arg0, arg1, arg2, arg3, arg4, arg5)
	ret0, _ := ret[0].([]*schema.Resource)
	ret1, _ := ret[1].(uint64)
	ret2, _ := ret[2].(error)
	return ret0, ret1, ret2
}

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

// Query mocks base method
func (m *MockTransaction) Query(arg0 context.Context, arg1 *schema.Schema, arg2 string, arg3 []interface{}) ([]*schema.Resource, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Query", arg0, arg1, arg2, arg3)
	ret0, _ := ret[0].([]*schema.Resource)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

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

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

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

// StateFetch mocks base method
func (m *MockTransaction) StateFetch(arg0 context.Context, arg1 *schema.Schema, arg2 transaction.Filter) (transaction.ResourceState, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "StateFetch", arg0, arg1, arg2)
	ret0, _ := ret[0].(transaction.ResourceState)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

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

// StateList mocks base method
func (m *MockTransaction) StateList(arg0 context.Context, arg1 *schema.Schema, arg2 transaction.Filter) ([]transaction.ResourceState, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "StateList", arg0, arg1, arg2)
	ret0, _ := ret[0].([]transaction.ResourceState)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

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

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

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

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

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