// Code generated by mockery v1.0.0. DO NOT EDIT.

package mocks

import (
	context "context"

	db "code.justin.tv/eventbus/controlplane/internal/db"
	mock "github.com/stretchr/testify/mock"

	sqlx "github.com/jmoiron/sqlx"

	time "time"
)

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

// AccountByID provides a mock function with given fields: ctx, id
func (_m *DB) AccountByID(ctx context.Context, id int) (*db.Account, error) {
	ret := _m.Called(ctx, id)

	var r0 *db.Account
	if rf, ok := ret.Get(0).(func(context.Context, int) *db.Account); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*db.Account)
		}
	}

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

	return r0, r1
}

// AccountByServiceIDAndAWSAccount provides a mock function with given fields: ctx, serviceID, awsAccount
func (_m *DB) AccountByServiceIDAndAWSAccount(ctx context.Context, serviceID int, awsAccount string) (*db.Account, error) {
	ret := _m.Called(ctx, serviceID, awsAccount)

	var r0 *db.Account
	if rf, ok := ret.Get(0).(func(context.Context, int, string) *db.Account); ok {
		r0 = rf(ctx, serviceID, awsAccount)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*db.Account)
		}
	}

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

	return r0, r1
}

// AccountCreate provides a mock function with given fields: ctx, account
func (_m *DB) AccountCreate(ctx context.Context, account *db.Account) (int, error) {
	ret := _m.Called(ctx, account)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, *db.Account) int); ok {
		r0 = rf(ctx, account)
	} else {
		r0 = ret.Get(0).(int)
	}

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

	return r0, r1
}

// AccountDelete provides a mock function with given fields: ctx, id
func (_m *DB) AccountDelete(ctx context.Context, id int) error {
	ret := _m.Called(ctx, id)

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

	return r0
}

// AccountUpdate provides a mock function with given fields: ctx, id, accountEditable
func (_m *DB) AccountUpdate(ctx context.Context, id int, accountEditable *db.AccountEditable) (int, error) {
	ret := _m.Called(ctx, id, accountEditable)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, int, *db.AccountEditable) int); ok {
		r0 = rf(ctx, id, accountEditable)
	} else {
		r0 = ret.Get(0).(int)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, int, *db.AccountEditable) error); ok {
		r1 = rf(ctx, id, accountEditable)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// AccountUpdateCloudformationStatus provides a mock function with given fields: ctx, id, cloudformationStatus
func (_m *DB) AccountUpdateCloudformationStatus(ctx context.Context, id int, cloudformationStatus string) (int, error) {
	ret := _m.Called(ctx, id, cloudformationStatus)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, int, string) int); ok {
		r0 = rf(ctx, id, cloudformationStatus)
	} else {
		r0 = ret.Get(0).(int)
	}

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

	return r0, r1
}

// Accounts provides a mock function with given fields: ctx
func (_m *DB) Accounts(ctx context.Context) ([]*db.Account, error) {
	ret := _m.Called(ctx)

	var r0 []*db.Account
	if rf, ok := ret.Get(0).(func(context.Context) []*db.Account); ok {
		r0 = rf(ctx)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.Account)
		}
	}

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

	return r0, r1
}

// AccountsByServiceID provides a mock function with given fields: ctx, serviceID
func (_m *DB) AccountsByServiceID(ctx context.Context, serviceID int) ([]*db.Account, error) {
	ret := _m.Called(ctx, serviceID)

	var r0 []*db.Account
	if rf, ok := ret.Get(0).(func(context.Context, int) []*db.Account); ok {
		r0 = rf(ctx, serviceID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.Account)
		}
	}

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

	return r0, r1
}

// AuditLogCreate provides a mock function with given fields: ctx, al
func (_m *DB) AuditLogCreate(ctx context.Context, al *db.AuditLog) (int, error) {
	ret := _m.Called(ctx, al)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, *db.AuditLog) int); ok {
		r0 = rf(ctx, al)
	} else {
		r0 = ret.Get(0).(int)
	}

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

	return r0, r1
}

// AuditLogCreateTx provides a mock function with given fields: ctx, tx, al
func (_m *DB) AuditLogCreateTx(ctx context.Context, tx *sqlx.Tx, al *db.AuditLog) (int, error) {
	ret := _m.Called(ctx, tx, al)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, *sqlx.Tx, *db.AuditLog) int); ok {
		r0 = rf(ctx, tx, al)
	} else {
		r0 = ret.Get(0).(int)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, *sqlx.Tx, *db.AuditLog) error); ok {
		r1 = rf(ctx, tx, al)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// AuditLogsByServiceID provides a mock function with given fields: ctx, serviceID
func (_m *DB) AuditLogsByServiceID(ctx context.Context, serviceID int) ([]*db.AuditLog, error) {
	ret := _m.Called(ctx, serviceID)

	var r0 []*db.AuditLog
	if rf, ok := ret.Get(0).(func(context.Context, int) []*db.AuditLog); ok {
		r0 = rf(ctx, serviceID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.AuditLog)
		}
	}

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

	return r0, r1
}

// AuthorizedFieldByAuthContext provides a mock function with given fields: ctx, eventStreamID, messageName, fieldName
func (_m *DB) AuthorizedFieldByAuthContext(ctx context.Context, eventStreamID int, messageName string, fieldName string) (*db.AuthorizedField, error) {
	ret := _m.Called(ctx, eventStreamID, messageName, fieldName)

	var r0 *db.AuthorizedField
	if rf, ok := ret.Get(0).(func(context.Context, int, string, string) *db.AuthorizedField); ok {
		r0 = rf(ctx, eventStreamID, messageName, fieldName)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*db.AuthorizedField)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, int, string, string) error); ok {
		r1 = rf(ctx, eventStreamID, messageName, fieldName)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// AuthorizedFieldByID provides a mock function with given fields: ctx, id
func (_m *DB) AuthorizedFieldByID(ctx context.Context, id int) (*db.AuthorizedField, error) {
	ret := _m.Called(ctx, id)

	var r0 *db.AuthorizedField
	if rf, ok := ret.Get(0).(func(context.Context, int) *db.AuthorizedField); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*db.AuthorizedField)
		}
	}

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

	return r0, r1
}

// AuthorizedFieldCreate provides a mock function with given fields: ctx, authorizedField
func (_m *DB) AuthorizedFieldCreate(ctx context.Context, authorizedField *db.AuthorizedField) (int, error) {
	ret := _m.Called(ctx, authorizedField)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, *db.AuthorizedField) int); ok {
		r0 = rf(ctx, authorizedField)
	} else {
		r0 = ret.Get(0).(int)
	}

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

	return r0, r1
}

// AuthorizedFieldDeleteByID provides a mock function with given fields: ctx, id
func (_m *DB) AuthorizedFieldDeleteByID(ctx context.Context, id int) error {
	ret := _m.Called(ctx, id)

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

	return r0
}

