Skip to content

Commit 92603ef

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 8c9b068 of spec repo (#3831)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent f14a17d commit 92603ef

2 files changed

Lines changed: 83 additions & 9 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116514,12 +116514,22 @@ paths:
116514116514
/api/v2/metrics/{metric_name}/volumes:
116515116515
get:
116516116516
description: |-
116517-
View distinct metrics volumes for the given metric name.
116517+
View hourly average metric volumes for the given metric name over the look back period.
116518116518

116519116519
Custom metrics generated in-app from other products will return `null` for ingested volumes.
116520116520
operationId: ListVolumesByMetricName
116521116521
parameters:
116522116522
- $ref: "#/components/parameters/MetricName"
116523+
- description: |-
116524+
The number of seconds of look back (from now).
116525+
Default value is 3,600 (1 hour), maximum value is 2,592,000 (1 month).
116526+
example: 7200
116527+
in: query
116528+
name: window[seconds]
116529+
required: false
116530+
schema:
116531+
format: int64
116532+
type: integer
116523116533
responses:
116524116534
"200":
116525116535
content:

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

Lines changed: 72 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2319,6 +2319,23 @@ public ApiResponse<MetricAllTagsResponse> listTagsByMetricNameWithHttpInfo(
23192319
new GenericType<MetricAllTagsResponse>() {});
23202320
}
23212321

2322+
/** Manage optional parameters to listVolumesByMetricName. */
2323+
public static class ListVolumesByMetricNameOptionalParameters {
2324+
private Long windowSeconds;
2325+
2326+
/**
2327+
* Set windowSeconds.
2328+
*
2329+
* @param windowSeconds The number of seconds of look back (from now). Default value is 3,600 (1
2330+
* hour), maximum value is 2,592,000 (1 month). (optional)
2331+
* @return ListVolumesByMetricNameOptionalParameters
2332+
*/
2333+
public ListVolumesByMetricNameOptionalParameters windowSeconds(Long windowSeconds) {
2334+
this.windowSeconds = windowSeconds;
2335+
return this;
2336+
}
2337+
}
2338+
23222339
/**
23232340
* List distinct metric volumes by metric name.
23242341
*
@@ -2329,7 +2346,9 @@ public ApiResponse<MetricAllTagsResponse> listTagsByMetricNameWithHttpInfo(
23292346
* @throws ApiException if fails to make API call
23302347
*/
23312348
public MetricVolumesResponse listVolumesByMetricName(String metricName) throws ApiException {
2332-
return listVolumesByMetricNameWithHttpInfo(metricName).getData();
2349+
return listVolumesByMetricNameWithHttpInfo(
2350+
metricName, new ListVolumesByMetricNameOptionalParameters())
2351+
.getData();
23332352
}
23342353

23352354
/**
@@ -2341,20 +2360,55 @@ public MetricVolumesResponse listVolumesByMetricName(String metricName) throws A
23412360
* @return CompletableFuture&lt;MetricVolumesResponse&gt;
23422361
*/
23432362
public CompletableFuture<MetricVolumesResponse> listVolumesByMetricNameAsync(String metricName) {
2344-
return listVolumesByMetricNameWithHttpInfoAsync(metricName)
2363+
return listVolumesByMetricNameWithHttpInfoAsync(
2364+
metricName, new ListVolumesByMetricNameOptionalParameters())
2365+
.thenApply(
2366+
response -> {
2367+
return response.getData();
2368+
});
2369+
}
2370+
2371+
/**
2372+
* List distinct metric volumes by metric name.
2373+
*
2374+
* <p>See {@link #listVolumesByMetricNameWithHttpInfo}.
2375+
*
2376+
* @param metricName The name of the metric. (required)
2377+
* @param parameters Optional parameters for the request.
2378+
* @return MetricVolumesResponse
2379+
* @throws ApiException if fails to make API call
2380+
*/
2381+
public MetricVolumesResponse listVolumesByMetricName(
2382+
String metricName, ListVolumesByMetricNameOptionalParameters parameters) throws ApiException {
2383+
return listVolumesByMetricNameWithHttpInfo(metricName, parameters).getData();
2384+
}
2385+
2386+
/**
2387+
* List distinct metric volumes by metric name.
2388+
*
2389+
* <p>See {@link #listVolumesByMetricNameWithHttpInfoAsync}.
2390+
*
2391+
* @param metricName The name of the metric. (required)
2392+
* @param parameters Optional parameters for the request.
2393+
* @return CompletableFuture&lt;MetricVolumesResponse&gt;
2394+
*/
2395+
public CompletableFuture<MetricVolumesResponse> listVolumesByMetricNameAsync(
2396+
String metricName, ListVolumesByMetricNameOptionalParameters parameters) {
2397+
return listVolumesByMetricNameWithHttpInfoAsync(metricName, parameters)
23452398
.thenApply(
23462399
response -> {
23472400
return response.getData();
23482401
});
23492402
}
23502403

