package internal_api

// DataProxyDiagnosticContext contains server-derived metadata used by
// diagnostic callers. Empty optional fields are omitted from the JSON object.
type DataProxyDiagnosticContext struct {
	ProjectID  string `json:"projectId,omitempty"`
	ParentID   string `json:"parentId,omitempty"`
	ShootName  string `json:"shootName,omitempty"`
	KeyspaceID string `json:"keyspaceId,omitempty"`
}

// DataProxyClusterMetadata is the canonical metadata contract returned to
// Data Proxy. Its JSON shape intentionally matches clinic_data_service's
// clustercontext.Cluster contract.
type DataProxyClusterMetadata struct {
	ClusterID         string                     `json:"clusterId"`
	OrgID             string                     `json:"orgId"`
	Name              string                     `json:"name"`
	Status            string                     `json:"status"`
	Deleted           bool                       `json:"deleted"`
	Version           string                     `json:"version"`
	Provider          string                     `json:"provider"`
	Region            string                     `json:"region"`
	DeployType        string                     `json:"deployType"`
	DeployTypeV2      string                     `json:"deployTypeV2"`
	CreatedAt         string                     `json:"createdAt,omitempty"`
	DiagnosticContext DataProxyDiagnosticContext `json:"diagnosticContext"`
}

// DataProxyClusterMetadataPage is the canonical org-scoped collection
// contract returned to Data Proxy.
type DataProxyClusterMetadataPage struct {
	Items    []DataProxyClusterMetadata `json:"items"`
	Page     int                        `json:"page"`
	PageSize int                        `json:"pageSize"`
	Total    int64                      `json:"total"`
}
