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

package mock

import (
	context "context"

	bizerr "github.com/tidbcloud/pkgv2/bizerr"
	commonv1 "github.com/tidbcloud/tidb-management-service/api/spec/global/common/v1"

	mock "github.com/stretchr/testify/mock"
)

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

// GetRegionByResourcePoolID provides a mock function with given fields: ctx, sharedPoolID
func (_m *RegionGrpcClient) GetRegionByResourcePoolID(ctx context.Context, sharedPoolID uint64) (*commonv1.Region, bizerr.BizError) {
	ret := _m.Called(ctx, sharedPoolID)

	if len(ret) == 0 {
		panic("no return value specified for GetRegionByResourcePoolID")
	}

	var r0 *commonv1.Region
	var r1 bizerr.BizError
	if rf, ok := ret.Get(0).(func(context.Context, uint64) (*commonv1.Region, bizerr.BizError)); ok {
		return rf(ctx, sharedPoolID)
	}
	if rf, ok := ret.Get(0).(func(context.Context, uint64) *commonv1.Region); ok {
		r0 = rf(ctx, sharedPoolID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*commonv1.Region)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, uint64) bizerr.BizError); ok {
		r1 = rf(ctx, sharedPoolID)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(bizerr.BizError)
		}
	}

	return r0, r1
}

// GetRegionByTenantID provides a mock function with given fields: ctx, tenantID, cloudProvider, regionName
func (_m *RegionGrpcClient) GetRegionByTenantID(ctx context.Context, tenantID uint64, cloudProvider string, regionName string) (*commonv1.Region, bizerr.BizError) {
	ret := _m.Called(ctx, tenantID, cloudProvider, regionName)

	if len(ret) == 0 {
		panic("no return value specified for GetRegionByTenantID")
	}

	var r0 *commonv1.Region
	var r1 bizerr.BizError
	if rf, ok := ret.Get(0).(func(context.Context, uint64, string, string) (*commonv1.Region, bizerr.BizError)); ok {
		return rf(ctx, tenantID, cloudProvider, regionName)
	}
	if rf, ok := ret.Get(0).(func(context.Context, uint64, string, string) *commonv1.Region); ok {
		r0 = rf(ctx, tenantID, cloudProvider, regionName)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*commonv1.Region)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, uint64, string, string) bizerr.BizError); ok {
		r1 = rf(ctx, tenantID, cloudProvider, regionName)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(bizerr.BizError)
		}
	}

	return r0, r1
}

// NewRegionGrpcClient creates a new instance of RegionGrpcClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewRegionGrpcClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *RegionGrpcClient {
	mock := &RegionGrpcClient{}
	mock.Mock.Test(t)

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

	return mock
}
