// Code generated by MockGen. DO NOT EDIT.
// Source: ./internal/domain/service/branch.go
//
// Generated by this command:
//
//	mockgen -source=./internal/domain/service/branch.go -destination ./internal/domain/service/mock_service/mock_branch.go -package mock_service
//

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

import (
	context "context"
	reflect "reflect"
	time "time"

	bizerr "github.com/tidbcloud/pkgv2/bizerr"
	vo "github.com/tidbcloud/serverless-service/internal/domain/vo"
	gomock "go.uber.org/mock/gomock"
)

// MockBranchService is a mock of BranchService interface.
type MockBranchService struct {
	ctrl     *gomock.Controller
	recorder *MockBranchServiceMockRecorder
}

// MockBranchServiceMockRecorder is the mock recorder for MockBranchService.
type MockBranchServiceMockRecorder struct {
	mock *MockBranchService
}

// NewMockBranchService creates a new mock instance.
func NewMockBranchService(ctrl *gomock.Controller) *MockBranchService {
	mock := &MockBranchService{ctrl: ctrl}
	mock.recorder = &MockBranchServiceMockRecorder{mock}
	return mock
}

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

// CollectMetricsFromDB mocks base method.
func (m *MockBranchService) CollectMetricsFromDB(ctx context.Context) bizerr.BizError {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "CollectMetricsFromDB", ctx)
	ret0, _ := ret[0].(bizerr.BizError)
	return ret0
}

// CollectMetricsFromDB indicates an expected call of CollectMetricsFromDB.
func (mr *MockBranchServiceMockRecorder) CollectMetricsFromDB(ctx any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CollectMetricsFromDB", reflect.TypeOf((*MockBranchService)(nil).CollectMetricsFromDB), ctx)
}

// CreateBranch mocks base method.
func (m *MockBranchService) CreateBranch(ctx context.Context, clusterId, branchName, parentID string, parentTimestamp *time.Time, rootPassword string, userID uint64, annotations map[string]string) (*vo.Branch, bizerr.BizError) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "CreateBranch", ctx, clusterId, branchName, parentID, parentTimestamp, rootPassword, userID, annotations)
	ret0, _ := ret[0].(*vo.Branch)
	ret1, _ := ret[1].(bizerr.BizError)
	return ret0, ret1
}

// CreateBranch indicates an expected call of CreateBranch.
func (mr *MockBranchServiceMockRecorder) CreateBranch(ctx, clusterId, branchName, parentID, parentTimestamp, rootPassword, userID, annotations any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateBranch", reflect.TypeOf((*MockBranchService)(nil).CreateBranch), ctx, clusterId, branchName, parentID, parentTimestamp, rootPassword, userID, annotations)
}

// DeleteBranchByClusterId mocks base method.
func (m *MockBranchService) DeleteBranchByClusterId(ctx context.Context, clusterId string, userID uint64) bizerr.BizError {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "DeleteBranchByClusterId", ctx, clusterId, userID)
	ret0, _ := ret[0].(bizerr.BizError)
	return ret0
}

// DeleteBranchByClusterId indicates an expected call of DeleteBranchByClusterId.
func (mr *MockBranchServiceMockRecorder) DeleteBranchByClusterId(ctx, clusterId, userID any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteBranchByClusterId", reflect.TypeOf((*MockBranchService)(nil).DeleteBranchByClusterId), ctx, clusterId, userID)
}

// DeleteBranchById mocks base method.
func (m *MockBranchService) DeleteBranchById(ctx context.Context, mainBranchID, branchId string, userID uint64) (*vo.Branch, bizerr.BizError) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "DeleteBranchById", ctx, mainBranchID, branchId, userID)
	ret0, _ := ret[0].(*vo.Branch)
	ret1, _ := ret[1].(bizerr.BizError)
	return ret0, ret1
}

// DeleteBranchById indicates an expected call of DeleteBranchById.
func (mr *MockBranchServiceMockRecorder) DeleteBranchById(ctx, mainBranchID, branchId, userID any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteBranchById", reflect.TypeOf((*MockBranchService)(nil).DeleteBranchById), ctx, mainBranchID, branchId, userID)
}

// GetBranchById mocks base method.
func (m *MockBranchService) GetBranchById(ctx context.Context, mainBranchID, branchId string) (*vo.Branch, bizerr.BizError) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetBranchById", ctx, mainBranchID, branchId)
	ret0, _ := ret[0].(*vo.Branch)
	ret1, _ := ret[1].(bizerr.BizError)
	return ret0, ret1
}

// GetBranchById indicates an expected call of GetBranchById.
func (mr *MockBranchServiceMockRecorder) GetBranchById(ctx, mainBranchID, branchId any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBranchById", reflect.TypeOf((*MockBranchService)(nil).GetBranchById), ctx, mainBranchID, branchId)
}

