// Code generated by Wire. DO NOT EDIT.

//go:generate go run -mod=mod github.com/google/wire/cmd/wire
//go:build !wireinject
// +build !wireinject

package main

import (
	"github.com/google/wire"
	"github.com/tidbcloud/ecosystem-service/api"
	"github.com/tidbcloud/ecosystem-service/api/v1/connect"
	git2 "github.com/tidbcloud/ecosystem-service/api/v1/git"
	"github.com/tidbcloud/ecosystem-service/api/v1/pingchat"
	vercel3 "github.com/tidbcloud/ecosystem-service/api/v1/vercel"
	"github.com/tidbcloud/ecosystem-service/config"
	"github.com/tidbcloud/ecosystem-service/internal/service/bigquery"
	"github.com/tidbcloud/ecosystem-service/internal/service/eventbus"
	"github.com/tidbcloud/ecosystem-service/internal/service/github"
	"github.com/tidbcloud/ecosystem-service/internal/service/grpc"
	"github.com/tidbcloud/ecosystem-service/internal/service/grpc/account"
	"github.com/tidbcloud/ecosystem-service/internal/service/grpc/acl"
	"github.com/tidbcloud/ecosystem-service/internal/service/grpc/branch"
	"github.com/tidbcloud/ecosystem-service/internal/service/grpc/dataapi"
	"github.com/tidbcloud/ecosystem-service/internal/service/grpc/mgmt"
	vercel2 "github.com/tidbcloud/ecosystem-service/internal/service/proxy/vercel"
	"github.com/tidbcloud/ecosystem-service/internal/storage/db"
	"github.com/tidbcloud/ecosystem-service/internal/storage/db/git"
	"github.com/tidbcloud/ecosystem-service/internal/storage/db/vercel"
	"github.com/tidbcloud/ecosystem-service/internal/storage/migrate"
	"github.com/tidbcloud/ecosystem-service/internal/storage/migrate/record"
	"github.com/tidbcloud/ecosystem-service/internal/utils"
)

// Injectors from wire.go:

func initializeServer(configPath string) (*Server, error) {
	configWrapper, err := config.InitConfig(configPath)
	if err != nil {
		return nil, err
	}
	gormDB, err := db.InitializeDB(configWrapper)
	if err != nil {
		return nil, err
	}
	clusterConnectionDAO := vercel.NewClusterConnectionDAO(gormDB)
	tiDBVercelAccountDAO := vercel.NewTiDBVercelAccountDAO(gormDB)
	vercelIntegrationConfigurationDAO := vercel.NewVercelIntegrationConfigurationDAO(gormDB)
	apiClient := vercel2.NewAPIClient()
	dataAppEnvironmentIdentifierDAO := vercel.NewDataAppEnvironmentIdentifierDAO(gormDB)
	dataAppConnectionDAO := vercel.NewDataAppConnectionDAO(gormDB)
	environmentIdentifierDAO := vercel.NewEnvironmentIdentifierDAO(gormDB)
	composeEntityDAO := vercel.NewComposeEntityDAO(gormDB, dataAppEnvironmentIdentifierDAO, dataAppConnectionDAO, environmentIdentifierDAO, clusterConnectionDAO)
	accountProviderSvc := account.NewAccountProviderSvc(configWrapper)
	encryptor := utils.InitEncryptor(configWrapper)
	mgmtSvc := mgmt.NewMgmtSvc(configWrapper, encryptor)
	aclSvc := acl.NewAclSvc(configWrapper)
	dataApiSvc := dataapi.NewDataApiSvc(configWrapper)
	clusterConnLogic := vercel3.NewClusterConnLogic(clusterConnectionDAO, tiDBVercelAccountDAO, vercelIntegrationConfigurationDAO, apiClient, accountProviderSvc, mgmtSvc, aclSvc, configWrapper, dataAppConnectionDAO, dataApiSvc, composeEntityDAO)
	dataAppConnLogic := vercel3.NewDataAppConnLogic(vercelIntegrationConfigurationDAO, apiClient, dataAppConnectionDAO, dataApiSvc, composeEntityDAO)
	checkDAO := vercel.NewXCheckDAO(gormDB)
	branchSvc := branch.NewBranchSvc(configWrapper)
	branchEnvironmentIdentifierDAO := vercel.NewBranchEnvironmentIdentifierDAO(gormDB)
	branchTaskDAO := vercel.NewBranchTaskDAO(gormDB)
	branchLogic := vercel3.NewBranchLogic(clusterConnectionDAO, checkDAO, vercelIntegrationConfigurationDAO, apiClient, branchSvc, configWrapper, branchEnvironmentIdentifierDAO, branchTaskDAO)
	vercelController := vercel3.NewVercelController(clusterConnectionDAO, tiDBVercelAccountDAO, vercelIntegrationConfigurationDAO, apiClient, composeEntityDAO, clusterConnLogic, configWrapper, dataAppConnLogic, dataAppConnectionDAO, aclSvc, branchLogic, accountProviderSvc)
	autoCleanJob := vercel3.NewAutoCleanJob(composeEntityDAO, dataAppConnectionDAO, dataApiSvc, dataAppConnLogic)
	migrator := migrate.NewMigrator(gormDB)
	recorderExecutor := record.InitRecorderExecutor(migrator)
	logger := utils.InitLogger(configWrapper)
	vercelMetricsJob := vercel3.NewVercelMetricsJob(gormDB)
	connectionUploader, err := bigquery.NewConnectionUploader(configWrapper)
	if err != nil {
		return nil, err
	}
	dailyUploadJob := vercel3.NewDailyUploadJob(clusterConnectionDAO, connectionUploader)
	connectController := connect.NewConnectController()
	tiDBGitIntegrationDAO := git.NewTiDBGitIntegrationDAO(gormDB)
	gitHubAppTaskDAO := git.NewGitHubAppTaskDAO(gormDB)
	gitHubApp := github.NewGitHubApp(tiDBGitIntegrationDAO, configWrapper, branchSvc, gitHubAppTaskDAO)
	controller := git2.NewController(tiDBGitIntegrationDAO, accountProviderSvc, mgmtSvc, gitHubApp, configWrapper)
	gitCronJob := git2.NewGitCronJob(mgmtSvc, tiDBGitIntegrationDAO)
	eventbusService := eventbus.NewEventBusService()
	branchEventService := eventbus.NewBranchEventService(eventbusService, branchEnvironmentIdentifierDAO, apiClient)
	clusterEventService := eventbus.NewClusterEventService(eventbusService, clusterConnectionDAO, clusterConnLogic, composeEntityDAO)
	pingChatController := pingchat.NewPingChatController(configWrapper)
	server := NewServer(vercelController, autoCleanJob, configWrapper, recorderExecutor, logger, vercelMetricsJob, dailyUploadJob, connectController, aclSvc, gitHubApp, controller, gitCronJob, accountProviderSvc, mgmtSvc, eventbusService, branchEventService, clusterEventService, pingChatController)
	return server, nil
}

// wire.go:

var providerSet = wire.NewSet(utils.InitLogger, utils.InitEncryptor, api.ControllerSet, api.JobSet, api.LogicSet, github.GitSet, vercel.VercelDAOSet, git.GitDAOSet, grpc.GrpcProvider, bigquery.BigqueryProvider, db.InitializeDB, vercel2.NewAPIClient, config.InitConfig, record.InitRecorderExecutor, migrate.NewMigrator, eventbus.EventSet)
