Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go/grafana schema references #689

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft

Conversation

K-Phoen
Copy link
Member

@K-Phoen K-Phoen commented Dec 13, 2024

No description provided.

Copy link

github-actions bot commented Dec 13, 2024

Note: the diff show code changes that would be introduced by this PR to the Foundation SDK. Changes already on main are excluded.

🔎 Changes to grafana-foundation-sdk@next+cog-v0.0.x

diff --new-file --unidirectional-new-file '--color=never' --unified --recursive '--exclude=.git' '--exclude=gradle.properties' '--exclude=pyproject.toml' '--exclude=package.json' '--exclude=*.md' /tmp/foundation-workspace-main/foundation-sdk/go/alerting/types_gen.go /tmp/foundation-workspace-current/foundation-sdk/go/alerting/types_gen.go
--- /tmp/foundation-workspace-main/foundation-sdk/go/alerting/types_gen.go	2024-12-13 13:58:01.477027563 +0000
+++ /tmp/foundation-workspace-current/foundation-sdk/go/alerting/types_gen.go	2024-12-13 13:57:42.926943409 +0000
@@ -67,9 +67,9 @@
 		}
 	}
 
-	dataqueryTypeHint := ""
-
 	if fields["model"] != nil {
+		dataqueryTypeHint := ""
+
 		model, err := cog.UnmarshalDataquery(fields["model"], dataqueryTypeHint)
 		if err != nil {
 			return err
diff --new-file --unidirectional-new-file '--color=never' --unified --recursive '--exclude=.git' '--exclude=gradle.properties' '--exclude=pyproject.toml' '--exclude=package.json' '--exclude=*.md' /tmp/foundation-workspace-main/foundation-sdk/go/athena/types_gen.go /tmp/foundation-workspace-current/foundation-sdk/go/athena/types_gen.go
--- /tmp/foundation-workspace-main/foundation-sdk/go/athena/types_gen.go	2024-12-13 13:58:01.478027570 +0000
+++ /tmp/foundation-workspace-current/foundation-sdk/go/athena/types_gen.go	2024-12-13 13:57:42.927943416 +0000
@@ -50,41 +50,6 @@
 	}
 }
 
-// VariantConfig returns the configuration related to grafana-athena-datasource dataqueries.
-// This configuration describes how to unmarshal it, convert it to code, …
-func VariantConfig() variants.DataqueryConfig {
-	return variants.DataqueryConfig{
-		Identifier: "grafana-athena-datasource",
-		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &Dataquery{}
-
-			if err := json.Unmarshal(raw, dataquery); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &Dataquery{}
-
-			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		GoConverter: func(input any) string {
-			var dataquery Dataquery
-			if cast, ok := input.(*Dataquery); ok {
-				dataquery = *cast
-			} else {
-				dataquery = input.(Dataquery)
-			}
-			return DataqueryConverter(dataquery)
-		},
-	}
-}
-
 // UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode `Dataquery` from JSON.
 // Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …
 func (resource *Dataquery) UnmarshalJSONStrict(raw []byte) error {
@@ -496,3 +461,38 @@
 	FormatOptionsTable      FormatOptions = 1
 	FormatOptionsLogs       FormatOptions = 2
 )
+
+// VariantConfig returns the configuration related to grafana-athena-datasource dataqueries.
+// This configuration describes how to unmarshal it, convert it to code, …
+func VariantConfig() variants.DataqueryConfig {
+	return variants.DataqueryConfig{
+		Identifier: "grafana-athena-datasource",
+		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &Dataquery{}
+
+			if err := json.Unmarshal(raw, dataquery); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &Dataquery{}
+
+			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		GoConverter: func(input any) string {
+			var dataquery Dataquery
+			if cast, ok := input.(*Dataquery); ok {
+				dataquery = *cast
+			} else {
+				dataquery = input.(Dataquery)
+			}
+			return DataqueryConverter(dataquery)
+		},
+	}
+}
diff --new-file --unidirectional-new-file '--color=never' --unified --recursive '--exclude=.git' '--exclude=gradle.properties' '--exclude=pyproject.toml' '--exclude=package.json' '--exclude=*.md' /tmp/foundation-workspace-main/foundation-sdk/go/azuremonitor/types_gen.go /tmp/foundation-workspace-current/foundation-sdk/go/azuremonitor/types_gen.go
--- /tmp/foundation-workspace-main/foundation-sdk/go/azuremonitor/types_gen.go	2024-12-13 13:58:01.479027577 +0000
+++ /tmp/foundation-workspace-current/foundation-sdk/go/azuremonitor/types_gen.go	2024-12-13 13:57:42.928943424 +0000
@@ -62,41 +62,6 @@
 	return &AzureMonitorQuery{}
 }
 
