Skip to content

Commit ddc1058

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
update metrics.yaml for ListMetricAssets and include Dashboard info (#3028)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 9e0b322 commit ddc1058

File tree

3 files changed

+51
-3
lines changed

3 files changed

+51
-3
lines changed

.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:34.729"
2+
"spec_repo_commit": "b737cc4",
3+
"generated": "2025-07-28 13:12:45.774"
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

src/main/java/com/datadog/api/client/v2/model/MetricDashboardAttributes.java

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@
1212
import com.fasterxml.jackson.annotation.JsonInclude;
1313
import com.fasterxml.jackson.annotation.JsonProperty;
1414
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
15+
import java.util.ArrayList;
1516
import java.util.HashMap;
17+
import java.util.List;
1618
import java.util.Map;
1719
import java.util.Objects;
1820

1921
/** Attributes related to the dashboard, including title, popularity, and url. */
2022
@JsonPropertyOrder({
2123
MetricDashboardAttributes.JSON_PROPERTY_POPULARITY,
24+
MetricDashboardAttributes.JSON_PROPERTY_TAGS,
2225
MetricDashboardAttributes.JSON_PROPERTY_TITLE,
2326
MetricDashboardAttributes.JSON_PROPERTY_URL
2427
})
@@ -29,6 +32,9 @@ public class MetricDashboardAttributes {
2932
public static final String JSON_PROPERTY_POPULARITY = "popularity";
3033
private Double popularity;
3134

35+
public static final String JSON_PROPERTY_TAGS = "tags";
36+
private List<String> tags = null;
37+
3238
public static final String JSON_PROPERTY_TITLE = "title";
3339
private String title;
3440

@@ -56,6 +62,35 @@ public void setPopularity(Double popularity) {
5662
this.popularity = popularity;
5763
}
5864

65+
public MetricDashboardAttributes tags(List<String> tags) {
66+
this.tags = tags;
67+
return this;
68+
}
69+
70+
public MetricDashboardAttributes addTagsItem(String tagsItem) {
71+
if (this.tags == null) {
72+
this.tags = new ArrayList<>();
73+
}
74+
this.tags.add(tagsItem);
75+
return this;
76+
}
77+
78+
/**
79+
* List of tag keys used in the asset.
80+
*
81+
* @return tags
82+
*/
83+
@jakarta.annotation.Nullable
84+
@JsonProperty(JSON_PROPERTY_TAGS)
85+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
86+
public List<String> getTags() {
87+
return tags;
88+
}
89+
90+
public void setTags(List<String> tags) {
91+
this.tags = tags;
92+
}
93+
5994
public MetricDashboardAttributes title(String title) {
6095
this.title = title;
6196
return this;
@@ -155,6 +190,7 @@ public boolean equals(Object o) {
155190
}
156191
MetricDashboardAttributes metricDashboardAttributes = (MetricDashboardAttributes) o;
157192
return Objects.equals(this.popularity, metricDashboardAttributes.popularity)
193+
&& Objects.equals(this.tags, metricDashboardAttributes.tags)
158194
&& Objects.equals(this.title, metricDashboardAttributes.title)
159195
&& Objects.equals(this.url, metricDashboardAttributes.url)
160196
&& Objects.equals(
@@ -163,14 +199,15 @@ public boolean equals(Object o) {
163199

164200
@Override
165201
public int hashCode() {
166-
return Objects.hash(popularity, title, url, additionalProperties);
202+
return Objects.hash(popularity, tags, title, url, additionalProperties);
167203
}
168204

169205
@Override
170206
public String toString() {
171207
StringBuilder sb = new StringBuilder();
172208
sb.append("class MetricDashboardAttributes {\n");
173209
sb.append(" popularity: ").append(toIndentedString(popularity)).append("\n");
210+
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
174211
sb.append(" title: ").append(toIndentedString(title)).append("\n");
175212
sb.append(" url: ").append(toIndentedString(url)).append("\n");
176213
sb.append(" additionalProperties: ")

0 commit comments

Comments
 (0)