// AuthorizedFieldPublisherGrant provides a mock function with given fields: ctx, iamRoleID, eventStreamID
func (_m *DB) AuthorizedFieldPublisherGrant(ctx context.Context, iamRoleID int, eventStreamID int) (*db.AuthorizedFieldPublisherGrant, error) {
	ret := _m.Called(ctx, iamRoleID, eventStreamID)

	var r0 *db.AuthorizedFieldPublisherGrant
	if rf, ok := ret.Get(0).(func(context.Context, int, int) *db.AuthorizedFieldPublisherGrant); ok {
		r0 = rf(ctx, iamRoleID, eventStreamID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*db.AuthorizedFieldPublisherGrant)
		}
	}

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

	return r0, r1
}

// AuthorizedFieldPublisherGrantAcquireLease provides a mock function with given fields: ctx, resourceID, timeout
func (_m *DB) AuthorizedFieldPublisherGrantAcquireLease(ctx context.Context, resourceID int, timeout time.Duration) (db.AWSLease, context.Context, error) {
	ret := _m.Called(ctx, resourceID, timeout)

	var r0 db.AWSLease
	if rf, ok := ret.Get(0).(func(context.Context, int, time.Duration) db.AWSLease); ok {
		r0 = rf(ctx, resourceID, timeout)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(db.AWSLease)
		}
	}

	var r1 context.Context
	if rf, ok := ret.Get(1).(func(context.Context, int, time.Duration) context.Context); ok {
		r1 = rf(ctx, resourceID, timeout)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(context.Context)
		}
	}

	var r2 error
	if rf, ok := ret.Get(2).(func(context.Context, int, time.Duration) error); ok {
		r2 = rf(ctx, resourceID, timeout)
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}

// AuthorizedFieldPublisherGrantByID provides a mock function with given fields: ctx, id
func (_m *DB) AuthorizedFieldPublisherGrantByID(ctx context.Context, id int) (*db.AuthorizedFieldPublisherGrant, error) {
	ret := _m.Called(ctx, id)

	var r0 *db.AuthorizedFieldPublisherGrant
	if rf, ok := ret.Get(0).(func(context.Context, int) *db.AuthorizedFieldPublisherGrant); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*db.AuthorizedFieldPublisherGrant)
		}
	}

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

	return r0, r1
}

// AuthorizedFieldPublisherGrantCreate provides a mock function with given fields: ctx, grant
func (_m *DB) AuthorizedFieldPublisherGrantCreate(ctx context.Context, grant *db.AuthorizedFieldPublisherGrant) (int, error) {
	ret := _m.Called(ctx, grant)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, *db.AuthorizedFieldPublisherGrant) int); ok {
		r0 = rf(ctx, grant)
	} else {
		r0 = ret.Get(0).(int)
	}

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

	return r0, r1
}

// AuthorizedFieldPublisherGrantDeleteByID provides a mock function with given fields: ctx, id
func (_m *DB) AuthorizedFieldPublisherGrantDeleteByID(ctx context.Context, id int) error {
	ret := _m.Called(ctx, id)

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

	return r0
}

// AuthorizedFieldPublisherGrantReleaseLease provides a mock function with given fields: lease
func (_m *DB) AuthorizedFieldPublisherGrantReleaseLease(lease db.AWSLease) error {
	ret := _m.Called(lease)

	var r0 error
	if rf, ok := ret.Get(0).(func(db.AWSLease) error); ok {
		r0 = rf(lease)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// AuthorizedFieldPublisherGrantUpdateInfra provides a mock function with given fields: ctx, lease, id, grantUpdateInfra
func (_m *DB) AuthorizedFieldPublisherGrantUpdateInfra(ctx context.Context, lease db.AWSLease, id int, grantUpdateInfra *db.AuthorizedFieldPublisherGrantInfraUpdate) (int, error) {
	ret := _m.Called(ctx, lease, id, grantUpdateInfra)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, db.AWSLease, int, *db.AuthorizedFieldPublisherGrantInfraUpdate) int); ok {
		r0 = rf(ctx, lease, id, grantUpdateInfra)
	} else {
		r0 = ret.Get(0).(int)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, db.AWSLease, int, *db.AuthorizedFieldPublisherGrantInfraUpdate) error); ok {
		r1 = rf(ctx, lease, id, grantUpdateInfra)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// AuthorizedFieldPublisherGrants provides a mock function with given fields: ctx
func (_m *DB) AuthorizedFieldPublisherGrants(ctx context.Context) ([]*db.AuthorizedFieldPublisherGrant, error) {
	ret := _m.Called(ctx)

	var r0 []*db.AuthorizedFieldPublisherGrant
	if rf, ok := ret.Get(0).(func(context.Context) []*db.AuthorizedFieldPublisherGrant); ok {
		r0 = rf(ctx)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.AuthorizedFieldPublisherGrant)
		}
	}

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

	return r0, r1
}

// AuthorizedFieldPublisherGrantsByEventStreamID provides a mock function with given fields: ctx, serviceID
func (_m *DB) AuthorizedFieldPublisherGrantsByEventStreamID(ctx context.Context, serviceID int) ([]*db.AuthorizedFieldPublisherGrant, error) {
	ret := _m.Called(ctx, serviceID)

	var r0 []*db.AuthorizedFieldPublisherGrant
	if rf, ok := ret.Get(0).(func(context.Context, int) []*db.AuthorizedFieldPublisherGrant); ok {
		r0 = rf(ctx, serviceID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.AuthorizedFieldPublisherGrant)
		}
	}

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

	return r0, r1
}

// AuthorizedFieldPublisherGrantsByIAMRoleID provides a mock function with given fields: ctx, iamRoleID
func (_m *DB) AuthorizedFieldPublisherGrantsByIAMRoleID(ctx context.Context, iamRoleID int) ([]*db.AuthorizedFieldPublisherGrant, error) {
	ret := _m.Called(ctx, iamRoleID)

	var r0 []*db.AuthorizedFieldPublisherGrant
	if rf, ok := ret.Get(0).(func(context.Context, int) []*db.AuthorizedFieldPublisherGrant); ok {
		r0 = rf(ctx, iamRoleID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.AuthorizedFieldPublisherGrant)
		}
	}

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

	return r0, r1
}

// AuthorizedFieldSubscriberGrant provides a mock function with given fields: ctx, iamRoleID, authorizedFieldID
func (_m *DB) AuthorizedFieldSubscriberGrant(ctx context.Context, iamRoleID int, authorizedFieldID int) (*db.AuthorizedFieldSubscriberGrant, error) {
	ret := _m.Called(ctx, iamRoleID, authorizedFieldID)

	var r0 *db.AuthorizedFieldSubscriberGrant
	if rf, ok := ret.Get(0).(func(context.Context, int, int) *db.AuthorizedFieldSubscriberGrant); ok {
		r0 = rf(ctx, iamRoleID, authorizedFieldID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*db.AuthorizedFieldSubscriberGrant)
		}
	}

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

	return r0, r1
}