-// VariantConfig returns the configuration related to grafana-azure-monitor-datasource dataqueries.
-// This configuration describes how to unmarshal it, convert it to code, …
-func VariantConfig() variants.DataqueryConfig {
-	return variants.DataqueryConfig{
-		Identifier: "grafana-azure-monitor-datasource",
-		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &AzureMonitorQuery{}
-
-			if err := json.Unmarshal(raw, dataquery); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &AzureMonitorQuery{}
-
-			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		GoConverter: func(input any) string {
-			var dataquery AzureMonitorQuery
-			if cast, ok := input.(*AzureMonitorQuery); ok {
-				dataquery = *cast
-			} else {
-				dataquery = input.(AzureMonitorQuery)
-			}
-			return AzureMonitorQueryConverter(dataquery)
-		},
-	}
-}
-
 // UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode `AzureMonitorQuery` from JSON.
 // Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …
 func (resource *AzureMonitorQuery) UnmarshalJSONStrict(raw []byte) error {
@@ -3745,3 +3710,38 @@
 
 	return errs
 }
+
+// VariantConfig returns the configuration related to grafana-azure-monitor-datasource dataqueries.
+// This configuration describes how to unmarshal it, convert it to code, …
+func VariantConfig() variants.DataqueryConfig {
+	return variants.DataqueryConfig{
+		Identifier: "grafana-azure-monitor-datasource",
+		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &AzureMonitorQuery{}
+
+			if err := json.Unmarshal(raw, dataquery); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &AzureMonitorQuery{}
+
+			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		GoConverter: func(input any) string {
+			var dataquery AzureMonitorQuery
+			if cast, ok := input.(*AzureMonitorQuery); ok {
+				dataquery = *cast
+			} else {
+				dataquery = input.(AzureMonitorQuery)
+			}
+			return AzureMonitorQueryConverter(dataquery)
+		},
+	}
+}
diff --new-file --unidirectional-new-file '--color=never' --unified --recursive '--exclude=.git' '--exclude=gradle.properties' '--exclude=pyproject.toml' '--exclude=package.json' '--exclude=*.md' /tmp/foundation-workspace-main/foundation-sdk/go/bigquery/types_gen.go /tmp/foundation-workspace-current/foundation-sdk/go/bigquery/types_gen.go
--- /tmp/foundation-workspace-main/foundation-sdk/go/bigquery/types_gen.go	2024-12-13 13:58:01.480027584 +0000
+++ /tmp/foundation-workspace-current/foundation-sdk/go/bigquery/types_gen.go	2024-12-13 13:57:42.929943431 +0000
@@ -878,41 +878,6 @@
 	return &Dataquery{}
 }
 
-// VariantConfig returns the configuration related to grafana-bigquery-datasource dataqueries.
-// This configuration describes how to unmarshal it, convert it to code, …
-func VariantConfig() variants.DataqueryConfig {
-	return variants.DataqueryConfig{
-		Identifier: "grafana-bigquery-datasource",
-		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &Dataquery{}
-
-			if err := json.Unmarshal(raw, dataquery); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &Dataquery{}
-
-			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		GoConverter: func(input any) string {
-			var dataquery Dataquery
-			if cast, ok := input.(*Dataquery); ok {
-				dataquery = *cast
-			} else {
-				dataquery = input.(Dataquery)
-			}
-			return DataqueryConverter(dataquery)
-		},
-	}
-}
-
 // UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode `Dataquery` from JSON.
 // Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …
 func (resource *Dataquery) UnmarshalJSONStrict(raw []byte) error {
@@ -1346,3 +1311,38 @@
 
 	return errs
 }
+
+// VariantConfig returns the configuration related to grafana-bigquery-datasource dataqueries.
+// This configuration describes how to unmarshal it, convert it to code, …
+func VariantConfig() variants.DataqueryConfig {
+	return variants.DataqueryConfig{
+		Identifier: "grafana-bigquery-datasource",
+		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &Dataquery{}
+
+			if err := json.Unmarshal(raw, dataquery); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &Dataquery{}
+
+			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		GoConverter: func(input any) string {
+			var dataquery Dataquery
+			if cast, ok := input.(*Dataquery); ok {
+				dataquery = *cast
+			} else {
+				dataquery = input.(Dataquery)
+			}
+			return DataqueryConverter(dataquery)
+		},
+	}
+}
diff --new-file --unidirectional-new-file '--color=never' --unified --recursive '--exclude=.git' '--exclude=gradle.properties' '--exclude=pyproject.toml' '--exclude=package.json' '--exclude=*.md' /tmp/foundation-workspace-main/foundation-sdk/go/cloudwatch/types_gen.go /tmp/foundation-workspace-current/foundation-sdk/go/cloudwatch/types_gen.go
--- /tmp/foundation-workspace-main/foundation-sdk/go/cloudwatch/types_gen.go	2024-12-13 13:58:01.482027599 +0000
+++ /tmp/foundation-workspace-current/foundation-sdk/go/cloudwatch/types_gen.go	2024-12-13 13:57:42.931943446 +0000
@@ -2956,52 +2956,6 @@
 	return NewCloudWatchMetricsQueryOrCloudWatchLogsQueryOrCloudWatchAnnotationQuery()
 }
 
