Skip to content

Commit e126c02

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit e6ffc68 of spec repo
1 parent 6a4db75 commit e126c02

File tree

9 files changed

+778
-5
lines changed

9 files changed

+778
-5
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38508,6 +38508,8 @@ components:
3850838508
properties:
3850938509
id:
3851038510
$ref: '#/components/schemas/MetricName'
38511+
relationships:
38512+
$ref: '#/components/schemas/MetricRelationships'
3851138513
type:
3851238514
$ref: '#/components/schemas/MetricType'
3851338515
type: object
@@ -39283,6 +39285,12 @@ components:
3928339285
format: double
3928439286
type: number
3928539287
type: object
39288+
MetricRelationships:
39289+
description: Relationships to related metric objects.
39290+
properties:
39291+
metric_volumes:
39292+
$ref: '#/components/schemas/MetricVolumesRelationship'
39293+
type: object
3928639294
MetricResource:
3928739295
description: Metric resource.
3928839296
example:
@@ -39726,13 +39734,55 @@ components:
3972639734
oneOf:
3972739735
- $ref: '#/components/schemas/MetricDistinctVolume'
3972839736
- $ref: '#/components/schemas/MetricIngestedIndexedVolume'
39737+
MetricVolumesInclude:
39738+
description: Relationship data to include in the response.
39739+
enum:
39740+
- metric_volumes
39741+
type: string
39742+
x-enum-varnames:
39743+
- METRIC_VOLUMES
39744+
MetricVolumesRelationship:
39745+
description: Relationship to a metric's ingested and indexed volumes.
39746+
properties:
39747+
data:
39748+
$ref: '#/components/schemas/MetricVolumesRelationshipData'
39749+
type: object
39750+
MetricVolumesRelationshipData:
39751+
description: Relationship data for a metric's ingested and indexed volumes.
39752+
properties:
39753+
id:
39754+
$ref: '#/components/schemas/MetricName'
39755+
type:
39756+
$ref: '#/components/schemas/MetricIngestedIndexedVolumeType'
39757+
required:
39758+
- type
39759+
- id
39760+
type: object
3972939761
MetricVolumesResponse:
3973039762
description: Response object which includes a single metric's volume.
3973139763
properties:
3973239764
data:
3973339765
$ref: '#/components/schemas/MetricVolumes'
3973439766
readOnly: true
3973539767
type: object
39768+
MetricVolumesSort:
39769+
description: 'Sort metrics by ingested or indexed volume. Use `-` for descending
39770+
order.
39771+
39772+
Supported values: `metric_volumes.indexed_volume`, `-metric_volumes.indexed_volume`,
39773+
39774+
`metric_volumes.ingested_volume`, `-metric_volumes.ingested_volume`.'
39775+
enum:
39776+
- metric_volumes.indexed_volume
39777+
- -metric_volumes.indexed_volume
39778+
- metric_volumes.ingested_volume
39779+
- -metric_volumes.ingested_volume
39780+
type: string
39781+
x-enum-varnames:
39782+
- METRIC_VOLUMES_INDEXED_VOLUME
39783+
- NOT_METRIC_VOLUMES_INDEXED_VOLUME
39784+
- METRIC_VOLUMES_INGESTED_VOLUME
39785+
- NOT_METRIC_VOLUMES_INGESTED_VOLUME
3973639786
MetricsAggregator:
3973739787
default: avg
3973839788
description: The type of aggregation that can be performed on metrics-based
@@ -39772,6 +39822,12 @@ components:
3977239822
items:
3977339823
$ref: '#/components/schemas/MetricsAndMetricTagConfigurations'
3977439824
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
3977539831
links:
3977639832
$ref: '#/components/schemas/MetricsListResponseLinks'
3977739833
meta:
@@ -91435,7 +91491,10 @@ paths:
9143591491
`next_cursor` value from the response as the new `page[cursor]` value.
9143691492

9143791493
Once the `meta.pagination.next_cursor` value is null, all pages have been
91438-
retrieved.'
91494+
retrieved.
91495+
91496+
Use `include=metric_volumes` to fetch indexed and ingested volume data for
91497+
each metric, and `sort` to order results by volume.'
9143991498
operationId: ListTagConfigurations
9144091499
parameters:
9144191500
- description: Filter custom metrics that have configured tags.
@@ -91517,6 +91576,28 @@ paths:
9151791576
required: false
9151891577
schema:
9151991578
type: boolean
91579+
- description: Relationship data to include in the response. Use `metric_volumes`
91580+
to include indexed and ingested volumes.
91581+
example: metric_volumes
91582+
in: query
91583+
name: include
91584+
required: false
91585+
schema:
91586+
$ref: '#/components/schemas/MetricVolumesInclude'
91587+
- description: 'Sort metrics by ingested or indexed volume. Use `-` for descending
91588+
order.
91589+
91590+
Supported values: `metric_volumes.indexed_volume`, `-metric_volumes.indexed_volume`,
91591+
91592+
`metric_volumes.ingested_volume`, `-metric_volumes.ingested_volume`.
91593+
91594+
Only supported when `include=metric_volumes` is provided.'
91595+
example: -metric_volumes.indexed_volume
91596+
in: query
91597+
name: sort
91598+
required: false
91599+
schema:
91600+
$ref: '#/components/schemas/MetricVolumesSort'
9152091601
- description: 'The number of seconds of look back (from now) to apply to a
9152191602
filter[tag] or filter[queried] query.
9152291603

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

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
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;
25+
import com.datadog.api.client.v2.model.MetricVolumesSort;
2426
import com.datadog.api.client.v2.model.MetricsAndMetricTagConfigurations;
2527
import com.datadog.api.client.v2.model.MetricsAndMetricTagConfigurationsResponse;
2628
import com.datadog.api.client.v2.model.ScalarFormulaQueryRequest;
@@ -1599,6 +1601,8 @@ public static class ListTagConfigurationsOptionalParameters {
15991601
private Long filterQueriedWindowSeconds;
16001602
private String filterTags;
16011603
private Boolean filterRelatedAssets;
1604+
private MetricVolumesInclude include;
1605+
private MetricVolumesSort sort;
16021606
private Long windowSeconds;
16031607
private Integer pageSize;
16041608
private String pageCursor;
@@ -1709,6 +1713,33 @@ public ListTagConfigurationsOptionalParameters filterRelatedAssets(
17091713
return this;
17101714
}
17111715

1716+
/**
1717+
* Set include.
1718+
*
1719+
* @param include Relationship data to include in the response. Use <code>metric_volumes</code>
1720+
* to include indexed and ingested volumes. (optional)
1721+
* @return ListTagConfigurationsOptionalParameters
1722+
*/
1723+
public ListTagConfigurationsOptionalParameters include(MetricVolumesInclude include) {
1724+
this.include = include;
1725+
return this;
1726+
}
1727+
1728+
/**
1729+
* Set sort.
1730+
*
1731+
* @param sort Sort metrics by ingested or indexed volume. Use <code>-</code> for descending
1732+
* order. Supported values: <code>metric_volumes.indexed_volume</code>, <code>
1733+
* -metric_volumes.indexed_volume</code>, <code>metric_volumes.ingested_volume</code>,
1734+
* <code>-metric_volumes.ingested_volume</code>. Only supported when <code>
1735+
* include=metric_volumes</code> is provided. (optional)
1736+
* @return ListTagConfigurationsOptionalParameters
1737+
*/
1738+
public ListTagConfigurationsOptionalParameters sort(MetricVolumesSort sort) {
1739+
this.sort = sort;
1740+
return this;
1741+
}
1742+
17121743
/**
17131744
* Set windowSeconds.
17141745
*
@@ -1867,7 +1898,8 @@ public PaginationIterable<MetricsAndMetricTagConfigurations> listTagConfiguratio
18671898
* page[size]</code> or an empty cursor like <code>page[cursor]=</code>. To fetch the next page,
18681899
* pass in the <code>next_cursor</code> value from the response as the new <code>page[cursor]
18691900
* </code> value. Once the <code>meta.pagination.next_cursor</code> value is null, all pages have
1870-
* been retrieved.
1901+
* been retrieved. Use <code>include=metric_volumes</code> to fetch indexed and ingested volume
1902+
* data for each metric, and <code>sort</code> to order results by volume.
18711903
*
18721904
* @param parameters Optional parameters for the request.
18731905
* @return ApiResponse&lt;MetricsAndMetricTagConfigurationsResponse&gt;
@@ -1893,6 +1925,8 @@ public ApiResponse<MetricsAndMetricTagConfigurationsResponse> listTagConfigurati
18931925
Long filterQueriedWindowSeconds = parameters.filterQueriedWindowSeconds;
18941926
String filterTags = parameters.filterTags;
18951927
Boolean filterRelatedAssets = parameters.filterRelatedAssets;
1928+
MetricVolumesInclude include = parameters.include;
1929+
MetricVolumesSort sort = parameters.sort;
18961930
Long windowSeconds = parameters.windowSeconds;
18971931
Integer pageSize = parameters.pageSize;
18981932
String pageCursor = parameters.pageCursor;
@@ -1917,6 +1951,8 @@ public ApiResponse<MetricsAndMetricTagConfigurationsResponse> listTagConfigurati
19171951
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags));
19181952
localVarQueryParams.addAll(
19191953
apiClient.parameterToPairs("", "filter[related_assets]", filterRelatedAssets));
1954+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
1955+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort));
19201956
localVarQueryParams.addAll(apiClient.parameterToPairs("", "window[seconds]", windowSeconds));
19211957
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize));
19221958
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor));
@@ -1960,6 +1996,8 @@ public ApiResponse<MetricsAndMetricTagConfigurationsResponse> listTagConfigurati
19601996
Long filterQueriedWindowSeconds = parameters.filterQueriedWindowSeconds;
19611997
String filterTags = parameters.filterTags;
19621998
Boolean filterRelatedAssets = parameters.filterRelatedAssets;
1999+
MetricVolumesInclude include = parameters.include;
2000+
MetricVolumesSort sort = parameters.sort;
19632001
Long windowSeconds = parameters.windowSeconds;
19642002
Integer pageSize = parameters.pageSize;
19652003
String pageCursor = parameters.pageCursor;
@@ -1984,6 +2022,8 @@ public ApiResponse<MetricsAndMetricTagConfigurationsResponse> listTagConfigurati
19842022
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags));
19852023
localVarQueryParams.addAll(
19862024
apiClient.parameterToPairs("", "filter[related_assets]", filterRelatedAssets));
2025+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
2026+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort));
19872027
localVarQueryParams.addAll(apiClient.parameterToPairs("", "window[seconds]", windowSeconds));
19882028
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize));
19892029
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))

0 commit comments

Comments
 (0)