Skip to content

Commit f115c0b

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
update metrics.yaml for ListMetricAssets (#2970)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 80b3c5e commit f115c0b

File tree

6 files changed

+57
-9
lines changed

6 files changed

+57
-9
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": "4727afe",
3-
"generated": "2025-07-23 15:38:09.593"
2+
"spec_repo_commit": "c09ac23",
3+
"generated": "2025-07-24 19:59:23.532"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22454,8 +22454,19 @@ components:
2245422454
readOnly: true
2245522455
type: object
2245622456
MetricAssetAttributes:
22457-
description: Assets related to the object, including title and url.
22457+
description: Assets related to the object, including title, url, and tags.
2245822458
properties:
22459+
tags:
22460+
description: List of tag keys used in the asset.
22461+
example:
22462+
- env
22463+
- service
22464+
- host
22465+
- datacenter
22466+
items:
22467+
description: Tag key used in assets.
22468+
type: string
22469+
type: array
2245922470
title:
2246022471
description: Title of the asset.
2246122472
type: string

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

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,60 @@
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

19-
/** Assets related to the object, including title and url. */
21+
/** Assets related to the object, including title, url, and tags. */
2022
@JsonPropertyOrder({
23+
MetricAssetAttributes.JSON_PROPERTY_TAGS,
2124
MetricAssetAttributes.JSON_PROPERTY_TITLE,
2225
MetricAssetAttributes.JSON_PROPERTY_URL
2326
})
2427
@jakarta.annotation.Generated(
2528
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
2629
public class MetricAssetAttributes {
2730
@JsonIgnore public boolean unparsed = false;
31+
public static final String JSON_PROPERTY_TAGS = "tags";
32+
private List<String> tags = null;
33+
2834
public static final String JSON_PROPERTY_TITLE = "title";
2935
private String title;
3036

3137
public static final String JSON_PROPERTY_URL = "url";
3238
private String url;
3339

40+
public MetricAssetAttributes tags(List<String> tags) {
41+
this.tags = tags;
42+
return this;
43+
}
44+
45+
public MetricAssetAttributes addTagsItem(String tagsItem) {
46+
if (this.tags == null) {
47+
this.tags = new ArrayList<>();
48+
}
49+
this.tags.add(tagsItem);
50+
return this;
51+
}
52+
53+
/**
54+
* List of tag keys used in the asset.
55+
*
56+
* @return tags
57+
*/
58+
@jakarta.annotation.Nullable
59+
@JsonProperty(JSON_PROPERTY_TAGS)
60+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
61+
public List<String> getTags() {
62+
return tags;
63+
}
64+
65+
public void setTags(List<String> tags) {
66+
this.tags = tags;
67+
}
68+
3469
public MetricAssetAttributes title(String title) {
3570
this.title = title;
3671
return this;
@@ -129,20 +164,22 @@ public boolean equals(Object o) {
129164
return false;
130165
}
131166
MetricAssetAttributes metricAssetAttributes = (MetricAssetAttributes) o;
132-
return Objects.equals(this.title, metricAssetAttributes.title)
167+
return Objects.equals(this.tags, metricAssetAttributes.tags)
168+
&& Objects.equals(this.title, metricAssetAttributes.title)
133169
&& Objects.equals(this.url, metricAssetAttributes.url)
134170
&& Objects.equals(this.additionalProperties, metricAssetAttributes.additionalProperties);
135171
}
136172

137173
@Override
138174
public int hashCode() {
139-
return Objects.hash(title, url, additionalProperties);
175+
return Objects.hash(tags, title, url, additionalProperties);
140176
}
141177

142178
@Override
143179
public String toString() {
144180
StringBuilder sb = new StringBuilder();
145181
sb.append("class MetricAssetAttributes {\n");
182+
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
146183
sb.append(" title: ").append(toIndentedString(title)).append("\n");
147184
sb.append(" url: ").append(toIndentedString(url)).append("\n");
148185
sb.append(" additionalProperties: ")

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public MetricMonitorAsset attributes(MetricAssetAttributes attributes) {
5454
}
5555

5656
/**
57-
* Assets related to the object, including title and url.
57+
* Assets related to the object, including title, url, and tags.
5858
*
5959
* @return attributes
6060
*/

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public MetricNotebookAsset attributes(MetricAssetAttributes attributes) {
5454
}
5555

5656
/**
57-
* Assets related to the object, including title and url.
57+
* Assets related to the object, including title, url, and tags.
5858
*
5959
* @return attributes
6060
*/

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public MetricSLOAsset attributes(MetricAssetAttributes attributes) {
5454
}
5555

5656
/**
57-
* Assets related to the object, including title and url.
57+
* Assets related to the object, including title, url, and tags.
5858
*
5959
* @return attributes
6060
*/

0 commit comments

Comments
 (0)