// AuthorizedFieldSubscriberGrantAcquireLease provides a mock function with given fields: ctx, resourceID, timeout
func (_m *DB) AuthorizedFieldSubscriberGrantAcquireLease(ctx context.Context, resourceID int, timeout time.Duration) (db.AWSLease, context.Context, error) {
	ret := _m.Called(ctx, resourceID, timeout)

	var r0 db.AWSLease
	if rf, ok := ret.Get(0).(func(context.Context, int, time.Duration) db.AWSLease); ok {
		r0 = rf(ctx, resourceID, timeout)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(db.AWSLease)
		}
	}

	var r1 context.Context
	if rf, ok := ret.Get(1).(func(context.Context, int, time.Duration) context.Context); ok {
		r1 = rf(ctx, resourceID, timeout)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(context.Context)
		}
	}

	var r2 error
	if rf, ok := ret.Get(2).(func(context.Context, int, time.Duration) error); ok {
		r2 = rf(ctx, resourceID, timeout)
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}

// AuthorizedFieldSubscriberGrantByID provides a mock function with given fields: ctx, id
func (_m *DB) AuthorizedFieldSubscriberGrantByID(ctx context.Context, id int) (*db.AuthorizedFieldSubscriberGrant, error) {
	ret := _m.Called(ctx, id)

	var r0 *db.AuthorizedFieldSubscriberGrant
	if rf, ok := ret.Get(0).(func(context.Context, int) *db.AuthorizedFieldSubscriberGrant); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*db.AuthorizedFieldSubscriberGrant)
		}
	}

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

	return r0, r1
}

// AuthorizedFieldSubscriberGrantCreate provides a mock function with given fields: ctx, grant
func (_m *DB) AuthorizedFieldSubscriberGrantCreate(ctx context.Context, grant *db.AuthorizedFieldSubscriberGrant) (int, error) {
	ret := _m.Called(ctx, grant)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, *db.AuthorizedFieldSubscriberGrant) int); ok {
		r0 = rf(ctx, grant)
	} else {
		r0 = ret.Get(0).(int)
	}

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

	return r0, r1
}

// AuthorizedFieldSubscriberGrantDeleteByID provides a mock function with given fields: ctx, id
func (_m *DB) AuthorizedFieldSubscriberGrantDeleteByID(ctx context.Context, id int) error {
	ret := _m.Called(ctx, id)

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

	return r0
}

// AuthorizedFieldSubscriberGrantReleaseLease provides a mock function with given fields: lease
func (_m *DB) AuthorizedFieldSubscriberGrantReleaseLease(lease db.AWSLease) error {
	ret := _m.Called(lease)

	var r0 error
	if rf, ok := ret.Get(0).(func(db.AWSLease) error); ok {
		r0 = rf(lease)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// AuthorizedFieldSubscriberGrantUpdateInfra provides a mock function with given fields: ctx, lease, id, grantUpdateInfra
func (_m *DB) AuthorizedFieldSubscriberGrantUpdateInfra(ctx context.Context, lease db.AWSLease, id int, grantUpdateInfra *db.AuthorizedFieldSubscriberGrantInfraUpdate) (int, error) {
	ret := _m.Called(ctx, lease, id, grantUpdateInfra)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, db.AWSLease, int, *db.AuthorizedFieldSubscriberGrantInfraUpdate) int); ok {
		r0 = rf(ctx, lease, id, grantUpdateInfra)
	} else {
		r0 = ret.Get(0).(int)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, db.AWSLease, int, *db.AuthorizedFieldSubscriberGrantInfraUpdate) error); ok {
		r1 = rf(ctx, lease, id, grantUpdateInfra)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// AuthorizedFieldSubscriberGrants provides a mock function with given fields: ctx
func (_m *DB) AuthorizedFieldSubscriberGrants(ctx context.Context) ([]*db.AuthorizedFieldSubscriberGrant, error) {
	ret := _m.Called(ctx)

	var r0 []*db.AuthorizedFieldSubscriberGrant
	if rf, ok := ret.Get(0).(func(context.Context) []*db.AuthorizedFieldSubscriberGrant); ok {
		r0 = rf(ctx)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.AuthorizedFieldSubscriberGrant)
		}
	}

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

	return r0, r1
}

// AuthorizedFieldSubscriberGrantsByAuthorizedField provides a mock function with given fields: ctx, authedFieldID
func (_m *DB) AuthorizedFieldSubscriberGrantsByAuthorizedField(ctx context.Context, authedFieldID int) ([]*db.AuthorizedFieldSubscriberGrant, error) {
	ret := _m.Called(ctx, authedFieldID)

	var r0 []*db.AuthorizedFieldSubscriberGrant
	if rf, ok := ret.Get(0).(func(context.Context, int) []*db.AuthorizedFieldSubscriberGrant); ok {
		r0 = rf(ctx, authedFieldID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.AuthorizedFieldSubscriberGrant)
		}
	}

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

	return r0, r1
}

// AuthorizedFieldSubscriberGrantsByIAMRoleID provides a mock function with given fields: ctx, iamRoleID
func (_m *DB) AuthorizedFieldSubscriberGrantsByIAMRoleID(ctx context.Context, iamRoleID int) ([]*db.AuthorizedFieldSubscriberGrant, error) {
	ret := _m.Called(ctx, iamRoleID)

	var r0 []*db.AuthorizedFieldSubscriberGrant
	if rf, ok := ret.Get(0).(func(context.Context, int) []*db.AuthorizedFieldSubscriberGrant); ok {
		r0 = rf(ctx, iamRoleID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.AuthorizedFieldSubscriberGrant)
		}
	}

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

	return r0, r1
}

// AuthorizedFields provides a mock function with given fields: ctx
func (_m *DB) AuthorizedFields(ctx context.Context) ([]*db.AuthorizedField, error) {
	ret := _m.Called(ctx)

	var r0 []*db.AuthorizedField
	if rf, ok := ret.Get(0).(func(context.Context) []*db.AuthorizedField); ok {
		r0 = rf(ctx)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.AuthorizedField)
		}
	}

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

	return r0, r1
}

// AuthorizedFieldsByEventStreamID provides a mock function with given fields: ctx, eventStreamID
func (_m *DB) AuthorizedFieldsByEventStreamID(ctx context.Context, eventStreamID int) ([]*db.AuthorizedField, error) {
	ret := _m.Called(ctx, eventStreamID)

	var r0 []*db.AuthorizedField
	if rf, ok := ret.Get(0).(func(context.Context, int) []*db.AuthorizedField); ok {
		r0 = rf(ctx, eventStreamID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.AuthorizedField)
		}
	}

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

	return r0, r1
}

// EventStreamAcquireLease provides a mock function with given fields: ctx, resourceID, timeout
func (_m *DB) EventStreamAcquireLease(ctx context.Context, resourceID int, timeout time.Duration) (db.AWSLease, context.Context, error) {
	ret := _m.Called(ctx, resourceID, timeout)

	var r0 db.AWSLease
	if rf, ok := ret.Get(0).(func(context.Context, int, time.Duration) db.AWSLease); ok {
		r0 = rf(ctx, resourceID, timeout)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(db.AWSLease)
		}
	}

	var r1 context.Context
	if rf, ok := ret.Get(1).(func(context.Context, int, time.Duration) context.Context); ok {
		r1 = rf(ctx, resourceID, timeout)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(context.Context)
		}
	}

	var r2 error
	if rf, ok := ret.Get(2).(func(context.Context, int, time.Duration) error); ok {
		r2 = rf(ctx, resourceID, timeout)
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}