23512404
/**
2352-
* View distinct metrics volumes for the given metric name.
2405+
* View hourly average metric volumes for the given metric name over the look back period.
23532406
*
23542407
* <p>Custom metrics generated in-app from other products will return <code>null</code> for
23552408
* ingested volumes.
23562409
*
23572410
* @param metricName The name of the metric. (required)
2411+
* @param parameters Optional parameters for the request.
23582412
* @return ApiResponse&lt;MetricVolumesResponse&gt;
23592413
* @throws ApiException if fails to make API call
23602414
* @http.response.details
@@ -2368,28 +2422,32 @@ public CompletableFuture<MetricVolumesResponse> listVolumesByMetricNameAsync(Str
23682422
* <tr><td> 429 </td><td> Too Many Requests </td><td> - </td></tr>
23692423
* </table>
23702424
*/
2371-
public ApiResponse<MetricVolumesResponse> listVolumesByMetricNameWithHttpInfo(String metricName)
2372-
throws ApiException {
2425+
public ApiResponse<MetricVolumesResponse> listVolumesByMetricNameWithHttpInfo(
2426+
String metricName, ListVolumesByMetricNameOptionalParameters parameters) throws ApiException {
23732427
Object localVarPostBody = null;
23742428

23752429
// verify the required parameter 'metricName' is set
23762430
if (metricName == null) {
23772431
throw new ApiException(
23782432
400, "Missing the required parameter 'metricName' when calling listVolumesByMetricName");
23792433
}
2434+
Long windowSeconds = parameters.windowSeconds;
23802435
// create path and map variables
23812436
String localVarPath =
23822437
"/api/v2/metrics/{metric_name}/volumes"
23832438
.replaceAll(
23842439
"\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString()));
23852440

2441+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
23862442
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
23872443

2444+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "window[seconds]", windowSeconds));
2445+
23882446
Invocation.Builder builder =
23892447
apiClient.createBuilder(
23902448
"v2.MetricsApi.listVolumesByMetricName",
23912449
localVarPath,
2392-
new ArrayList<Pair>(),
2450+
localVarQueryParams,
23932451
localVarHeaderParams,
23942452
new HashMap<String, String>(),
23952453
new String[] {"application/json"},
@@ -2411,10 +2469,12 @@ public ApiResponse<MetricVolumesResponse> listVolumesByMetricNameWithHttpInfo(St
24112469
* <p>See {@link #listVolumesByMetricNameWithHttpInfo}.
24122470
*
24132471
* @param metricName The name of the metric. (required)
2472+
* @param parameters Optional parameters for the request.
24142473
* @return CompletableFuture&lt;ApiResponse&lt;MetricVolumesResponse&gt;&gt;
24152474
*/
24162475
public CompletableFuture<ApiResponse<MetricVolumesResponse>>
2417-
listVolumesByMetricNameWithHttpInfoAsync(String metricName) {
2476+
listVolumesByMetricNameWithHttpInfoAsync(
2477+
String metricName, ListVolumesByMetricNameOptionalParameters parameters) {
24182478
Object localVarPostBody = null;
24192479

24202480
// verify the required parameter 'metricName' is set
@@ -2426,21 +2486,25 @@ public ApiResponse<MetricVolumesResponse> listVolumesByMetricNameWithHttpInfo(St
24262486
"Missing the required parameter 'metricName' when calling listVolumesByMetricName"));
24272487
return result;
24282488
}
2489+
Long windowSeconds = parameters.windowSeconds;
24292490
// create path and map variables
24302491
String localVarPath =
24312492
"/api/v2/metrics/{metric_name}/volumes"
24322493
.replaceAll(
24332494
"\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString()));
24342495

2496+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
24352497
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
24362498

2499+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "window[seconds]", windowSeconds));
2500+
24372501
Invocation.Builder builder;
24382502
try {
24392503
builder =
24402504
apiClient.createBuilder(
24412505
"v2.MetricsApi.listVolumesByMetricName",
24422506
localVarPath,
2443-
new ArrayList<Pair>(),
2507+
localVarQueryParams,
24442508
localVarHeaderParams,
24452509
new HashMap<String, String>(),
24462510
new String[] {"application/json"},

0 commit comments

Comments
 (0)