-// VariantConfig returns the configuration related to cloudwatch dataqueries.
-// This configuration describes how to unmarshal it, convert it to code, …
-func VariantConfig() variants.DataqueryConfig {
-	return variants.DataqueryConfig{
-		Identifier: "cloudwatch",
-		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &CloudWatchQuery{}
-
-			if err := json.Unmarshal(raw, dataquery); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &CloudWatchQuery{}
-
-			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		GoConverter: func(input any) string {
-			var dataquery CloudWatchQuery
-			if cast, ok := input.(*CloudWatchQuery); ok {
-				dataquery = *cast
-			} else {
-				dataquery = input.(CloudWatchQuery)
-			}
-
-			if dataquery.CloudWatchMetricsQuery != nil {
-				return CloudWatchMetricsQueryConverter(*dataquery.CloudWatchMetricsQuery)
-			}
-			if dataquery.CloudWatchLogsQuery != nil {
-				return CloudWatchLogsQueryConverter(*dataquery.CloudWatchLogsQuery)
-			}
-			if dataquery.CloudWatchAnnotationQuery != nil {
-				return CloudWatchAnnotationQueryConverter(*dataquery.CloudWatchAnnotationQuery)
-			}
-
-			return ""
-		},
-	}
-}
-
 type QueryEditorArrayExpressionType string
 
 const (
@@ -4129,3 +4083,49 @@
 
 	return errs
 }
+
+// VariantConfig returns the configuration related to cloudwatch dataqueries.
+// This configuration describes how to unmarshal it, convert it to code, …
+func VariantConfig() variants.DataqueryConfig {
+	return variants.DataqueryConfig{
+		Identifier: "cloudwatch",
+		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &CloudWatchQuery{}
+
+			if err := json.Unmarshal(raw, dataquery); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &CloudWatchQuery{}
+
+			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		GoConverter: func(input any) string {
+			var dataquery CloudWatchQuery
+			if cast, ok := input.(*CloudWatchQuery); ok {
+				dataquery = *cast
+			} else {
+				dataquery = input.(CloudWatchQuery)
+			}
+
+			if dataquery.CloudWatchMetricsQuery != nil {
+				return CloudWatchMetricsQueryConverter(*dataquery.CloudWatchMetricsQuery)
+			}
+			if dataquery.CloudWatchLogsQuery != nil {
+				return CloudWatchLogsQueryConverter(*dataquery.CloudWatchLogsQuery)
+			}
+			if dataquery.CloudWatchAnnotationQuery != nil {
+				return CloudWatchAnnotationQueryConverter(*dataquery.CloudWatchAnnotationQuery)
+			}
+
+			return ""
+		},
+	}
+}
diff --new-file --unidirectional-new-file '--color=never' --unified --recursive '--exclude=.git' '--exclude=gradle.properties' '--exclude=pyproject.toml' '--exclude=package.json' '--exclude=*.md' /tmp/foundation-workspace-main/foundation-sdk/go/elasticsearch/types_gen.go /tmp/foundation-workspace-current/foundation-sdk/go/elasticsearch/types_gen.go
--- /tmp/foundation-workspace-main/foundation-sdk/go/elasticsearch/types_gen.go	2024-12-13 13:58:01.527027928 +0000
+++ /tmp/foundation-workspace-current/foundation-sdk/go/elasticsearch/types_gen.go	2024-12-13 13:57:42.977943784 +0000
@@ -6733,41 +6733,6 @@
 	return &Dataquery{}
 }
 
-// VariantConfig returns the configuration related to elasticsearch dataqueries.
-// This configuration describes how to unmarshal it, convert it to code, …
-func VariantConfig() variants.DataqueryConfig {
-	return variants.DataqueryConfig{
-		Identifier: "elasticsearch",
-		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &Dataquery{}
-
-			if err := json.Unmarshal(raw, dataquery); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &Dataquery{}
-
-			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		GoConverter: func(input any) string {
-			var dataquery Dataquery
-			if cast, ok := input.(*Dataquery); ok {
-				dataquery = *cast
-			} else {
-				dataquery = input.(Dataquery)
-			}
-			return DataqueryConverter(dataquery)
-		},
-	}
-}
-
 // UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode `Dataquery` from JSON.
 // Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …
 func (resource *Dataquery) UnmarshalJSONStrict(raw []byte) error {
@@ -11655,3 +11620,38 @@
 
 	return errs
 }