// ListBranches mocks base method.
func (m *MockBranchService) ListBranches(ctx context.Context, mainBranchID string, deleteAfterTime *time.Time) ([]*vo.Branch, bizerr.BizError) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ListBranches", ctx, mainBranchID, deleteAfterTime)
	ret0, _ := ret[0].([]*vo.Branch)
	ret1, _ := ret[1].(bizerr.BizError)
	return ret0, ret1
}

// ListBranches indicates an expected call of ListBranches.
func (mr *MockBranchServiceMockRecorder) ListBranches(ctx, mainBranchID, deleteAfterTime any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListBranches", reflect.TypeOf((*MockBranchService)(nil).ListBranches), ctx, mainBranchID, deleteAfterTime)
}

// ListBranchesInPage mocks base method.
func (m *MockBranchService) ListBranchesInPage(ctx context.Context, mainBranchID string, opt vo.ListBranchesOpt) ([]*vo.Branch, int64, bizerr.BizError) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ListBranchesInPage", ctx, mainBranchID, opt)
	ret0, _ := ret[0].([]*vo.Branch)
	ret1, _ := ret[1].(int64)
	ret2, _ := ret[2].(bizerr.BizError)
	return ret0, ret1, ret2
}

// ListBranchesInPage indicates an expected call of ListBranchesInPage.
func (mr *MockBranchServiceMockRecorder) ListBranchesInPage(ctx, mainBranchID, opt any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListBranchesInPage", reflect.TypeOf((*MockBranchService)(nil).ListBranchesInPage), ctx, mainBranchID, opt)
}

// ListBranchesRowStorage mocks base method.
func (m *MockBranchService) ListBranchesRowStorage(ctx context.Context, branches []*vo.Branch) (map[string]float64, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ListBranchesRowStorage", ctx, branches)
	ret0, _ := ret[0].(map[string]float64)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// ListBranchesRowStorage indicates an expected call of ListBranchesRowStorage.
func (mr *MockBranchServiceMockRecorder) ListBranchesRowStorage(ctx, branches any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListBranchesRowStorage", reflect.TypeOf((*MockBranchService)(nil).ListBranchesRowStorage), ctx, branches)
}

// ResetBranchById mocks base method.
func (m *MockBranchService) ResetBranchById(ctx context.Context, mainBranchID, branchId string) (*vo.Branch, bizerr.BizError) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ResetBranchById", ctx, mainBranchID, branchId)
	ret0, _ := ret[0].(*vo.Branch)
	ret1, _ := ret[1].(bizerr.BizError)
	return ret0, ret1
}

// ResetBranchById indicates an expected call of ResetBranchById.
func (mr *MockBranchServiceMockRecorder) ResetBranchById(ctx, mainBranchID, branchId any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResetBranchById", reflect.TypeOf((*MockBranchService)(nil).ResetBranchById), ctx, mainBranchID, branchId)
}

// UpdateBranch mocks base method.
func (m *MockBranchService) UpdateBranch(ctx context.Context, mainBranchID, branchId string, branch *vo.UpdateBranchReq) (*vo.Branch, bizerr.BizError) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UpdateBranch", ctx, mainBranchID, branchId, branch)
	ret0, _ := ret[0].(*vo.Branch)
	ret1, _ := ret[1].(bizerr.BizError)
	return ret0, ret1
}

// UpdateBranch indicates an expected call of UpdateBranch.
func (mr *MockBranchServiceMockRecorder) UpdateBranch(ctx, mainBranchID, branchId, branch any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateBranch", reflect.TypeOf((*MockBranchService)(nil).UpdateBranch), ctx, mainBranchID, branchId, branch)
}

// UpdateBranchHasSetPwd mocks base method.
func (m *MockBranchService) UpdateBranchHasSetPwd(ctx context.Context, branchId string, hasSetPwd bool) bizerr.BizError {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UpdateBranchHasSetPwd", ctx, branchId, hasSetPwd)
	ret0, _ := ret[0].(bizerr.BizError)
	return ret0
}

// UpdateBranchHasSetPwd indicates an expected call of UpdateBranchHasSetPwd.
func (mr *MockBranchServiceMockRecorder) UpdateBranchHasSetPwd(ctx, branchId, hasSetPwd any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateBranchHasSetPwd", reflect.TypeOf((*MockBranchService)(nil).UpdateBranchHasSetPwd), ctx, branchId, hasSetPwd)
}

// UpdateSqlUser mocks base method.
func (m *MockBranchService) UpdateSqlUser(ctx context.Context, clusterId, branchId, username, password string) bizerr.BizError {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UpdateSqlUser", ctx, clusterId, branchId, username, password)
	ret0, _ := ret[0].(bizerr.BizError)
	return ret0
}

// UpdateSqlUser indicates an expected call of UpdateSqlUser.
func (mr *MockBranchServiceMockRecorder) UpdateSqlUser(ctx, clusterId, branchId, username, password any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSqlUser", reflect.TypeOf((*MockBranchService)(nil).UpdateSqlUser), ctx, clusterId, branchId, username, password)
}
