Skip to content

Commit d9072fd

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit a357f01 of spec repo
1 parent 66620ea commit d9072fd

File tree

8 files changed

+674
-5
lines changed

8 files changed

+674
-5
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38523,6 +38523,8 @@ components:
3852338523
properties:
3852438524
id:
3852538525
$ref: '#/components/schemas/MetricName'
38526+
relationships:
38527+
$ref: '#/components/schemas/MetricRelationships'
3852638528
type:
3852738529
$ref: '#/components/schemas/MetricType'
3852838530
type: object
@@ -39298,6 +39300,12 @@ components:
3929839300
format: double
3929939301
type: number
3930039302
type: object
39303+
MetricRelationships:
39304+
description: Relationships to related metric objects.
39305+
properties:
39306+
metric_volumes:
39307+
$ref: '#/components/schemas/MetricVolumesRelationship'
39308+
type: object
3930139309
MetricResource:
3930239310
description: Metric resource.
3930339311
example:
@@ -39741,6 +39749,33 @@ components:
3974139749
oneOf:
3974239750
- $ref: '#/components/schemas/MetricDistinctVolume'
3974339751
- $ref: '#/components/schemas/MetricIngestedIndexedVolume'
39752+
MetricVolumesInclude:
39753+
description: Comma-separated list of additional data to include in the response.
39754+
Allowed values are `metric_volumes`.
39755+
enum:
39756+
- metric_volumes
39757+
- generated_metric_attributes
39758+
type: string
39759+
x-enum-varnames:
39760+
- METRIC_VOLUMES
39761+
- GENERATED_METRIC_ATTRIBUTES
39762+
MetricVolumesRelationship:
39763+
description: Relationship to a metric's ingested and indexed volumes.
39764+
properties:
39765+
data:
39766+
$ref: '#/components/schemas/MetricVolumesRelationshipData'
39767+
type: object
39768+
MetricVolumesRelationshipData:
39769+
description: Relationship data for a metric's ingested and indexed volumes.
39770+
properties:
39771+
id:
39772+
$ref: '#/components/schemas/MetricName'
39773+
type:
39774+
$ref: '#/components/schemas/MetricIngestedIndexedVolumeType'
39775+
required:
39776+
- type
39777+
- id
39778+
type: object
3974439779
MetricVolumesResponse:
3974539780
description: Response object which includes a single metric's volume.
3974639781
properties:
@@ -39787,6 +39822,12 @@ components:
3978739822
items:
3978839823
$ref: '#/components/schemas/MetricsAndMetricTagConfigurations'
3978939824
type: array
39825+
included:
39826+
description: Array of included metric volume objects. Only present when
39827+
`include=metric_volumes` is requested.
39828+
items:
39829+
$ref: '#/components/schemas/MetricIngestedIndexedVolume'
39830+
type: array
3979039831
links:
3979139832
$ref: '#/components/schemas/MetricsListResponseLinks'
3979239833
meta:
@@ -91450,7 +91491,13 @@ paths:
9145091491
`next_cursor` value from the response as the new `page[cursor]` value.
9145191492

9145291493
Once the `meta.pagination.next_cursor` value is null, all pages have been
91453-
retrieved.'
91494+
retrieved.
91495+
91496+
Use the `include` query parameter to fetch additional data with the response.
91497+
When `include=metric_volumes` is specified, the response includes volume data
91498+
for each custom metric in the `included` array, with a corresponding `relationships`
91499+
link on each metric in `data`. Volume data is only returned for custom metrics.
91500+
All volume values represent a 1-hour timeframe.'
9145491501
operationId: ListTagConfigurations
9145591502
parameters:
9145691503
- description: Filter custom metrics that have configured tags.
@@ -91532,6 +91579,16 @@ paths:
9153291579
required: false
9153391580
schema:
9153491581
type: boolean
91582+
- description: 'Comma-separated list of additional data to include in the response.
91583+
Allowed values: `metric_volumes`. When `metric_volumes` is specified, the
91584+
response includes volume data for each custom metric in the `included` array,
91585+
with a corresponding `relationships` link on each metric in `data`.'
91586+
example: metric_volumes
91587+
in: query
91588+
name: include
91589+
required: false
91590+
schema:
91591+
$ref: '#/components/schemas/MetricVolumesInclude'
9153591592
- description: 'The number of seconds of look back (from now) to apply to a
9153691593
filter[tag] or filter[queried] query.
9153791594