+
+// VariantConfig returns the configuration related to elasticsearch dataqueries.
+// This configuration describes how to unmarshal it, convert it to code, …
+func VariantConfig() variants.DataqueryConfig {
+	return variants.DataqueryConfig{
+		Identifier: "elasticsearch",
+		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &Dataquery{}
+
+			if err := json.Unmarshal(raw, dataquery); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &Dataquery{}
+
+			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		GoConverter: func(input any) string {
+			var dataquery Dataquery
+			if cast, ok := input.(*Dataquery); ok {
+				dataquery = *cast
+			} else {
+				dataquery = input.(Dataquery)
+			}
+			return DataqueryConverter(dataquery)
+		},
+	}
+}
diff --new-file --unidirectional-new-file '--color=never' --unified --recursive '--exclude=.git' '--exclude=gradle.properties' '--exclude=pyproject.toml' '--exclude=package.json' '--exclude=*.md' /tmp/foundation-workspace-main/foundation-sdk/go/expr/types_gen.go /tmp/foundation-workspace-current/foundation-sdk/go/expr/types_gen.go
--- /tmp/foundation-workspace-main/foundation-sdk/go/expr/types_gen.go	2024-12-13 13:58:01.529027943 +0000
+++ /tmp/foundation-workspace-current/foundation-sdk/go/expr/types_gen.go	2024-12-13 13:57:42.979943798 +0000
@@ -21,61 +21,6 @@
 	return NewTypeMathOrTypeReduceOrTypeResampleOrTypeClassicConditionsOrTypeThresholdOrTypeSql()
 }
 
-// VariantConfig returns the configuration related to __expr__ dataqueries.
-// This configuration describes how to unmarshal it, convert it to code, …
-func VariantConfig() variants.DataqueryConfig {
-	return variants.DataqueryConfig{
-		Identifier: "__expr__",
-		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &Expr{}
-
-			if err := json.Unmarshal(raw, dataquery); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &Expr{}
-
-			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		GoConverter: func(input any) string {
-			var dataquery Expr
-			if cast, ok := input.(*Expr); ok {
-				dataquery = *cast
-			} else {
-				dataquery = input.(Expr)
-			}
-
-			if dataquery.TypeMath != nil {
-				return TypeMathConverter(*dataquery.TypeMath)
-			}
-			if dataquery.TypeReduce != nil {
-				return TypeReduceConverter(*dataquery.TypeReduce)
-			}
-			if dataquery.TypeResample != nil {
-				return TypeResampleConverter(*dataquery.TypeResample)
-			}
-			if dataquery.TypeClassicConditions != nil {
-				return TypeClassicConditionsConverter(*dataquery.TypeClassicConditions)
-			}
-			if dataquery.TypeThreshold != nil {
-				return TypeThresholdConverter(*dataquery.TypeThreshold)
-			}
-			if dataquery.TypeSql != nil {
-				return TypeSqlConverter(*dataquery.TypeSql)
-			}
-
-			return ""
-		},
-	}
-}
-
 type TypeMath struct {
 	// The datasource
 	Datasource *dashboard.DataSourceRef `json:"datasource,omitempty"`
@@ -4624,3 +4569,58 @@
 func (resource ExprTypeSqlTimeRange) Validate() error {
 	return nil
 }
+
+// VariantConfig returns the configuration related to __expr__ dataqueries.
+// This configuration describes how to unmarshal it, convert it to code, …
+func VariantConfig() variants.DataqueryConfig {
+	return variants.DataqueryConfig{
+		Identifier: "__expr__",
+		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &Expr{}
+
+			if err := json.Unmarshal(raw, dataquery); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &Expr{}
+
+			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		GoConverter: func(input any) string {
+			var dataquery Expr
+			if cast, ok := input.(*Expr); ok {
+				dataquery = *cast
+			} else {
+				dataquery = input.(Expr)
+			}
+
+			if dataquery.TypeMath != nil {
+				return TypeMathConverter(*dataquery.TypeMath)
+			}
+			if dataquery.TypeReduce != nil {
+				return TypeReduceConverter(*dataquery.TypeReduce)
+			}
+			if dataquery.TypeResample != nil {
+				return TypeResampleConverter(*dataquery.TypeResample)
+			}
+			if dataquery.TypeClassicConditions != nil {
+				return TypeClassicConditionsConverter(*dataquery.TypeClassicConditions)
+			}
+			if dataquery.TypeThreshold != nil {
+				return TypeThresholdConverter(*dataquery.TypeThreshold)
+			}
+			if dataquery.TypeSql != nil {
+				return TypeSqlConverter(*dataquery.TypeSql)
+			}
+
+			return ""
+		},
+	}
+}
diff --new-file --unidirectional-new-file '--color=never' --unified --recursive '--exclude=.git' '--exclude=gradle.properties' '--exclude=pyproject.toml' '--exclude=package.json' '--exclude=*.md' /tmp/foundation-workspace-main/foundation-sdk/go/googlecloudmonitoring/types_gen.go /tmp/foundation-workspace-current/foundation-sdk/go/googlecloudmonitoring/types_gen.go
--- /tmp/foundation-workspace-main/foundation-sdk/go/googlecloudmonitoring/types_gen.go	2024-12-13 13:58:01.531027958 +0000
+++ /tmp/foundation-workspace-current/foundation-sdk/go/googlecloudmonitoring/types_gen.go	2024-12-13 13:57:42.980943806 +0000
@@ -54,41 +54,6 @@
 	return &CloudMonitoringQuery{}
 }
 