// EventStreamByID provides a mock function with given fields: ctx, id
func (_m *DB) EventStreamByID(ctx context.Context, id int) (*db.EventStream, error) {
	ret := _m.Called(ctx, id)

	var r0 *db.EventStream
	if rf, ok := ret.Get(0).(func(context.Context, int) *db.EventStream); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*db.EventStream)
		}
	}

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

	return r0, r1
}

// EventStreamByNameAndEnvironment provides a mock function with given fields: ctx, name, environment
func (_m *DB) EventStreamByNameAndEnvironment(ctx context.Context, name string, environment string) (*db.EventStream, error) {
	ret := _m.Called(ctx, name, environment)

	var r0 *db.EventStream
	if rf, ok := ret.Get(0).(func(context.Context, string, string) *db.EventStream); ok {
		r0 = rf(ctx, name, environment)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*db.EventStream)
		}
	}

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

	return r0, r1
}

// EventStreamCreate provides a mock function with given fields: ctx, eventStream
func (_m *DB) EventStreamCreate(ctx context.Context, eventStream *db.EventStream) (int, error) {
	ret := _m.Called(ctx, eventStream)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, *db.EventStream) int); ok {
		r0 = rf(ctx, eventStream)
	} else {
		r0 = ret.Get(0).(int)
	}

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

	return r0, r1
}

// EventStreamDeleteByEventTypeID provides a mock function with given fields: ctx, eventTypeID
func (_m *DB) EventStreamDeleteByEventTypeID(ctx context.Context, eventTypeID int) (int, error) {
	ret := _m.Called(ctx, eventTypeID)

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

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

	return r0, r1
}

// EventStreamPublisherAccounts provides a mock function with given fields: ctx, eventStreamID
func (_m *DB) EventStreamPublisherAccounts(ctx context.Context, eventStreamID int) ([]*db.Account, error) {
	ret := _m.Called(ctx, eventStreamID)

	var r0 []*db.Account
	if rf, ok := ret.Get(0).(func(context.Context, int) []*db.Account); ok {
		r0 = rf(ctx, eventStreamID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.Account)
		}
	}

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

	return r0, r1
}

// EventStreamPublisherIAMRoles provides a mock function with given fields: ctx, eventStreamID
func (_m *DB) EventStreamPublisherIAMRoles(ctx context.Context, eventStreamID int) ([]*db.IAMRole, error) {
	ret := _m.Called(ctx, eventStreamID)

	var r0 []*db.IAMRole
	if rf, ok := ret.Get(0).(func(context.Context, int) []*db.IAMRole); ok {
		r0 = rf(ctx, eventStreamID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.IAMRole)
		}
	}

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

	return r0, r1
}

// EventStreamReleaseLease provides a mock function with given fields: lease
func (_m *DB) EventStreamReleaseLease(lease db.AWSLease) error {
	ret := _m.Called(lease)

	var r0 error
	if rf, ok := ret.Get(0).(func(db.AWSLease) error); ok {
		r0 = rf(lease)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// EventStreamUpdate provides a mock function with given fields: ctx, id, eventStreamEditable
func (_m *DB) EventStreamUpdate(ctx context.Context, id int, eventStreamEditable *db.EventStreamEditable) (int, error) {
	ret := _m.Called(ctx, id, eventStreamEditable)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, int, *db.EventStreamEditable) int); ok {
		r0 = rf(ctx, id, eventStreamEditable)
	} else {
		r0 = ret.Get(0).(int)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, int, *db.EventStreamEditable) error); ok {
		r1 = rf(ctx, id, eventStreamEditable)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// EventStreamUpdateInfra provides a mock function with given fields: ctx, lease, id, eventStreamInfraUpdate
func (_m *DB) EventStreamUpdateInfra(ctx context.Context, lease db.AWSLease, id int, eventStreamInfraUpdate *db.EventStreamInfraUpdate) (int, error) {
	ret := _m.Called(ctx, lease, id, eventStreamInfraUpdate)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, db.AWSLease, int, *db.EventStreamInfraUpdate) int); ok {
		r0 = rf(ctx, lease, id, eventStreamInfraUpdate)
	} else {
		r0 = ret.Get(0).(int)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, db.AWSLease, int, *db.EventStreamInfraUpdate) error); ok {
		r1 = rf(ctx, lease, id, eventStreamInfraUpdate)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// EventStreams provides a mock function with given fields: ctx
func (_m *DB) EventStreams(ctx context.Context) ([]*db.EventStream, error) {
	ret := _m.Called(ctx)

	var r0 []*db.EventStream
	if rf, ok := ret.Get(0).(func(context.Context) []*db.EventStream); ok {
		r0 = rf(ctx)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.EventStream)
		}
	}

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

	return r0, r1
}

// EventStreamsByEnvironment provides a mock function with given fields: ctx, environment
func (_m *DB) EventStreamsByEnvironment(ctx context.Context, environment string) ([]*db.EventStream, error) {
	ret := _m.Called(ctx, environment)

	var r0 []*db.EventStream
	if rf, ok := ret.Get(0).(func(context.Context, string) []*db.EventStream); ok {
		r0 = rf(ctx, environment)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.EventStream)
		}
	}

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

	return r0, r1
}

// EventStreamsByEventTypeID provides a mock function with given fields: ctx, eventTypeID
func (_m *DB) EventStreamsByEventTypeID(ctx context.Context, eventTypeID int) ([]*db.EventStream, error) {
	ret := _m.Called(ctx, eventTypeID)

	var r0 []*db.EventStream
	if rf, ok := ret.Get(0).(func(context.Context, int) []*db.EventStream); ok {
		r0 = rf(ctx, eventTypeID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.EventStream)
		}
	}

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

	return r0, r1
}

// EventStreamsByName provides a mock function with given fields: ctx, eventName
func (_m *DB) EventStreamsByName(ctx context.Context, eventName string) ([]*db.EventStream, error) {
	ret := _m.Called(ctx, eventName)

	var r0 []*db.EventStream
	if rf, ok := ret.Get(0).(func(context.Context, string) []*db.EventStream); ok {
		r0 = rf(ctx, eventName)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.EventStream)
		}
	}

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

	return r0, r1
}