src/main/java/com/datadog/api/client/v2/api/MetricsApi.java

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import com.datadog.api.client.v2.model.MetricTagConfigurationMetricTypeCategory;
2121
import com.datadog.api.client.v2.model.MetricTagConfigurationResponse;
2222
import com.datadog.api.client.v2.model.MetricTagConfigurationUpdateRequest;
23+
import com.datadog.api.client.v2.model.MetricVolumesInclude;
2324
import com.datadog.api.client.v2.model.MetricVolumesResponse;
2425
import com.datadog.api.client.v2.model.MetricsAndMetricTagConfigurations;
2526
import com.datadog.api.client.v2.model.MetricsAndMetricTagConfigurationsResponse;
@@ -1599,6 +1600,7 @@ public static class ListTagConfigurationsOptionalParameters {
15991600
private Long filterQueriedWindowSeconds;
16001601
private String filterTags;
16011602
private Boolean filterRelatedAssets;
1603+
private MetricVolumesInclude include;
16021604
private Long windowSeconds;
16031605
private Integer pageSize;
16041606
private String pageCursor;
@@ -1709,6 +1711,21 @@ public ListTagConfigurationsOptionalParameters filterRelatedAssets(
17091711
return this;
17101712
}
17111713

1714+
/**
1715+
* Set include.
1716+
*
1717+
* @param include Comma-separated list of additional data to include in the response. Allowed
1718+
* values: <code>metric_volumes</code>. When <code>metric_volumes</code> is specified, the
1719+
* response includes volume data for each custom metric in the <code>included</code> array,
1720+
* with a corresponding <code>relationships</code> link on each metric in <code>data</code>.
1721+
* (optional)
1722+
* @return ListTagConfigurationsOptionalParameters
1723+
*/
1724+
public ListTagConfigurationsOptionalParameters include(MetricVolumesInclude include) {
1725+
this.include = include;
1726+
return this;
1727+
}
1728+
17121729
/**
17131730
* Set windowSeconds.
17141731
*
@@ -1867,7 +1884,11 @@ public PaginationIterable<MetricsAndMetricTagConfigurations> listTagConfiguratio
18671884
* page[size]</code> or an empty cursor like <code>page[cursor]=</code>. To fetch the next page,
18681885
* pass in the <code>next_cursor</code> value from the response as the new <code>page[cursor]
18691886
* </code> value. Once the <code>meta.pagination.next_cursor</code> value is null, all pages have
1870-
* been retrieved.
1887+
* been retrieved. Use the <code>include</code> query parameter to fetch additional data with the
1888+
* response. When <code>include=metric_volumes</code> is specified, the response includes volume
1889+
* data for each custom metric in the <code>included</code> array, with a corresponding <code>
1890+
* relationships</code> link on each metric in <code>data</code>. Volume data is only returned for
1891+
* custom metrics. All volume values represent a 1-hour timeframe.
18711892
*
18721893
* @param parameters Optional parameters for the request.
18731894
* @return ApiResponse&lt;MetricsAndMetricTagConfigurationsResponse&gt;
@@ -1893,6 +1914,7 @@ public ApiResponse<MetricsAndMetricTagConfigurationsResponse> listTagConfigurati
18931914
Long filterQueriedWindowSeconds = parameters.filterQueriedWindowSeconds;
18941915
String filterTags = parameters.filterTags;
18951916
Boolean filterRelatedAssets = parameters.filterRelatedAssets;
1917+
MetricVolumesInclude include = parameters.include;
18961918
Long windowSeconds = parameters.windowSeconds;
18971919
Integer pageSize = parameters.pageSize;
18981920
String pageCursor = parameters.pageCursor;
@@ -1917,6 +1939,7 @@ public ApiResponse<MetricsAndMetricTagConfigurationsResponse> listTagConfigurati
19171939
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags));
19181940
localVarQueryParams.addAll(
19191941
apiClient.parameterToPairs("", "filter[related_assets]", filterRelatedAssets));
1942+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
19201943
localVarQueryParams.addAll(apiClient.parameterToPairs("", "window[seconds]", windowSeconds));
19211944
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize));
19221945
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor));
@@ -1960,6 +1983,7 @@ public ApiResponse<MetricsAndMetricTagConfigurationsResponse> listTagConfigurati
19601983
Long filterQueriedWindowSeconds = parameters.filterQueriedWindowSeconds;
19611984
String filterTags = parameters.filterTags;
19621985
Boolean filterRelatedAssets = parameters.filterRelatedAssets;
1986+
MetricVolumesInclude include = parameters.include;
19631987
Long windowSeconds = parameters.windowSeconds;
19641988
Integer pageSize = parameters.pageSize;
19651989
String pageCursor = parameters.pageCursor;
@@ -1984,6 +2008,7 @@ public ApiResponse<MetricsAndMetricTagConfigurationsResponse> listTagConfigurati
19842008
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags));
19852009
localVarQueryParams.addAll(
19862010
apiClient.parameterToPairs("", "filter[related_assets]", filterRelatedAssets));
2011+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
19872012
localVarQueryParams.addAll(apiClient.parameterToPairs("", "window[seconds]", windowSeconds));
19882013
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize));
19892014
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor));

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

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,21 @@
1717
import java.util.Objects;
1818

1919
/** Object for a single metric tag configuration. */
20-
@JsonPropertyOrder({Metric.JSON_PROPERTY_ID, Metric.JSON_PROPERTY_TYPE})
20+
@JsonPropertyOrder({
21+
Metric.JSON_PROPERTY_ID,
22+
Metric.JSON_PROPERTY_RELATIONSHIPS,
23+
Metric.JSON_PROPERTY_TYPE
24+
})
2125
@jakarta.annotation.Generated(
2226
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
2327
public class Metric {
2428
@JsonIgnore public boolean unparsed = false;
2529
public static final String JSON_PROPERTY_ID = "id";
2630
private String id;
2731

32+
public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships";
33+
private MetricRelationships relationships;
34+
2835
public static final String JSON_PROPERTY_TYPE = "type";
2936
private MetricType type = MetricType.METRICS;
3037

@@ -49,6 +56,28 @@ public void setId(String id) {
4956
this.id = id;
5057
}
5158

59+
public Metric relationships(MetricRelationships relationships) {
60+
this.relationships = relationships;
61+
this.unparsed |= relationships.unparsed;
62+
return this;
63+
}
64+
65+
/**
66+
* Relationships to related metric objects.
67+
*
68+
* @return relationships
69+
*/
70+
@jakarta.annotation.Nullable
71+
@JsonProperty(JSON_PROPERTY_RELATIONSHIPS)
72+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
73+
public MetricRelationships getRelationships() {
74+
return relationships;
75+
}
76+
77+
public void setRelationships(MetricRelationships relationships) {
78+
this.relationships = relationships;
79+
}
80+
5281
public Metric type(MetricType type) {
5382
this.type = type;
5483
this.unparsed |= !type.isValid();
@@ -131,20 +160,22 @@ public boolean equals(Object o) {
131160
}
132161
Metric metric = (Metric) o;
133162
return Objects.equals(this.id, metric.id)
163+
&& Objects.equals(this.relationships, metric.relationships)
134164
&& Objects.equals(this.type, metric.type)
135165
&& Objects.equals(this.additionalProperties, metric.additionalProperties);
136166
}
137167

138168
@Override
139169
public int hashCode() {
140-
return Objects.hash(id, type, additionalProperties);
170+
return Objects.hash(id, relationships, type, additionalProperties);
141171
}
142172

143173
@Override
144174
public String toString() {
145175
StringBuilder sb = new StringBuilder();
146176
sb.append("class Metric {\n");
147177
sb.append(" id: ").append(toIndentedString(id)).append("\n");
178+
sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n");
148179
sb.append(" type: ").append(toIndentedString(type)).append("\n");
149180
sb.append(" additionalProperties: ")
150181
.append(toIndentedString(additionalProperties))
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
/*
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2019-Present Datadog, Inc.
5+
*/
6+
7+
package com.datadog.api.client.v2.model;
8+
9+
import com.fasterxml.jackson.annotation.JsonAnyGetter;
10+
import com.fasterxml.jackson.annotation.JsonAnySetter;
11+
import com.fasterxml.jackson.annotation.JsonIgnore;
12+
import com.fasterxml.jackson.annotation.JsonInclude;
13+
import com.fasterxml.jackson.annotation.JsonProperty;
14+
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
15+
import java.util.HashMap;
16+
import java.util.Map;
17+
import java.util.Objects;
18+
19+
/** Relationships to related metric objects. */
20+
@JsonPropertyOrder({MetricRelationships.JSON_PROPERTY_METRIC_VOLUMES})
21+
@jakarta.annotation.Generated(
22+
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
23+
public class MetricRelationships {
24+
@JsonIgnore public boolean unparsed = false;
25+
public static final String JSON_PROPERTY_METRIC_VOLUMES = "metric_volumes";
26+
private MetricVolumesRelationship metricVolumes;
27+
28+
public MetricRelationships metricVolumes(MetricVolumesRelationship metricVolumes) {
29+
this.metricVolumes = metricVolumes;
30+
this.unparsed |= metricVolumes.unparsed;
31+
return this;
32+
}
33+
34+
/**
35+
* Relationship to a metric's ingested and indexed volumes.
36+
*
37+
* @return metricVolumes
38+
*/
39+
@jakarta.annotation.Nullable
40+
@JsonProperty(JSON_PROPERTY_METRIC_VOLUMES)
41+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
42+
public MetricVolumesRelationship getMetricVolumes() {
43+
return metricVolumes;
44+
}
45+
46+
public void setMetricVolumes(MetricVolumesRelationship metricVolumes) {
47+
this.metricVolumes = metricVolumes;
48+
}
49+
50+
/**
51+
* A container for additional, undeclared properties. This is a holder for any undeclared
52+
* properties as specified with the 'additionalProperties' keyword in the OAS document.
53+
*/
54+
private Map<String, Object> additionalProperties;
55+
56+
/**
57+
* Set the additional (undeclared) property with the specified name and value. If the property
58+
* does not already exist, create it otherwise replace it.
59+
*
60+
* @param key The arbitrary key to set
61+
* @param value The associated value
62+
* @return MetricRelationships
63+
*/
64+
@JsonAnySetter
65+
public MetricRelationships putAdditionalProperty(String key, Object value) {
66+
if (this.additionalProperties == null) {
67+
this.additionalProperties = new HashMap<String, Object>();
68+
}
69+
this.additionalProperties.put(key, value);
70+
return this;
71+
}
72+
73+
/**
74+
* Return the additional (undeclared) property.
75+
*
76+
* @return The additional properties
77+
*/
78+
@JsonAnyGetter
79+
public Map<String, Object> getAdditionalProperties() {
80+
return additionalProperties;
81+
}
82+
83+
/**
84+
* Return the additional (undeclared) property with the specified name.
85+
*
86+
* @param key The arbitrary key to get
87+
* @return The specific additional property for the given key
88+
*/
89+
public Object getAdditionalProperty(String key) {
90+
if (this.additionalProperties == null) {
91+
return null;
92+
}
93+
return this.additionalProperties.get(key);
94+
}
95+
96+
/** Return true if this MetricRelationships object is equal to o. */
97+
@Override
98+
public boolean equals(Object o) {
99+
if (this == o) {
100+
return true;
101+
}
102+
if (o == null || getClass() != o.getClass()) {
103+
return false;
104+
}
105+
MetricRelationships metricRelationships = (MetricRelationships) o;
106+
return Objects.equals(this.metricVolumes, metricRelationships.metricVolumes)
107+
&& Objects.equals(this.additionalProperties, metricRelationships.additionalProperties);
108+
}
109+
110+
@Override
111+
public int hashCode() {
112+
return Objects.hash(metricVolumes, additionalProperties);
113+
}
114+
115+
@Override
116+
public String toString() {
117+
StringBuilder sb = new StringBuilder();
118+
sb.append("class MetricRelationships {\n");
119+
sb.append(" metricVolumes: ").append(toIndentedString(metricVolumes)).append("\n");
120+
sb.append(" additionalProperties: ")
121+
.append(toIndentedString(additionalProperties))
122+
.append("\n");
123+
sb.append('}');
124+
return sb.toString();
125+
}
126+
127+
/**
128+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
129+
*/
130+
private String toIndentedString(Object o) {
131+
if (o == null) {
132+
return "null";
133+
}
134+
return o.toString().replace("\n", "\n ");
135+
}
136+
}

0 commit comments

Comments
 (0)