-// VariantConfig returns the configuration related to cloud-monitoring dataqueries.
-// This configuration describes how to unmarshal it, convert it to code, …
-func VariantConfig() variants.DataqueryConfig {
-	return variants.DataqueryConfig{
-		Identifier: "cloud-monitoring",
-		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &CloudMonitoringQuery{}
-
-			if err := json.Unmarshal(raw, dataquery); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &CloudMonitoringQuery{}
-
-			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		GoConverter: func(input any) string {
-			var dataquery CloudMonitoringQuery
-			if cast, ok := input.(*CloudMonitoringQuery); ok {
-				dataquery = *cast
-			} else {
-				dataquery = input.(CloudMonitoringQuery)
-			}
-			return CloudMonitoringQueryConverter(dataquery)
-		},
-	}
-}
-
 // UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode `CloudMonitoringQuery` from JSON.
 // Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …
 func (resource *CloudMonitoringQuery) UnmarshalJSONStrict(raw []byte) error {
@@ -1941,3 +1906,38 @@
 	MetricFindQueryTypesSLOServices      MetricFindQueryTypes = "sloServices"
 	MetricFindQueryTypesSLO              MetricFindQueryTypes = "slo"
 )
+
+// VariantConfig returns the configuration related to cloud-monitoring dataqueries.
+// This configuration describes how to unmarshal it, convert it to code, …
+func VariantConfig() variants.DataqueryConfig {
+	return variants.DataqueryConfig{
+		Identifier: "cloud-monitoring",
+		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &CloudMonitoringQuery{}
+
+			if err := json.Unmarshal(raw, dataquery); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &CloudMonitoringQuery{}
+
+			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		GoConverter: func(input any) string {
+			var dataquery CloudMonitoringQuery
+			if cast, ok := input.(*CloudMonitoringQuery); ok {
+				dataquery = *cast
+			} else {
+				dataquery = input.(CloudMonitoringQuery)
+			}
+			return CloudMonitoringQueryConverter(dataquery)
+		},
+	}
+}
diff --new-file --unidirectional-new-file '--color=never' --unified --recursive '--exclude=.git' '--exclude=gradle.properties' '--exclude=pyproject.toml' '--exclude=package.json' '--exclude=*.md' /tmp/foundation-workspace-main/foundation-sdk/go/grafanapyroscope/types_gen.go /tmp/foundation-workspace-current/foundation-sdk/go/grafanapyroscope/types_gen.go
--- /tmp/foundation-workspace-main/foundation-sdk/go/grafanapyroscope/types_gen.go	2024-12-13 13:58:01.531027958 +0000
+++ /tmp/foundation-workspace-current/foundation-sdk/go/grafanapyroscope/types_gen.go	2024-12-13 13:57:42.980943806 +0000
@@ -62,41 +62,6 @@
 	}
 }
 
-// VariantConfig returns the configuration related to grafanapyroscope dataqueries.
-// This configuration describes how to unmarshal it, convert it to code, …
-func VariantConfig() variants.DataqueryConfig {
-	return variants.DataqueryConfig{
-		Identifier: "grafanapyroscope",
-		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &Dataquery{}
-
-			if err := json.Unmarshal(raw, dataquery); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &Dataquery{}
-
-			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		GoConverter: func(input any) string {
-			var dataquery Dataquery
-			if cast, ok := input.(*Dataquery); ok {
-				dataquery = *cast
-			} else {
-				dataquery = input.(Dataquery)
-			}
-			return DataqueryConverter(dataquery)
-		},
-	}
-}
-
 // UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode `Dataquery` from JSON.
 // Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …
 func (resource *Dataquery) UnmarshalJSONStrict(raw []byte) error {
@@ -349,3 +314,38 @@
 
 	return errs
 }
