package dashboard

import "github.com/tidbcloud/devops/entity"

type DashboardReq struct {
	StartTs int64 `form:"startTs" binding:"required" json:"startTs"`
	EndTs   int64 `form:"endTs" binding:"required" json:"endTs"`
}

type SLAInfoResp struct {
	entity.SLAInfo `json:",inline"`
}

type GetMonthlySummaryOfDedicatedSLAReq struct {
	Month            string                  `form:"month" binding:"required" json:"month"`
	Search           string                  `form:"search" json:"search"`
	IncludeDeleted   bool                    `form:"includeDeleted" json:"includeDeleted"`
	Status           []entity.SLAStatus      `form:"status" json:"status"  enums:"perfect,warning,breach" binding:"dive,oneof=perfect warning breach"`
	TiDBInstanceMode entity.TiDBInstanceMode `form:"tidbInstanceMode" json:"tidbInstanceMode" binding:"omitempty,oneof=single multi"`
}

type GetMonthlySummaryOfDedicatedSLAResp struct {
	entity.DedicatedClusterSLABasicList `json:",inline"`
}

type GetClusterDetailOfDedicatedSLAReq struct {
	Month       string `form:"month" binding:"required" json:"month"`
	ClusterID   string `form:"clusterID" binding:"required" json:"clusterID"`
	IncludeFake bool   `form:"includeFake" json:"includeFake"`
}

type GetClusterDetailOfDedicatedSLAResp struct {
	entity.DedicatedClusterSLADetail `json:",inline"`
}

type GetClusterDetailOfNextGenSLAReq struct {
	Month       string `form:"month" binding:"required" json:"month"`
	ClusterID   string `form:"clusterID" binding:"required" json:"clusterID"`
	IncludeFake bool   `form:"includeFake" json:"includeFake"`
}

type GetClusterDetailOfNextGenSLAResp struct {
	entity.NextGenClusterSLADetail `json:",inline"`
}

type GetMonthlySummaryOfNextGenSLAReq struct {
	Month             string             `form:"month" binding:"required" json:"month"`
	Search            string             `form:"search" json:"search"`
	IncludeDeleted    bool               `form:"includeDeleted" json:"includeDeleted"`
	Status            []entity.SLAStatus `form:"status" json:"status"  enums:"perfect,warning,breach" binding:"dive,oneof=perfect warning breach"`
	ClusterDeployType string             `form:"clusterDeployType" json:"clusterDeployType" binding:"omitempty,oneof=premium byoc"`
}

type GetMonthlySummaryOfNextGenSLAResp struct {
	entity.NextGenClusterSLABasicList `json:",inline"`
}

type SLOInfoResp struct {
	entity.SLOInfo `json:",inline"`
}

type IncidentInfoResp struct {
	entity.IncidentInfo `json:",inline"`
}

type CloudOncallInfoResp struct {
	entity.CloudOncallInfo `json:",inline"`
}

type CriticalAlertInfoResp struct {
	entity.CriticalAlertInfo `json:",inline"`
}

type ReleaseInfoResp struct {
	entity.ReleaseInfo `json:",inline"`
}

type GetTop10QPSTenantsResp struct {
	entity.TopTenants `json:",inline"`
}

type GetTop10TiKVStorageTenantsResp struct {
	entity.TopTenants `json:",inline"`
}

type GetTop10TiFlashStorageTenantsResp struct {
	entity.TopTenants `json:",inline"`
}