// EventTypeAndStreamsCreate provides a mock function with given fields: ctx, eventType, environments
func (_m *DB) EventTypeAndStreamsCreate(ctx context.Context, eventType *db.EventType, environments []string) ([]*db.EventStream, error) {
	ret := _m.Called(ctx, eventType, environments)

	var r0 []*db.EventStream
	if rf, ok := ret.Get(0).(func(context.Context, *db.EventType, []string) []*db.EventStream); ok {
		r0 = rf(ctx, eventType, environments)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.EventStream)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, *db.EventType, []string) error); ok {
		r1 = rf(ctx, eventType, environments)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// EventTypeByID provides a mock function with given fields: ctx, id
func (_m *DB) EventTypeByID(ctx context.Context, id int) (*db.EventType, error) {
	ret := _m.Called(ctx, id)

	var r0 *db.EventType
	if rf, ok := ret.Get(0).(func(context.Context, int) *db.EventType); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*db.EventType)
		}
	}

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

	return r0, r1
}

// EventTypeByName provides a mock function with given fields: ctx, name
func (_m *DB) EventTypeByName(ctx context.Context, name string) (*db.EventType, error) {
	ret := _m.Called(ctx, name)

	var r0 *db.EventType
	if rf, ok := ret.Get(0).(func(context.Context, string) *db.EventType); ok {
		r0 = rf(ctx, name)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*db.EventType)
		}
	}

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

	return r0, r1
}

// EventTypeCreate provides a mock function with given fields: ctx, eventType
func (_m *DB) EventTypeCreate(ctx context.Context, eventType *db.EventType) (int, error) {
	ret := _m.Called(ctx, eventType)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, *db.EventType) int); ok {
		r0 = rf(ctx, eventType)
	} else {
		r0 = ret.Get(0).(int)
	}

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

	return r0, r1
}

// EventTypeDeleteByName provides a mock function with given fields: ctx, name
func (_m *DB) EventTypeDeleteByName(ctx context.Context, name string) error {
	ret := _m.Called(ctx, name)

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

	return r0
}

// EventTypeUpdate provides a mock function with given fields: ctx, id, eventTypeEditable
func (_m *DB) EventTypeUpdate(ctx context.Context, id int, eventTypeEditable *db.EventTypeEditable) (int, error) {
	ret := _m.Called(ctx, id, eventTypeEditable)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, int, *db.EventTypeEditable) int); ok {
		r0 = rf(ctx, id, eventTypeEditable)
	} else {
		r0 = ret.Get(0).(int)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, int, *db.EventTypeEditable) error); ok {
		r1 = rf(ctx, id, eventTypeEditable)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// EventTypes provides a mock function with given fields: ctx
func (_m *DB) EventTypes(ctx context.Context) ([]*db.EventType, error) {
	ret := _m.Called(ctx)

	var r0 []*db.EventType
	if rf, ok := ret.Get(0).(func(context.Context) []*db.EventType); ok {
		r0 = rf(ctx)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.EventType)
		}
	}

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

	return r0, r1
}

// FeatureFlagByName provides a mock function with given fields: ctx, name
func (_m *DB) FeatureFlagByName(ctx context.Context, name string) (*db.FeatureFlag, error) {
	ret := _m.Called(ctx, name)

	var r0 *db.FeatureFlag
	if rf, ok := ret.Get(0).(func(context.Context, string) *db.FeatureFlag); ok {
		r0 = rf(ctx, name)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*db.FeatureFlag)
		}
	}

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

	return r0, r1
}

// FeatureFlagCreate provides a mock function with given fields: ctx, ff
func (_m *DB) FeatureFlagCreate(ctx context.Context, ff *db.FeatureFlag) (int, error) {
	ret := _m.Called(ctx, ff)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, *db.FeatureFlag) int); ok {
		r0 = rf(ctx, ff)
	} else {
		r0 = ret.Get(0).(int)
	}

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

	return r0, r1
}

// FeatureFlagDelete provides a mock function with given fields: ctx, name
func (_m *DB) FeatureFlagDelete(ctx context.Context, name string) error {
	ret := _m.Called(ctx, name)

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

	return r0
}

// FeatureFlagDisable provides a mock function with given fields: ctx, name
func (_m *DB) FeatureFlagDisable(ctx context.Context, name string) error {
	ret := _m.Called(ctx, name)

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

	return r0
}

// FeatureFlagEnable provides a mock function with given fields: ctx, name
func (_m *DB) FeatureFlagEnable(ctx context.Context, name string) error {
	ret := _m.Called(ctx, name)

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

	return r0
}

// FeatureFlags provides a mock function with given fields: ctx
func (_m *DB) FeatureFlags(ctx context.Context) ([]*db.FeatureFlag, error) {
	ret := _m.Called(ctx)

	var r0 []*db.FeatureFlag
	if rf, ok := ret.Get(0).(func(context.Context) []*db.FeatureFlag); ok {
		r0 = rf(ctx)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.FeatureFlag)
		}
	}

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

	return r0, r1
}

// IAMRoleAcquireLease provides a mock function with given fields: _a0, _a1, _a2
func (_m *DB) IAMRoleAcquireLease(_a0 context.Context, _a1 int, _a2 time.Duration) (db.AWSLease, context.Context, error) {
	ret := _m.Called(_a0, _a1, _a2)

	var r0 db.AWSLease
	if rf, ok := ret.Get(0).(func(context.Context, int, time.Duration) db.AWSLease); ok {
		r0 = rf(_a0, _a1, _a2)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(db.AWSLease)
		}
	}

	var r1 context.Context
	if rf, ok := ret.Get(1).(func(context.Context, int, time.Duration) context.Context); ok {
		r1 = rf(_a0, _a1, _a2)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(context.Context)
		}
	}

	var r2 error
	if rf, ok := ret.Get(2).(func(context.Context, int, time.Duration) error); ok {
		r2 = rf(_a0, _a1, _a2)
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}

// IAMRoleByARN provides a mock function with given fields: _a0, _a1
func (_m *DB) IAMRoleByARN(_a0 context.Context, _a1 string) (*db.IAMRole, error) {
	ret := _m.Called(_a0, _a1)

	var r0 *db.IAMRole
	if rf, ok := ret.Get(0).(func(context.Context, string) *db.IAMRole); ok {
		r0 = rf(_a0, _a1)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*db.IAMRole)
		}
	}

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

	return r0, r1
}

// IAMRoleByID provides a mock function with given fields: _a0, _a1
func (_m *DB) IAMRoleByID(_a0 context.Context, _a1 int) (*db.IAMRole, error) {
	ret := _m.Called(_a0, _a1)

	var r0 *db.IAMRole
	if rf, ok := ret.Get(0).(func(context.Context, int) *db.IAMRole); ok {
		r0 = rf(_a0, _a1)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*db.IAMRole)
		}
	}

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

	return r0, r1
}