+
+// VariantConfig returns the configuration related to grafanapyroscope dataqueries.
+// This configuration describes how to unmarshal it, convert it to code, …
+func VariantConfig() variants.DataqueryConfig {
+	return variants.DataqueryConfig{
+		Identifier: "grafanapyroscope",
+		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &Dataquery{}
+
+			if err := json.Unmarshal(raw, dataquery); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &Dataquery{}
+
+			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		GoConverter: func(input any) string {
+			var dataquery Dataquery
+			if cast, ok := input.(*Dataquery); ok {
+				dataquery = *cast
+			} else {
+				dataquery = input.(Dataquery)
+			}
+			return DataqueryConverter(dataquery)
+		},
+	}
+}
diff --new-file --unidirectional-new-file '--color=never' --unified --recursive '--exclude=.git' '--exclude=gradle.properties' '--exclude=pyproject.toml' '--exclude=package.json' '--exclude=*.md' /tmp/foundation-workspace-main/foundation-sdk/go/librarypanel/types_gen.go /tmp/foundation-workspace-current/foundation-sdk/go/librarypanel/types_gen.go
--- /tmp/foundation-workspace-main/foundation-sdk/go/librarypanel/types_gen.go	2024-12-13 13:58:01.532027965 +0000
+++ /tmp/foundation-workspace-current/foundation-sdk/go/librarypanel/types_gen.go	2024-12-13 13:57:42.981943813 +0000
@@ -759,12 +759,13 @@
 		}
 	}
 
-	dataqueryTypeHint := ""
-	if resource.Datasource != nil && resource.Datasource.Type != nil {
-		dataqueryTypeHint = *resource.Datasource.Type
-	}
-
 	if fields["targets"] != nil {
+		dataqueryTypeHint := ""
+
+		if resource.Datasource != nil && resource.Datasource.Type != nil {
+			dataqueryTypeHint = *resource.Datasource.Type
+		}
+
 		targets, err := cog.UnmarshalDataqueryArray(fields["targets"], dataqueryTypeHint)
 		if err != nil {
 			return err
diff --new-file --unidirectional-new-file '--color=never' --unified --recursive '--exclude=.git' '--exclude=gradle.properties' '--exclude=pyproject.toml' '--exclude=package.json' '--exclude=*.md' /tmp/foundation-workspace-main/foundation-sdk/go/loki/types_gen.go /tmp/foundation-workspace-current/foundation-sdk/go/loki/types_gen.go
--- /tmp/foundation-workspace-main/foundation-sdk/go/loki/types_gen.go	2024-12-13 13:58:01.532027965 +0000
+++ /tmp/foundation-workspace-current/foundation-sdk/go/loki/types_gen.go	2024-12-13 13:57:42.981943813 +0000
@@ -87,41 +87,6 @@
 	return &Dataquery{}
 }
 
-// VariantConfig returns the configuration related to loki dataqueries.
-// This configuration describes how to unmarshal it, convert it to code, …
-func VariantConfig() variants.DataqueryConfig {
-	return variants.DataqueryConfig{
-		Identifier: "loki",
-		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &Dataquery{}
-
-			if err := json.Unmarshal(raw, dataquery); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &Dataquery{}
-
-			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		GoConverter: func(input any) string {
-			var dataquery Dataquery
-			if cast, ok := input.(*Dataquery); ok {
-				dataquery = *cast
-			} else {
-				dataquery = input.(Dataquery)
-			}
-			return DataqueryConverter(dataquery)
-		},
-	}
-}
-
 // UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode `Dataquery` from JSON.
 // Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …
 func (resource *Dataquery) UnmarshalJSONStrict(raw []byte) error {
@@ -411,3 +376,38 @@
 
 	return errs
 }
+
+// VariantConfig returns the configuration related to loki dataqueries.
+// This configuration describes how to unmarshal it, convert it to code, …
+func VariantConfig() variants.DataqueryConfig {
+	return variants.DataqueryConfig{
+		Identifier: "loki",
+		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &Dataquery{}
+
+			if err := json.Unmarshal(raw, dataquery); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &Dataquery{}
+
+			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		GoConverter: func(input any) string {
+			var dataquery Dataquery
+			if cast, ok := input.(*Dataquery); ok {
+				dataquery = *cast
+			} else {
+				dataquery = input.(Dataquery)
+			}
+			return DataqueryConverter(dataquery)
+		},
+	}
+}
diff --new-file --unidirectional-new-file '--color=never' --unified --recursive '--exclude=.git' '--exclude=gradle.properties' '--exclude=pyproject.toml' '--exclude=package.json' '--exclude=*.md' /tmp/foundation-workspace-main/foundation-sdk/go/parca/types_gen.go /tmp/foundation-workspace-current/foundation-sdk/go/parca/types_gen.go
--- /tmp/foundation-workspace-main/foundation-sdk/go/parca/types_gen.go	2024-12-13 13:58:01.533027972 +0000
+++ /tmp/foundation-workspace-current/foundation-sdk/go/parca/types_gen.go	2024-12-13 13:57:42.982943820 +0000
@@ -54,41 +54,6 @@
 	}
 }
 
