Skip to content

Commit a16e038

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit e4989ea of spec repo
1 parent 17f8f4d commit a16e038

File tree

3 files changed

+267
-13
lines changed

3 files changed

+267
-13
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32317,6 +32317,16 @@ components:
3231732317
MetricAllTagsAttributes:
3231832318
description: Object containing the definition of a metric's tags.
3231932319
properties:
32320+
ingested_tags:
32321+
description: List of ingested tag value pairs.
32322+
example:
32323+
- env:prod
32324+
- service:web
32325+
- version:1.0
32326+
items:
32327+
description: Tag key-value pairs.
32328+
type: string
32329+
type: array
3232032330
tags:
3232132331
description: List of indexed tag value pairs.
3232232332
example:
@@ -76164,11 +76174,67 @@ paths:
7616476174
- metrics_read
7616576175
/api/v2/metrics/{metric_name}/all-tags:
7616676176
get:
76167-
description: View indexed tag key-value pairs for a given metric name over the
76168-
previous hour.
76177+
description: 'View indexed tag key-value pairs for a given metric name.
76178+
76179+
Results are filtered by the `window[seconds]` parameter, which defaults to
76180+
14400 (4 hours).'
7616976181
operationId: ListTagsByMetricName
7617076182
parameters:
7617176183
- $ref: '#/components/parameters/MetricName'
76184+
- description: 'The number of seconds of look back (from now) to query for tag
76185+
data.
76186+
76187+
Default value is 14400 (4 hours), minimum value is 14400 (4 hours).'
76188+
example: 14400
76189+
in: query
76190+
name: window[seconds]
76191+
required: false
76192+
schema:
76193+
format: int64
76194+
type: integer
76195+
- description: Filter to specific tags.
76196+
example: env,service
76197+
in: query
76198+
name: filter[tags]
76199+
required: false
76200+
schema:
76201+
type: string
76202+
- description: Match pattern for filtering tags.
76203+
example: env:prod*
76204+
in: query
76205+
name: filter[match]
76206+
required: false
76207+
schema:
76208+
type: string
76209+
- description: 'Whether to include tag values in the response.
76210+
76211+
Defaults to true.'
76212+
example: true
76213+
in: query
76214+
name: filter[include_tag_values]
76215+
required: false
76216+
schema:
76217+
type: boolean
76218+
- description: 'Whether to allow partial results.
76219+
76220+
Defaults to false.'
76221+
example: false
76222+
in: query
76223+
name: filter[allow_partial]
76224+
required: false
76225+
schema:
76226+
type: boolean
76227+
- description: Maximum number of results to return.
76228+
example: 1000
76229+
in: query
76230+
name: page[limit]
76231+
required: false
76232+
schema:
76233+
default: 1000000
76234+
format: int32
76235+
maximum: 1000000
76236+
minimum: 1
76237+
type: integer
7617276238
responses:
7617376239
'200':
7617476240
content:

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

Lines changed: 159 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1988,6 +1988,85 @@ public ApiResponse<MetricsAndMetricTagConfigurationsResponse> listTagConfigurati
19881988
new GenericType<MetricsAndMetricTagConfigurationsResponse>() {});
19891989
}
19901990

1991+
/** Manage optional parameters to listTagsByMetricName. */
1992+
public static class ListTagsByMetricNameOptionalParameters {
1993+
private Long windowSeconds;
1994+
private String filterTags;
1995+
private String filterMatch;
1996+
private Boolean filterIncludeTagValues;
1997+
private Boolean filterAllowPartial;
1998+
private Integer pageLimit;
1999+
2000+
/**
2001+
* Set windowSeconds.
2002+
*
2003+
* @param windowSeconds The number of seconds of look back (from now) to query for tag data.
2004+
* Default value is 14400 (4 hours), minimum value is 14400 (4 hours). (optional)
2005+
* @return ListTagsByMetricNameOptionalParameters
2006+
*/
2007+
public ListTagsByMetricNameOptionalParameters windowSeconds(Long windowSeconds) {
2008+
this.windowSeconds = windowSeconds;
2009+
return this;
2010+
}
2011+
2012+
/**
2013+
* Set filterTags.
2014+
*
2015+
* @param filterTags Filter to specific tags. (optional)
2016+
* @return ListTagsByMetricNameOptionalParameters
2017+
*/
2018+
public ListTagsByMetricNameOptionalParameters filterTags(String filterTags) {
2019+
this.filterTags = filterTags;
2020+
return this;
2021+
}
2022+
2023+
/**
2024+
* Set filterMatch.
2025+
*
2026+
* @param filterMatch Match pattern for filtering tags. (optional)
2027+
* @return ListTagsByMetricNameOptionalParameters
2028+
*/
2029+
public ListTagsByMetricNameOptionalParameters filterMatch(String filterMatch) {
2030+
this.filterMatch = filterMatch;
2031+
return this;
2032+
}
2033+
2034+
/**
2035+
* Set filterIncludeTagValues.
2036+
*
2037+
* @param filterIncludeTagValues Whether to include tag values in the response. Defaults to
2038+
* true. (optional)
2039+
* @return ListTagsByMetricNameOptionalParameters
2040+
*/
2041+
public ListTagsByMetricNameOptionalParameters filterIncludeTagValues(
2042+
Boolean filterIncludeTagValues) {
2043+
this.filterIncludeTagValues = filterIncludeTagValues;
2044+
return this;
2045+
}
2046+
2047+
/**
2048+
* Set filterAllowPartial.
2049+
*
2050+
* @param filterAllowPartial Whether to allow partial results. Defaults to false. (optional)
2051+
* @return ListTagsByMetricNameOptionalParameters
2052+
*/
2053+
public ListTagsByMetricNameOptionalParameters filterAllowPartial(Boolean filterAllowPartial) {
2054+
this.filterAllowPartial = filterAllowPartial;
2055+
return this;
2056+
}
2057+
2058+
/**
2059+
* Set pageLimit.
2060+
*
2061+
* @param pageLimit Maximum number of results to return. (optional, default to 1000000)
2062+
* @return ListTagsByMetricNameOptionalParameters
2063+
*/
2064+
public ListTagsByMetricNameOptionalParameters pageLimit(Integer pageLimit) {
2065+
this.pageLimit = pageLimit;
2066+
return this;
2067+
}
2068+
}
2069+
19912070
/**
19922071
* List tags by metric name.
19932072
*
@@ -1998,7 +2077,9 @@ public ApiResponse<MetricsAndMetricTagConfigurationsResponse> listTagConfigurati
19982077
* @throws ApiException if fails to make API call
19992078
*/
20002079
public MetricAllTagsResponse listTagsByMetricName(String metricName) throws ApiException {
2001-
return listTagsByMetricNameWithHttpInfo(metricName).getData();
2080+
return listTagsByMetricNameWithHttpInfo(
2081+
metricName, new ListTagsByMetricNameOptionalParameters())
2082+
.getData();
20022083
}
20032084

20042085
/**
@@ -2010,17 +2091,53 @@ public MetricAllTagsResponse listTagsByMetricName(String metricName) throws ApiE
20102091
* @return CompletableFuture&lt;MetricAllTagsResponse&gt;
20112092
*/
20122093
public CompletableFuture<MetricAllTagsResponse> listTagsByMetricNameAsync(String metricName) {
2013-
return listTagsByMetricNameWithHttpInfoAsync(metricName)
2094+
return listTagsByMetricNameWithHttpInfoAsync(
2095+
metricName, new ListTagsByMetricNameOptionalParameters())
20142096
.thenApply(
20152097
response -> {
20162098
return response.getData();
20172099
});
20182100
}
20192101