// IAMRoleCreate provides a mock function with given fields: _a0, _a1
func (_m *DB) IAMRoleCreate(_a0 context.Context, _a1 *db.IAMRole) (int, error) {
	ret := _m.Called(_a0, _a1)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, *db.IAMRole) int); ok {
		r0 = rf(_a0, _a1)
	} else {
		r0 = ret.Get(0).(int)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, *db.IAMRole) error); ok {
		r1 = rf(_a0, _a1)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// IAMRoleDelete provides a mock function with given fields: _a0, _a1, _a2
func (_m *DB) IAMRoleDelete(_a0 context.Context, _a1 db.AWSLease, _a2 int) error {
	ret := _m.Called(_a0, _a1, _a2)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, db.AWSLease, int) error); ok {
		r0 = rf(_a0, _a1, _a2)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// IAMRoleReleaseLease provides a mock function with given fields: _a0
func (_m *DB) IAMRoleReleaseLease(_a0 db.AWSLease) error {
	ret := _m.Called(_a0)

	var r0 error
	if rf, ok := ret.Get(0).(func(db.AWSLease) error); ok {
		r0 = rf(_a0)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// IAMRoleUpdate provides a mock function with given fields: _a0, _a1, _a2
func (_m *DB) IAMRoleUpdate(_a0 context.Context, _a1 int, _a2 *db.IAMRoleEditable) (int, error) {
	ret := _m.Called(_a0, _a1, _a2)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, int, *db.IAMRoleEditable) int); ok {
		r0 = rf(_a0, _a1, _a2)
	} else {
		r0 = ret.Get(0).(int)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, int, *db.IAMRoleEditable) error); ok {
		r1 = rf(_a0, _a1, _a2)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// IAMRoleUpdateCloudformationStatus provides a mock function with given fields: _a0, _a1, _a2
func (_m *DB) IAMRoleUpdateCloudformationStatus(_a0 context.Context, _a1 int, _a2 string) (int, error) {
	ret := _m.Called(_a0, _a1, _a2)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, int, string) int); ok {
		r0 = rf(_a0, _a1, _a2)
	} else {
		r0 = ret.Get(0).(int)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, int, string) error); ok {
		r1 = rf(_a0, _a1, _a2)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// IAMRoles provides a mock function with given fields: _a0
func (_m *DB) IAMRoles(_a0 context.Context) ([]*db.IAMRole, error) {
	ret := _m.Called(_a0)

	var r0 []*db.IAMRole
	if rf, ok := ret.Get(0).(func(context.Context) []*db.IAMRole); ok {
		r0 = rf(_a0)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.IAMRole)
		}
	}

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

	return r0, r1
}

// IAMRolesByServiceID provides a mock function with given fields: _a0, _a1
func (_m *DB) IAMRolesByServiceID(_a0 context.Context, _a1 int) ([]*db.IAMRole, error) {
	ret := _m.Called(_a0, _a1)

	var r0 []*db.IAMRole
	if rf, ok := ret.Get(0).(func(context.Context, int) []*db.IAMRole); ok {
		r0 = rf(_a0, _a1)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.IAMRole)
		}
	}

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

	return r0, r1
}

// IAMRolesEditForService provides a mock function with given fields: ctx, serviceID, desiredRoles
func (_m *DB) IAMRolesEditForService(ctx context.Context, serviceID int, desiredRoles db.IAMRolesEditable) (*db.IAMRolesEditReport, error) {
	ret := _m.Called(ctx, serviceID, desiredRoles)

	var r0 *db.IAMRolesEditReport
	if rf, ok := ret.Get(0).(func(context.Context, int, db.IAMRolesEditable) *db.IAMRolesEditReport); ok {
		r0 = rf(ctx, serviceID, desiredRoles)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*db.IAMRolesEditReport)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, int, db.IAMRolesEditable) error); ok {
		r1 = rf(ctx, serviceID, desiredRoles)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// PublicationCreate provides a mock function with given fields: ctx, publication
func (_m *DB) PublicationCreate(ctx context.Context, publication *db.Publication) (int, error) {
	ret := _m.Called(ctx, publication)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, *db.Publication) int); ok {
		r0 = rf(ctx, publication)
	} else {
		r0 = ret.Get(0).(int)
	}

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

	return r0, r1
}

// PublicationDelete provides a mock function with given fields: ctx, id
func (_m *DB) PublicationDelete(ctx context.Context, id int) error {
	ret := _m.Called(ctx, id)

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

	return r0
}

// PublicationDeleteByEventStreamID provides a mock function with given fields: ctx, eventStreamID
func (_m *DB) PublicationDeleteByEventStreamID(ctx context.Context, eventStreamID int) error {
	ret := _m.Called(ctx, eventStreamID)

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

	return r0
}

// Publications provides a mock function with given fields: ctx
func (_m *DB) Publications(ctx context.Context) ([]*db.Publication, error) {
	ret := _m.Called(ctx)

	var r0 []*db.Publication
	if rf, ok := ret.Get(0).(func(context.Context) []*db.Publication); ok {
		r0 = rf(ctx)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.Publication)
		}
	}

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

	return r0, r1
}

// PublicationsByEventStreamID provides a mock function with given fields: ctx, eventStreamID
func (_m *DB) PublicationsByEventStreamID(ctx context.Context, eventStreamID int) ([]*db.Publication, error) {
	ret := _m.Called(ctx, eventStreamID)

	var r0 []*db.Publication
	if rf, ok := ret.Get(0).(func(context.Context, int) []*db.Publication); ok {
		r0 = rf(ctx, eventStreamID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.Publication)
		}
	}

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

	return r0, r1
}

// PublicationsByIAMRoleID provides a mock function with given fields: ctx, iamRoleID
func (_m *DB) PublicationsByIAMRoleID(ctx context.Context, iamRoleID int) ([]*db.Publication, error) {
	ret := _m.Called(ctx, iamRoleID)

	var r0 []*db.Publication
	if rf, ok := ret.Get(0).(func(context.Context, int) []*db.Publication); ok {
		r0 = rf(ctx, iamRoleID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.Publication)
		}
	}

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

	return r0, r1
}

// PublicationsByServiceID provides a mock function with given fields: ctx, serviceID
func (_m *DB) PublicationsByServiceID(ctx context.Context, serviceID int) ([]*db.Publication, error) {
	ret := _m.Called(ctx, serviceID)

	var r0 []*db.Publication
	if rf, ok := ret.Get(0).(func(context.Context, int) []*db.Publication); ok {
		r0 = rf(ctx, serviceID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.Publication)
		}
	}

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

	return r0, r1
}

// PublisherServicesByEventStreamID provides a mock function with given fields: ctx, eventStreamID
func (_m *DB) PublisherServicesByEventStreamID(ctx context.Context, eventStreamID int) ([]*db.Service, error) {
	ret := _m.Called(ctx, eventStreamID)

	var r0 []*db.Service
	if rf, ok := ret.Get(0).(func(context.Context, int) []*db.Service); ok {
		r0 = rf(ctx, eventStreamID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.Service)
		}
	}

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

	return r0, r1
}

// ServiceByID provides a mock function with given fields: ctx, id
func (_m *DB) ServiceByID(ctx context.Context, id int) (*db.Service, error) {
	ret := _m.Called(ctx, id)

	var r0 *db.Service
	if rf, ok := ret.Get(0).(func(context.Context, int) *db.Service); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*db.Service)
		}
	}

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

	return r0, r1
}