-// VariantConfig returns the configuration related to parca dataqueries.
-// This configuration describes how to unmarshal it, convert it to code, …
-func VariantConfig() variants.DataqueryConfig {
-	return variants.DataqueryConfig{
-		Identifier: "parca",
-		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &Dataquery{}
-
-			if err := json.Unmarshal(raw, dataquery); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &Dataquery{}
-
-			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		GoConverter: func(input any) string {
-			var dataquery Dataquery
-			if cast, ok := input.(*Dataquery); ok {
-				dataquery = *cast
-			} else {
-				dataquery = input.(Dataquery)
-			}
-			return DataqueryConverter(dataquery)
-		},
-	}
-}
-
 // UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode `Dataquery` from JSON.
 // Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …
 func (resource *Dataquery) UnmarshalJSONStrict(raw []byte) error {
@@ -254,3 +219,38 @@
 
 	return errs
 }
+
+// VariantConfig returns the configuration related to parca dataqueries.
+// This configuration describes how to unmarshal it, convert it to code, …
+func VariantConfig() variants.DataqueryConfig {
+	return variants.DataqueryConfig{
+		Identifier: "parca",
+		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &Dataquery{}
+
+			if err := json.Unmarshal(raw, dataquery); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &Dataquery{}
+
+			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		GoConverter: func(input any) string {
+			var dataquery Dataquery
+			if cast, ok := input.(*Dataquery); ok {
+				dataquery = *cast
+			} else {
+				dataquery = input.(Dataquery)
+			}
+			return DataqueryConverter(dataquery)
+		},
+	}
+}
diff --new-file --unidirectional-new-file '--color=never' --unified --recursive '--exclude=.git' '--exclude=gradle.properties' '--exclude=pyproject.toml' '--exclude=package.json' '--exclude=*.md' /tmp/foundation-workspace-main/foundation-sdk/go/prometheus/types_gen.go /tmp/foundation-workspace-current/foundation-sdk/go/prometheus/types_gen.go
--- /tmp/foundation-workspace-main/foundation-sdk/go/prometheus/types_gen.go	2024-12-13 13:58:01.533027972 +0000
+++ /tmp/foundation-workspace-current/foundation-sdk/go/prometheus/types_gen.go	2024-12-13 13:57:42.983943828 +0000
@@ -75,41 +75,6 @@
 	return &Dataquery{}
 }
 
-// VariantConfig returns the configuration related to prometheus dataqueries.
-// This configuration describes how to unmarshal it, convert it to code, …
-func VariantConfig() variants.DataqueryConfig {
-	return variants.DataqueryConfig{
-		Identifier: "prometheus",
-		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &Dataquery{}
-
-			if err := json.Unmarshal(raw, dataquery); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &Dataquery{}
-
-			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		GoConverter: func(input any) string {
-			var dataquery Dataquery
-			if cast, ok := input.(*Dataquery); ok {
-				dataquery = *cast
-			} else {
-				dataquery = input.(Dataquery)
-			}
-			return DataqueryConverter(dataquery)
-		},
-	}
-}
-
 // UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode `Dataquery` from JSON.
 // Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …
 func (resource *Dataquery) UnmarshalJSONStrict(raw []byte) error {
@@ -419,3 +384,38 @@
 
 	return errs
 }
+
+// VariantConfig returns the configuration related to prometheus dataqueries.
+// This configuration describes how to unmarshal it, convert it to code, …
+func VariantConfig() variants.DataqueryConfig {
+	return variants.DataqueryConfig{
+		Identifier: "prometheus",
+		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &Dataquery{}
+
+			if err := json.Unmarshal(raw, dataquery); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &Dataquery{}
+
+			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		GoConverter: func(input any) string {
+			var dataquery Dataquery
+			if cast, ok := input.(*Dataquery); ok {
+				dataquery = *cast
+			} else {
+				dataquery = input.(Dataquery)
+			}
+			return DataqueryConverter(dataquery)
+		},
+	}
+}
diff --new-file --unidirectional-new-file '--color=never' --unified --recursive '--exclude=.git' '--exclude=gradle.properties' '--exclude=pyproject.toml' '--exclude=package.json' '--exclude=*.md' /tmp/foundation-workspace-main/foundation-sdk/go/tempo/types_gen.go /tmp/foundation-workspace-current/foundation-sdk/go/tempo/types_gen.go
--- /tmp/foundation-workspace-main/foundation-sdk/go/tempo/types_gen.go	2024-12-13 13:58:01.535027987 +0000
+++ /tmp/foundation-workspace-current/foundation-sdk/go/tempo/types_gen.go	2024-12-13 13:57:42.985943842 +0000
@@ -68,41 +68,6 @@
 	return &TempoQuery{}
 }
 