20202102
/**
2021-
* View indexed tag key-value pairs for a given metric name over the previous hour.
2103+
* List tags by metric name.
2104+
*
2105+
* <p>See {@link #listTagsByMetricNameWithHttpInfo}.
20222106
*
20232107
* @param metricName The name of the metric. (required)
2108+
* @param parameters Optional parameters for the request.
2109+
* @return MetricAllTagsResponse
2110+
* @throws ApiException if fails to make API call
2111+
*/
2112+
public MetricAllTagsResponse listTagsByMetricName(
2113+
String metricName, ListTagsByMetricNameOptionalParameters parameters) throws ApiException {
2114+
return listTagsByMetricNameWithHttpInfo(metricName, parameters).getData();
2115+
}
2116+
2117+
/**
2118+
* List tags by metric name.
2119+
*
2120+
* <p>See {@link #listTagsByMetricNameWithHttpInfoAsync}.
2121+
*
2122+
* @param metricName The name of the metric. (required)
2123+
* @param parameters Optional parameters for the request.
2124+
* @return CompletableFuture&lt;MetricAllTagsResponse&gt;
2125+
*/
2126+
public CompletableFuture<MetricAllTagsResponse> listTagsByMetricNameAsync(
2127+
String metricName, ListTagsByMetricNameOptionalParameters parameters) {
2128+
return listTagsByMetricNameWithHttpInfoAsync(metricName, parameters)
2129+
.thenApply(
2130+
response -> {
2131+
return response.getData();
2132+
});
2133+
}
2134+
2135+
/**
2136+
* View indexed tag key-value pairs for a given metric name. Results are filtered by the <code>
2137+
* window[seconds]</code> parameter, which defaults to 14400 (4 hours).
2138+
*
2139+
* @param metricName The name of the metric. (required)
2140+
* @param parameters Optional parameters for the request.
20242141
* @return ApiResponse&lt;MetricAllTagsResponse&gt;
20252142
* @throws ApiException if fails to make API call
20262143
* @http.response.details
@@ -2034,28 +2151,44 @@ public CompletableFuture<MetricAllTagsResponse> listTagsByMetricNameAsync(String
20342151
* <tr><td> 429 </td><td> Too Many Requests </td><td> - </td></tr>
20352152
* </table>
20362153
*/
2037-
public ApiResponse<MetricAllTagsResponse> listTagsByMetricNameWithHttpInfo(String metricName)
2038-
throws ApiException {
2154+
public ApiResponse<MetricAllTagsResponse> listTagsByMetricNameWithHttpInfo(
2155+
String metricName, ListTagsByMetricNameOptionalParameters parameters) throws ApiException {
20392156
Object localVarPostBody = null;
20402157

20412158
// verify the required parameter 'metricName' is set
20422159
if (metricName == null) {
20432160
throw new ApiException(
20442161
400, "Missing the required parameter 'metricName' when calling listTagsByMetricName");
20452162
}
2163+
Long windowSeconds = parameters.windowSeconds;
2164+
String filterTags = parameters.filterTags;
2165+
String filterMatch = parameters.filterMatch;
2166+
Boolean filterIncludeTagValues = parameters.filterIncludeTagValues;
2167+
Boolean filterAllowPartial = parameters.filterAllowPartial;
2168+
Integer pageLimit = parameters.pageLimit;
20462169
// create path and map variables
20472170
String localVarPath =
20482171
"/api/v2/metrics/{metric_name}/all-tags"
20492172
.replaceAll(
20502173
"\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString()));
20512174

2175+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
20522176
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
20532177

2178+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "window[seconds]", windowSeconds));
2179+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags));
2180+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[match]", filterMatch));
2181+
localVarQueryParams.addAll(
2182+
apiClient.parameterToPairs("", "filter[include_tag_values]", filterIncludeTagValues));
2183+
localVarQueryParams.addAll(
2184+
apiClient.parameterToPairs("", "filter[allow_partial]", filterAllowPartial));
2185+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit));
2186+
20542187
Invocation.Builder builder =
20552188
apiClient.createBuilder(
20562189
"v2.MetricsApi.listTagsByMetricName",
20572190
localVarPath,
2058-
new ArrayList<Pair>(),
2191+
localVarQueryParams,
20592192
localVarHeaderParams,
20602193
new HashMap<String, String>(),
20612194
new String[] {"application/json"},
@@ -2077,10 +2210,12 @@ public ApiResponse<MetricAllTagsResponse> listTagsByMetricNameWithHttpInfo(Strin
20772210
* <p>See {@link #listTagsByMetricNameWithHttpInfo}.
20782211
*
20792212
* @param metricName The name of the metric. (required)
2213+
* @param parameters Optional parameters for the request.
20802214
* @return CompletableFuture&lt;ApiResponse&lt;MetricAllTagsResponse&gt;&gt;
20812215
*/
20822216
public CompletableFuture<ApiResponse<MetricAllTagsResponse>>
2083-
listTagsByMetricNameWithHttpInfoAsync(String metricName) {
2217+
listTagsByMetricNameWithHttpInfoAsync(
2218+
String metricName, ListTagsByMetricNameOptionalParameters parameters) {
20842219
Object localVarPostBody = null;
20852220

20862221
// verify the required parameter 'metricName' is set
@@ -2092,21 +2227,37 @@ public ApiResponse<MetricAllTagsResponse> listTagsByMetricNameWithHttpInfo(Strin
20922227
"Missing the required parameter 'metricName' when calling listTagsByMetricName"));
20932228
return result;
20942229
}
2230+
Long windowSeconds = parameters.windowSeconds;
2231+
String filterTags = parameters.filterTags;
2232+
String filterMatch = parameters.filterMatch;
2233+
Boolean filterIncludeTagValues = parameters.filterIncludeTagValues;
2234+
Boolean filterAllowPartial = parameters.filterAllowPartial;
2235+
Integer pageLimit = parameters.pageLimit;
20952236
// create path and map variables
20962237
String localVarPath =
20972238
"/api/v2/metrics/{metric_name}/all-tags"
20982239
.replaceAll(
20992240
"\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString()));
21002241

2242+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
21012243
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
21022244

2245+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "window[seconds]", windowSeconds));
2246+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags));
2247+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[match]", filterMatch));
2248+
localVarQueryParams.addAll(
2249+
apiClient.parameterToPairs("", "filter[include_tag_values]", filterIncludeTagValues));
2250+
localVarQueryParams.addAll(
2251+
apiClient.parameterToPairs("", "filter[allow_partial]", filterAllowPartial));
2252+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit));
2253+
21032254
Invocation.Builder builder;
21042255
try {
21052256
builder =
21062257
apiClient.createBuilder(
21072258
"v2.MetricsApi.listTagsByMetricName",
21082259
localVarPath,
2109-
new ArrayList<Pair>(),
2260+
localVarQueryParams,
21102261
localVarHeaderParams,
21112262
new HashMap<String, String>(),
21122263
new String[] {"application/json"},

0 commit comments

Comments
 (0)