// ServiceByServiceCatalogID provides a mock function with given fields: ctx, id
func (_m *DB) ServiceByServiceCatalogID(ctx context.Context, id string) (*db.Service, error) {
	ret := _m.Called(ctx, id)

	var r0 *db.Service
	if rf, ok := ret.Get(0).(func(context.Context, string) *db.Service); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*db.Service)
		}
	}

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

	return r0, r1
}

// ServiceCreate provides a mock function with given fields: ctx, service
func (_m *DB) ServiceCreate(ctx context.Context, service *db.Service) (int, error) {
	ret := _m.Called(ctx, service)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, *db.Service) int); ok {
		r0 = rf(ctx, service)
	} else {
		r0 = ret.Get(0).(int)
	}

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

	return r0, r1
}

// ServiceDelete provides a mock function with given fields: ctx, id
func (_m *DB) ServiceDelete(ctx context.Context, id int) error {
	ret := _m.Called(ctx, id)

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

	return r0
}

// ServiceUpdate provides a mock function with given fields: ctx, id, serviceEditable
func (_m *DB) ServiceUpdate(ctx context.Context, id int, serviceEditable *db.ServiceEditable) (int, error) {
	ret := _m.Called(ctx, id, serviceEditable)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, int, *db.ServiceEditable) int); ok {
		r0 = rf(ctx, id, serviceEditable)
	} else {
		r0 = ret.Get(0).(int)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, int, *db.ServiceEditable) error); ok {
		r1 = rf(ctx, id, serviceEditable)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Services provides a mock function with given fields: ctx
func (_m *DB) Services(ctx context.Context) ([]*db.Service, error) {
	ret := _m.Called(ctx)

	var r0 []*db.Service
	if rf, ok := ret.Get(0).(func(context.Context) []*db.Service); ok {
		r0 = rf(ctx)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.Service)
		}
	}

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

	return r0, r1
}

// ServicesByLDAPGroup provides a mock function with given fields: ctx, ldap
func (_m *DB) ServicesByLDAPGroup(ctx context.Context, ldap string) ([]*db.Service, error) {
	ret := _m.Called(ctx, ldap)

	var r0 []*db.Service
	if rf, ok := ret.Get(0).(func(context.Context, string) []*db.Service); ok {
		r0 = rf(ctx, ldap)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.Service)
		}
	}

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

	return r0, r1
}

// ServicesSubscribedToEventType provides a mock function with given fields: ctx, eventType
func (_m *DB) ServicesSubscribedToEventType(ctx context.Context, eventType string) ([]*db.Service, error) {
	ret := _m.Called(ctx, eventType)

	var r0 []*db.Service
	if rf, ok := ret.Get(0).(func(context.Context, string) []*db.Service); ok {
		r0 = rf(ctx, eventType)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.Service)
		}
	}

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

	return r0, r1
}

// ServicesWithIAMRoles provides a mock function with given fields: ctx
func (_m *DB) ServicesWithIAMRoles(ctx context.Context) ([]*db.Service, error) {
	ret := _m.Called(ctx)

	var r0 []*db.Service
	if rf, ok := ret.Get(0).(func(context.Context) []*db.Service); ok {
		r0 = rf(ctx)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.Service)
		}
	}

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

	return r0, r1
}

// SubscriptionAcquireLease provides a mock function with given fields: ctx, resourceID, timeout
func (_m *DB) SubscriptionAcquireLease(ctx context.Context, resourceID int, timeout time.Duration) (db.AWSLease, context.Context, error) {
	ret := _m.Called(ctx, resourceID, timeout)

	var r0 db.AWSLease
	if rf, ok := ret.Get(0).(func(context.Context, int, time.Duration) db.AWSLease); ok {
		r0 = rf(ctx, resourceID, timeout)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(db.AWSLease)
		}
	}

	var r1 context.Context
	if rf, ok := ret.Get(1).(func(context.Context, int, time.Duration) context.Context); ok {
		r1 = rf(ctx, resourceID, timeout)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(context.Context)
		}
	}

	var r2 error
	if rf, ok := ret.Get(2).(func(context.Context, int, time.Duration) error); ok {
		r2 = rf(ctx, resourceID, timeout)
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}

// SubscriptionByEventStreamIDAndSubscriptionTargetID provides a mock function with given fields: ctx, eventStreamID, subscriptionTargetID
func (_m *DB) SubscriptionByEventStreamIDAndSubscriptionTargetID(ctx context.Context, eventStreamID int, subscriptionTargetID int) (*db.Subscription, error) {
	ret := _m.Called(ctx, eventStreamID, subscriptionTargetID)

	var r0 *db.Subscription
	if rf, ok := ret.Get(0).(func(context.Context, int, int) *db.Subscription); ok {
		r0 = rf(ctx, eventStreamID, subscriptionTargetID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*db.Subscription)
		}
	}

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

	return r0, r1
}

// SubscriptionByID provides a mock function with given fields: ctx, id
func (_m *DB) SubscriptionByID(ctx context.Context, id int) (*db.Subscription, error) {
	ret := _m.Called(ctx, id)

	var r0 *db.Subscription
	if rf, ok := ret.Get(0).(func(context.Context, int) *db.Subscription); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*db.Subscription)
		}
	}

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

	return r0, r1
}

// SubscriptionCreate provides a mock function with given fields: ctx, subscription
func (_m *DB) SubscriptionCreate(ctx context.Context, subscription *db.Subscription) (int, error) {
	ret := _m.Called(ctx, subscription)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, *db.Subscription) int); ok {
		r0 = rf(ctx, subscription)
	} else {
		r0 = ret.Get(0).(int)
	}

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

	return r0, r1
}

// SubscriptionDelete provides a mock function with given fields: ctx, lease, subscriptionID
func (_m *DB) SubscriptionDelete(ctx context.Context, lease db.AWSLease, subscriptionID int) error {
	ret := _m.Called(ctx, lease, subscriptionID)

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

	return r0
}

// SubscriptionReleaseLease provides a mock function with given fields: lease
func (_m *DB) SubscriptionReleaseLease(lease db.AWSLease) error {
	ret := _m.Called(lease)

	var r0 error
	if rf, ok := ret.Get(0).(func(db.AWSLease) error); ok {
		r0 = rf(lease)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// SubscriptionTargetAcquireLease provides a mock function with given fields: ctx, resourceID, timeout
func (_m *DB) SubscriptionTargetAcquireLease(ctx context.Context, resourceID int, timeout time.Duration) (db.AWSLease, context.Context, error) {
	ret := _m.Called(ctx, resourceID, timeout)

	var r0 db.AWSLease
	if rf, ok := ret.Get(0).(func(context.Context, int, time.Duration) db.AWSLease); ok {
		r0 = rf(ctx, resourceID, timeout)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(db.AWSLease)
		}
	}

	var r1 context.Context
	if rf, ok := ret.Get(1).(func(context.Context, int, time.Duration) context.Context); ok {
		r1 = rf(ctx, resourceID, timeout)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(context.Context)
		}
	}

	var r2 error
	if rf, ok := ret.Get(2).(func(context.Context, int, time.Duration) error); ok {
		r2 = rf(ctx, resourceID, timeout)
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}

// SubscriptionTargetByID provides a mock function with given fields: ctx, id
func (_m *DB) SubscriptionTargetByID(ctx context.Context, id int) (*db.SubscriptionTarget, error) {
	ret := _m.Called(ctx, id)

	var r0 *db.SubscriptionTarget
	if rf, ok := ret.Get(0).(func(context.Context, int) *db.SubscriptionTarget); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*db.SubscriptionTarget)
		}
	}

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

	return r0, r1
}

