Skip to content

Commit 5749d71

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
update metrics.yaml for ListMetricAssets and include Dashboard info (#3245)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent aebad8f commit 5749d71

3 files changed

Lines changed: 49 additions & 3 deletions

File tree

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "e4f653f",
3-
"generated": "2025-07-25 14:08:41.556"
2+
"spec_repo_commit": "b737cc4",
3+
"generated": "2025-07-28 13:12:54.236"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22867,6 +22867,17 @@ components:
2286722867
maximum: 5
2286822868
minimum: 0
2286922869
type: number
22870+
tags:
22871+
description: List of tag keys used in the asset.
22872+
example:
22873+
- env
22874+
- service
22875+
- host
22876+
- datacenter
22877+
items:
22878+
description: Tag key used in assets.
22879+
type: string
22880+
type: array
2287022881
title:
2287122882
description: Title of the asset.
2287222883
type: string

api/datadogV2/model_metric_dashboard_attributes.go

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import (
1212
type MetricDashboardAttributes struct {
1313
// Value from 0 to 5 that ranks popularity of the dashboard.
1414
Popularity *float64 `json:"popularity,omitempty"`
15+
// List of tag keys used in the asset.
16+
Tags []string `json:"tags,omitempty"`
1517
// Title of the asset.
1618
Title *string `json:"title,omitempty"`
1719
// URL path of the asset.
@@ -66,6 +68,34 @@ func (o *MetricDashboardAttributes) SetPopularity(v float64) {
6668
o.Popularity = &v
6769
}
6870

71+
// GetTags returns the Tags field value if set, zero value otherwise.
72+
func (o *MetricDashboardAttributes) GetTags() []string {
73+
if o == nil || o.Tags == nil {
74+
var ret []string
75+
return ret
76+
}
77+
return o.Tags
78+
}
79+
80+
// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise
81+
// and a boolean to check if the value has been set.
82+
func (o *MetricDashboardAttributes) GetTagsOk() (*[]string, bool) {
83+
if o == nil || o.Tags == nil {
84+
return nil, false
85+
}
86+
return &o.Tags, true
87+
}
88+
89+
// HasTags returns a boolean if a field has been set.
90+
func (o *MetricDashboardAttributes) HasTags() bool {
91+
return o != nil && o.Tags != nil
92+
}
93+
94+
// SetTags gets a reference to the given []string and assigns it to the Tags field.
95+
func (o *MetricDashboardAttributes) SetTags(v []string) {
96+
o.Tags = v
97+
}
98+
6999
// GetTitle returns the Title field value if set, zero value otherwise.
70100
func (o *MetricDashboardAttributes) GetTitle() string {
71101
if o == nil || o.Title == nil {
@@ -131,6 +161,9 @@ func (o MetricDashboardAttributes) MarshalJSON() ([]byte, error) {
131161
if o.Popularity != nil {
132162
toSerialize["popularity"] = o.Popularity
133163
}
164+
if o.Tags != nil {
165+
toSerialize["tags"] = o.Tags
166+
}
134167
if o.Title != nil {
135168
toSerialize["title"] = o.Title
136169
}
@@ -148,6 +181,7 @@ func (o MetricDashboardAttributes) MarshalJSON() ([]byte, error) {
148181
func (o *MetricDashboardAttributes) UnmarshalJSON(bytes []byte) (err error) {
149182
all := struct {
150183
Popularity *float64 `json:"popularity,omitempty"`
184+
Tags []string `json:"tags,omitempty"`
151185
Title *string `json:"title,omitempty"`
152186
Url *string `json:"url,omitempty"`
153187
}{}
@@ -156,11 +190,12 @@ func (o *MetricDashboardAttributes) UnmarshalJSON(bytes []byte) (err error) {
156190
}
157191
additionalProperties := make(map[string]interface{})
158192
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
159-
datadog.DeleteKeys(additionalProperties, &[]string{"popularity", "title", "url"})
193+
datadog.DeleteKeys(additionalProperties, &[]string{"popularity", "tags", "title", "url"})
160194
} else {
161195
return err
162196
}
163197
o.Popularity = all.Popularity
198+
o.Tags = all.Tags
164199
o.Title = all.Title
165200
o.Url = all.Url
166201

0 commit comments

Comments
 (0)