-// VariantConfig returns the configuration related to tempo dataqueries.
-// This configuration describes how to unmarshal it, convert it to code, …
-func VariantConfig() variants.DataqueryConfig {
-	return variants.DataqueryConfig{
-		Identifier: "tempo",
-		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &TempoQuery{}
-
-			if err := json.Unmarshal(raw, dataquery); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &TempoQuery{}
-
-			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		GoConverter: func(input any) string {
-			var dataquery TempoQuery
-			if cast, ok := input.(*TempoQuery); ok {
-				dataquery = *cast
-			} else {
-				dataquery = input.(TempoQuery)
-			}
-			return TempoQueryConverter(dataquery)
-		},
-	}
-}
-
 // UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode `TempoQuery` from JSON.
 // Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …
 func (resource *TempoQuery) UnmarshalJSONStrict(raw []byte) error {
@@ -916,3 +881,38 @@
 func (resource StringOrArrayOfString) Validate() error {
 	return nil
 }
+
+// VariantConfig returns the configuration related to tempo dataqueries.
+// This configuration describes how to unmarshal it, convert it to code, …
+func VariantConfig() variants.DataqueryConfig {
+	return variants.DataqueryConfig{
+		Identifier: "tempo",
+		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &TempoQuery{}
+
+			if err := json.Unmarshal(raw, dataquery); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &TempoQuery{}
+
+			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		GoConverter: func(input any) string {
+			var dataquery TempoQuery
+			if cast, ok := input.(*TempoQuery); ok {
+				dataquery = *cast
+			} else {
+				dataquery = input.(TempoQuery)
+			}
+			return TempoQueryConverter(dataquery)
+		},
+	}
+}
diff --new-file --unidirectional-new-file '--color=never' --unified --recursive '--exclude=.git' '--exclude=gradle.properties' '--exclude=pyproject.toml' '--exclude=package.json' '--exclude=*.md' /tmp/foundation-workspace-main/foundation-sdk/go/testdata/types_gen.go /tmp/foundation-workspace-current/foundation-sdk/go/testdata/types_gen.go
--- /tmp/foundation-workspace-main/foundation-sdk/go/testdata/types_gen.go	2024-12-13 13:58:01.536027994 +0000
+++ /tmp/foundation-workspace-current/foundation-sdk/go/testdata/types_gen.go	2024-12-13 13:57:42.985943842 +0000
@@ -1244,41 +1244,6 @@
 	return &Dataquery{}
 }
 
-// VariantConfig returns the configuration related to  dataqueries.
-// This configuration describes how to unmarshal it, convert it to code, …
-func VariantConfig() variants.DataqueryConfig {
-	return variants.DataqueryConfig{
-		Identifier: "",
-		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &Dataquery{}
-
-			if err := json.Unmarshal(raw, dataquery); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
-			dataquery := &Dataquery{}
-
-			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
-				return nil, err
-			}
-
-			return dataquery, nil
-		},
-		GoConverter: func(input any) string {
-			var dataquery Dataquery
-			if cast, ok := input.(*Dataquery); ok {
-				dataquery = *cast
-			} else {
-				dataquery = input.(Dataquery)
-			}
-			return DataqueryConverter(dataquery)
-		},
-	}
-}
-
 // UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode `Dataquery` from JSON.
 // Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …
 func (resource *Dataquery) UnmarshalJSONStrict(raw []byte) error {
@@ -2237,3 +2202,38 @@
 	DataqueryScenarioIdUsa                          DataqueryScenarioId = "usa"
 	DataqueryScenarioIdVariablesQuery               DataqueryScenarioId = "variables-query"
 )
+
+// VariantConfig returns the configuration related to  dataqueries.
+// This configuration describes how to unmarshal it, convert it to code, …
+func VariantConfig() variants.DataqueryConfig {
+	return variants.DataqueryConfig{
+		Identifier: "",
+		DataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &Dataquery{}
+
+			if err := json.Unmarshal(raw, dataquery); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		StrictDataqueryUnmarshaler: func(raw []byte) (variants.Dataquery, error) {
+			dataquery := &Dataquery{}
+
+			if err := dataquery.UnmarshalJSONStrict(raw); err != nil {
+				return nil, err
+			}
+
+			return dataquery, nil
+		},
+		GoConverter: func(input any) string {
+			var dataquery Dataquery
+			if cast, ok := input.(*Dataquery); ok {
+				dataquery = *cast
+			} else {
+				dataquery = input.(Dataquery)
+			}
+			return DataqueryConverter(dataquery)
+		},
+	}
+}

@K-Phoen K-Phoen force-pushed the go/grafana-schema-references branch from e6eb173 to 9cd0d8f Compare December 15, 2024 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant