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

package mocks

import (
	dbmodel "github.com/milvus-io/milvus/internal/metastore/db/dbmodel"
	mock "github.com/stretchr/testify/mock"
)

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

// Delete provides a mock function with given fields: tenantID, roleID, object, objectName
func (_m *IGrantDb) Delete(tenantID string, roleID int64, object string, objectName string) error {
	ret := _m.Called(tenantID, roleID, object, objectName)

	var r0 error
	if rf, ok := ret.Get(0).(func(string, int64, string, string) error); ok {
		r0 = rf(tenantID, roleID, object, objectName)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// GetGrants provides a mock function with given fields: tenantID, roleID, object, objectName
func (_m *IGrantDb) GetGrants(tenantID string, roleID int64, object string, objectName string) ([]*dbmodel.Grant, error) {
	ret := _m.Called(tenantID, roleID, object, objectName)

	var r0 []*dbmodel.Grant
	if rf, ok := ret.Get(0).(func(string, int64, string, string) []*dbmodel.Grant); ok {
		r0 = rf(tenantID, roleID, object, objectName)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*dbmodel.Grant)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(string, int64, string, string) error); ok {
		r1 = rf(tenantID, roleID, object, objectName)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Insert provides a mock function with given fields: in
func (_m *IGrantDb) Insert(in *dbmodel.Grant) error {
	ret := _m.Called(in)

	var r0 error
	if rf, ok := ret.Get(0).(func(*dbmodel.Grant) error); ok {
		r0 = rf(in)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

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

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

	return mock
}
