package monitoring

import "time"

type ComponentDifferenceReportType string

const (
	ComponentDifferenceReportTypeClusterSpec ComponentDifferenceReportType = "cluster_spec"
)

type ComponentDifferenceItem struct {
	Component string `json:"component"`
	Key       string `json:"key"`
	Desired   any    `json:"desired"`
	Actual    any    `json:"actual"`
}

type ComponentDifferenceItemsPerCluster struct {
	TenantID     string                               `json:"tenant_id"`
	TenantName   string                               `json:"tenant_name"`
	TenantRegion string                               `json:"tenant_region"`
	ProjectID    string                               `json:"project_id"`
	ClusterID    string                               `json:"cluster_id"`
	ClusterName  string                               `json:"cluster_name"`
	Items        map[string][]ComponentDifferenceItem `json:"items"`
}

type ComponentDifferenceReportMetadata struct {
	Type              ComponentDifferenceReportType `json:"type"`
	Name              string                        `json:"name"`
	CreatedAt         time.Time                     `json:"created_at"`
	TenantIDs         []string                      `json:"tenant_ids"`
	ClusterIDs        []string                      `json:"cluster_ids"`
	TotalClusterCount int64                         `json:"total_cluster_count"`
	RequestTraceID    string                        `json:"request_trace_id"`
}

type ComponentDifferenceReport struct {
	Difference []ComponentDifferenceItemsPerCluster `json:"difference"`
}
