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

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

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

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

// MockBranchRepo is a mock of BranchRepo interface.
type MockBranchRepo struct {
	ctrl     *gomock.Controller
	recorder *MockBranchRepoMockRecorder
	isgomock struct{}
}

// MockBranchRepoMockRecorder is the mock recorder for MockBranchRepo.
type MockBranchRepoMockRecorder struct {
	mock *MockBranchRepo
}

// NewMockBranchRepo creates a new mock instance.
func NewMockBranchRepo(ctrl *gomock.Controller) *MockBranchRepo {
	mock := &MockBranchRepo{ctrl: ctrl}
	mock.recorder = &MockBranchRepoMockRecorder{mock}
	return mock
}

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

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

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

// CountBranchesByOrgID mocks base method.
func (m *MockBranchRepo) CountBranchesByOrgID(ctx context.Context, org uint64) (int64, bizerr.BizError) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "CountBranchesByOrgID", ctx, org)
	ret0, _ := ret[0].(int64)
	ret1, _ := ret[1].(bizerr.BizError)
	return ret0, ret1
}

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

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

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

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

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

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

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

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

// GetBranchByNameAndMainBranchID indicates an expected call of GetBranchByNameAndMainBranchID.
func (mr *MockBranchRepoMockRecorder) GetBranchByNameAndMainBranchID(ctx, branchName, mainBranchID any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBranchByNameAndMainBranchID", reflect.TypeOf((*MockBranchRepo)(nil).GetBranchByNameAndMainBranchID), ctx, branchName, mainBranchID)
}

// ListBranchesByFilter mocks base method.
func (m *MockBranchRepo) ListBranchesByFilter(ctx context.Context, filter repo.BranchFilter) ([]*entity.Branch, bizerr.BizError) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ListBranchesByFilter", ctx, filter)
	ret0, _ := ret[0].([]*entity.Branch)
	ret1, _ := ret[1].(bizerr.BizError)
	return ret0, ret1
}

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

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

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

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

// ListBranchesByMainBranchIDAndIDs indicates an expected call of ListBranchesByMainBranchIDAndIDs.
func (mr *MockBranchRepoMockRecorder) ListBranchesByMainBranchIDAndIDs(ctx, mainBranchID, ids any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListBranchesByMainBranchIDAndIDs", reflect.TypeOf((*MockBranchRepo)(nil).ListBranchesByMainBranchIDAndIDs), ctx, mainBranchID, ids)
}

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

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

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

// ListBranchesByParentID indicates an expected call of ListBranchesByParentID.
func (mr *MockBranchRepoMockRecorder) ListBranchesByParentID(ctx, mainBranchID, parentID any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListBranchesByParentID", reflect.TypeOf((*MockBranchRepo)(nil).ListBranchesByParentID), ctx, mainBranchID, parentID)
}

// ListBranchesByStatuses mocks base method.
func (m *MockBranchRepo) ListBranchesByStatuses(ctx context.Context, statuses ...constant.BranchStatus) ([]*entity.Branch, bizerr.BizError) {
	m.ctrl.T.Helper()
	varargs := []any{ctx}
	for _, a := range statuses {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "ListBranchesByStatuses", varargs...)
	ret0, _ := ret[0].([]*entity.Branch)
	ret1, _ := ret[1].(bizerr.BizError)
	return ret0, ret1
}

// ListBranchesByStatuses indicates an expected call of ListBranchesByStatuses.
func (mr *MockBranchRepoMockRecorder) ListBranchesByStatuses(ctx any, statuses ...any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{ctx}, statuses...)
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListBranchesByStatuses", reflect.TypeOf((*MockBranchRepo)(nil).ListBranchesByStatuses), varargs...)
}

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

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

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

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

// Update mocks base method.
func (m *MockBranchRepo) Update(ctx context.Context, record *entity.Branch, columns []string, where map[string]any) bizerr.BizError {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Update", ctx, record, columns, where)
	ret0, _ := ret[0].(bizerr.BizError)
	return ret0
}

// Update indicates an expected call of Update.
func (mr *MockBranchRepoMockRecorder) Update(ctx, record, columns, where any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockBranchRepo)(nil).Update), ctx, record, columns, where)
}