// SubscriptionTargetByQueueURL provides a mock function with given fields: ctx, name
func (_m *DB) SubscriptionTargetByQueueURL(ctx context.Context, name string) (*db.SubscriptionTarget, error) {
	ret := _m.Called(ctx, name)

	var r0 *db.SubscriptionTarget
	if rf, ok := ret.Get(0).(func(context.Context, string) *db.SubscriptionTarget); ok {
		r0 = rf(ctx, name)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*db.SubscriptionTarget)
		}
	}

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

	return r0, r1
}

// SubscriptionTargetCreate provides a mock function with given fields: ctx, subscriptionTarget
func (_m *DB) SubscriptionTargetCreate(ctx context.Context, subscriptionTarget *db.SubscriptionTarget) (int, error) {
	ret := _m.Called(ctx, subscriptionTarget)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, *db.SubscriptionTarget) int); ok {
		r0 = rf(ctx, subscriptionTarget)
	} else {
		r0 = ret.Get(0).(int)
	}

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

	return r0, r1
}

// SubscriptionTargetDelete provides a mock function with given fields: ctx, lease, id
func (_m *DB) SubscriptionTargetDelete(ctx context.Context, lease db.AWSLease, id int) error {
	ret := _m.Called(ctx, lease, id)

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

	return r0
}

// SubscriptionTargetReleaseLease provides a mock function with given fields: lease
func (_m *DB) SubscriptionTargetReleaseLease(lease db.AWSLease) error {
	ret := _m.Called(lease)

	var r0 error
	if rf, ok := ret.Get(0).(func(db.AWSLease) error); ok {
		r0 = rf(lease)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// SubscriptionTargetUpdate provides a mock function with given fields: ctx, id, subscriptionTargetEditable
func (_m *DB) SubscriptionTargetUpdate(ctx context.Context, id int, subscriptionTargetEditable *db.SubscriptionTargetEditable) (int, error) {
	ret := _m.Called(ctx, id, subscriptionTargetEditable)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, int, *db.SubscriptionTargetEditable) int); ok {
		r0 = rf(ctx, id, subscriptionTargetEditable)
	} else {
		r0 = ret.Get(0).(int)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, int, *db.SubscriptionTargetEditable) error); ok {
		r1 = rf(ctx, id, subscriptionTargetEditable)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// SubscriptionTargetUpdateInfra provides a mock function with given fields: ctx, lease, id, subscriptionTargetInfraUpdate
func (_m *DB) SubscriptionTargetUpdateInfra(ctx context.Context, lease db.AWSLease, id int, subscriptionTargetInfraUpdate *db.SubscriptionTargetInfraUpdate) (int, error) {
	ret := _m.Called(ctx, lease, id, subscriptionTargetInfraUpdate)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, db.AWSLease, int, *db.SubscriptionTargetInfraUpdate) int); ok {
		r0 = rf(ctx, lease, id, subscriptionTargetInfraUpdate)
	} else {
		r0 = ret.Get(0).(int)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, db.AWSLease, int, *db.SubscriptionTargetInfraUpdate) error); ok {
		r1 = rf(ctx, lease, id, subscriptionTargetInfraUpdate)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// SubscriptionTargets provides a mock function with given fields: ctx
func (_m *DB) SubscriptionTargets(ctx context.Context) ([]*db.SubscriptionTarget, error) {
	ret := _m.Called(ctx)

	var r0 []*db.SubscriptionTarget
	if rf, ok := ret.Get(0).(func(context.Context) []*db.SubscriptionTarget); ok {
		r0 = rf(ctx)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.SubscriptionTarget)
		}
	}

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

	return r0, r1
}

// SubscriptionTargetsByServiceID provides a mock function with given fields: ctx, serviceID
func (_m *DB) SubscriptionTargetsByServiceID(ctx context.Context, serviceID int) ([]*db.SubscriptionTarget, error) {
	ret := _m.Called(ctx, serviceID)

	var r0 []*db.SubscriptionTarget
	if rf, ok := ret.Get(0).(func(context.Context, int) []*db.SubscriptionTarget); ok {
		r0 = rf(ctx, serviceID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.SubscriptionTarget)
		}
	}

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

	return r0, r1
}

// SubscriptionUpdateInfra provides a mock function with given fields: ctx, lease, id, subscriptionInfraUpdate
func (_m *DB) SubscriptionUpdateInfra(ctx context.Context, lease db.AWSLease, id int, subscriptionInfraUpdate *db.SubscriptionInfraUpdate) (int, error) {
	ret := _m.Called(ctx, lease, id, subscriptionInfraUpdate)

	var r0 int
	if rf, ok := ret.Get(0).(func(context.Context, db.AWSLease, int, *db.SubscriptionInfraUpdate) int); ok {
		r0 = rf(ctx, lease, id, subscriptionInfraUpdate)
	} else {
		r0 = ret.Get(0).(int)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, db.AWSLease, int, *db.SubscriptionInfraUpdate) error); ok {
		r1 = rf(ctx, lease, id, subscriptionInfraUpdate)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Subscriptions provides a mock function with given fields: ctx
func (_m *DB) Subscriptions(ctx context.Context) ([]*db.Subscription, error) {
	ret := _m.Called(ctx)

	var r0 []*db.Subscription
	if rf, ok := ret.Get(0).(func(context.Context) []*db.Subscription); ok {
		r0 = rf(ctx)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.Subscription)
		}
	}

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

	return r0, r1
}

// SubscriptionsByEventStreamID provides a mock function with given fields: ctx, eventStreamID
func (_m *DB) SubscriptionsByEventStreamID(ctx context.Context, eventStreamID int) ([]*db.Subscription, error) {
	ret := _m.Called(ctx, eventStreamID)

	var r0 []*db.Subscription
	if rf, ok := ret.Get(0).(func(context.Context, int) []*db.Subscription); ok {
		r0 = rf(ctx, eventStreamID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.Subscription)
		}
	}

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

	return r0, r1
}

// SubscriptionsBySubscriptionTargetID provides a mock function with given fields: ctx, subscriptionTargetID
func (_m *DB) SubscriptionsBySubscriptionTargetID(ctx context.Context, subscriptionTargetID int) ([]*db.Subscription, error) {
	ret := _m.Called(ctx, subscriptionTargetID)

	var r0 []*db.Subscription
	if rf, ok := ret.Get(0).(func(context.Context, int) []*db.Subscription); ok {
		r0 = rf(ctx, subscriptionTargetID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*db.Subscription)
		}
	}

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

	return r0, r1
}
