From bc4000a758ab9b53c0eadb720b1c8ce4dee4e644 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 12 Dec 2024 13:31:04 +0000 Subject: [PATCH] Regenerate client from commit f0c3c0f4 of spec repo --- .apigentools-info | 8 +- .generator/schemas/v2/openapi.yaml | 96 +++++- .../ListTagConfigurations_3969783727.java | 28 ++ .../datadog/api/client/v2/api/MetricsApi.java | 98 ++++++- .../api/client/v2/model/MetricMetaPage.java | 243 +++++++++++++++ .../client/v2/model/MetricMetaPageType.java | 54 ++++ .../client/v2/model/MetricPaginationMeta.java | 136 +++++++++ ...icsAndMetricTagConfigurationsResponse.java | 62 +++- .../v2/model/MetricsListResponseLinks.java | 276 ++++++++++++++++++ ...ns_Success_response_with_pagination.freeze | 1 + ...urns_Success_response_with_pagination.json | 67 +++++ .../datadog/api/client/v2/api/metrics.feature | 9 + 12 files changed, 1070 insertions(+), 8 deletions(-) create mode 100644 examples/v2/metrics/ListTagConfigurations_3969783727.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/MetricMetaPage.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/MetricMetaPageType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/MetricPaginationMeta.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/MetricsListResponseLinks.java create mode 100644 src/test/resources/cassettes/features/v2/Get_a_list_of_metrics_returns_Success_response_with_pagination.freeze create mode 100644 src/test/resources/cassettes/features/v2/Get_a_list_of_metrics_returns_Success_response_with_pagination.json diff --git a/.apigentools-info b/.apigentools-info index dd6d7ac2413..84094d6be00 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-11 20:35:38.546745", - "spec_repo_commit": "7b62d196" + "regenerated": "2024-12-12 13:29:22.125167", + "spec_repo_commit": "f0c3c0f4" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-11 20:35:38.566354", - "spec_repo_commit": "7b62d196" + "regenerated": "2024-12-12 13:29:22.145471", + "spec_repo_commit": "f0c3c0f4" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index c2b7a7ae016..643901c6d7f 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -16012,6 +16012,36 @@ components: - COUNT - RATE - GAUGE + MetricMetaPage: + description: Paging attributes. Only present if pagination query parameters + were provided. + properties: + cursor: + description: The cursor used to get the current results, if any. + nullable: true + type: string + limit: + description: Number of results returned + format: int32 + maximum: 20000 + minimum: 0 + type: integer + next_cursor: + description: The cursor used to get the next results, if any. + nullable: true + type: string + type: + $ref: '#/components/schemas/MetricMetaPageType' + type: object + MetricMetaPageType: + default: cursor_limit + description: Type of metric pagination. + enum: + - cursor_limit + example: cursor_limit + type: string + x-enum-varnames: + - CURSOR_LIMIT MetricMetadata: description: Metadata for the metric. properties: @@ -16094,6 +16124,12 @@ components: maximum: 1000 type: integer type: object + MetricPaginationMeta: + description: Response metadata object. + properties: + pagination: + $ref: '#/components/schemas/MetricMetaPage' + type: object MetricPayload: description: The metrics' payload. properties: @@ -16570,6 +16606,10 @@ components: items: $ref: '#/components/schemas/MetricsAndMetricTagConfigurations' type: array + links: + $ref: '#/components/schemas/MetricsListResponseLinks' + meta: + $ref: '#/components/schemas/MetricPaginationMeta' readOnly: true type: object MetricsDataSource: @@ -16583,6 +16623,29 @@ components: x-enum-varnames: - METRICS - CLOUD_COST + MetricsListResponseLinks: + description: Pagination links. Only present if pagination query parameters were + provided. + properties: + first: + description: Link to the first page. + type: string + last: + description: Link to the last page. + nullable: true + type: string + next: + description: Link to the next page. + nullable: true + type: string + prev: + description: Link to previous page. + nullable: true + type: string + self: + description: Link to current page. + type: string + type: object MetricsScalarQuery: description: An individual scalar metrics query. properties: @@ -35773,7 +35836,12 @@ paths: get: description: "Returns all metrics that can be configured in the Metrics Summary page or with Metrics without Limits\u2122 (matching additional filters if - specified)." + specified).\nOptionally, paginate by using the `page[cursor]` and/or `page[size]` + query parameters.\nTo fetch the first page, pass in a query parameter with + either a valid `page[size]` or an empty cursor like `page[cursor]=`. To fetch + the next page, pass in the `next_cursor` value from the response as the new + `page[cursor]` value.\nOnce the `meta.pagination.next_cursor` value is null, + all pages have been retrieved." operationId: ListTagConfigurations parameters: - description: Filter custom metrics that have configured tags. @@ -35838,6 +35906,27 @@ paths: schema: format: int64 type: integer + - description: Maximum number of results returned. + in: query + name: page[size] + required: false + schema: + default: 10000 + format: int32 + maximum: 10000 + minimum: 1 + type: integer + - description: 'String to query the next page of results. + + This key is provided with each valid response from the API in `meta.pagination.next_cursor`. + + Once the `meta.pagination.next_cursor` key is null, all pages have been + retrieved.' + in: query + name: page[cursor] + required: false + schema: + type: string responses: '200': content: @@ -35871,6 +35960,11 @@ paths: summary: Get a list of metrics tags: - Metrics + x-pagination: + cursorParam: page[cursor] + cursorPath: meta.pagination.next_cursor + limitParam: page[size] + resultsPath: data x-permission: operator: OR permissions: diff --git a/examples/v2/metrics/ListTagConfigurations_3969783727.java b/examples/v2/metrics/ListTagConfigurations_3969783727.java new file mode 100644 index 00000000000..93f2efcf39a --- /dev/null +++ b/examples/v2/metrics/ListTagConfigurations_3969783727.java @@ -0,0 +1,28 @@ +// Get a list of metrics returns "Success" response with pagination + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.PaginationIterable; +import com.datadog.api.client.v2.api.MetricsApi; +import com.datadog.api.client.v2.api.MetricsApi.ListTagConfigurationsOptionalParameters; +import com.datadog.api.client.v2.model.MetricsAndMetricTagConfigurations; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + MetricsApi apiInstance = new MetricsApi(defaultClient); + + try { + PaginationIterable iterable = + apiInstance.listTagConfigurationsWithPagination( + new ListTagConfigurationsOptionalParameters().pageSize(2)); + + for (MetricsAndMetricTagConfigurations item : iterable) { + System.out.println(item); + } + } catch (RuntimeException e) { + System.err.println("Exception when calling MetricsApi#listTagConfigurationsWithPagination"); + System.err.println("Reason: " + e.getMessage()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/MetricsApi.java b/src/main/java/com/datadog/api/client/v2/api/MetricsApi.java index dfc69a6705e..d291bc6a202 100644 --- a/src/main/java/com/datadog/api/client/v2/api/MetricsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/MetricsApi.java @@ -3,6 +3,7 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; +import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.Pair; import com.datadog.api.client.v2.model.IntakePayloadAccepted; import com.datadog.api.client.v2.model.MetricAllTagsResponse; @@ -19,6 +20,7 @@ import com.datadog.api.client.v2.model.MetricTagConfigurationResponse; import com.datadog.api.client.v2.model.MetricTagConfigurationUpdateRequest; import com.datadog.api.client.v2.model.MetricVolumesResponse; +import com.datadog.api.client.v2.model.MetricsAndMetricTagConfigurations; import com.datadog.api.client.v2.model.MetricsAndMetricTagConfigurationsResponse; import com.datadog.api.client.v2.model.ScalarFormulaQueryRequest; import com.datadog.api.client.v2.model.ScalarFormulaQueryResponse; @@ -28,6 +30,7 @@ import jakarta.ws.rs.core.GenericType; import java.util.ArrayList; import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.concurrent.CompletableFuture; @@ -1450,6 +1453,8 @@ public static class ListTagConfigurationsOptionalParameters { private Boolean filterQueried; private String filterTags; private Long windowSeconds; + private Integer pageSize; + private String pageCursor; /** * Set filterConfigured. @@ -1537,6 +1542,30 @@ public ListTagConfigurationsOptionalParameters windowSeconds(Long windowSeconds) this.windowSeconds = windowSeconds; return this; } + + /** + * Set pageSize. + * + * @param pageSize Maximum number of results returned. (optional, default to 10000) + * @return ListTagConfigurationsOptionalParameters + */ + public ListTagConfigurationsOptionalParameters pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set pageCursor. + * + * @param pageCursor String to query the next page of results. This key is provided with each + * valid response from the API in meta.pagination.next_cursor. Once the + * meta.pagination.next_cursor key is null, all pages have been retrieved. (optional) + * @return ListTagConfigurationsOptionalParameters + */ + public ListTagConfigurationsOptionalParameters pageCursor(String pageCursor) { + this.pageCursor = pageCursor; + return this; + } } /** @@ -1598,9 +1627,68 @@ public CompletableFuture listTagConfi }); } + /** + * Get a list of metrics. + * + *

See {@link #listTagConfigurationsWithHttpInfo}. + * + * @return PaginationIterable<MetricsAndMetricTagConfigurations> + */ + public PaginationIterable + listTagConfigurationsWithPagination() { + ListTagConfigurationsOptionalParameters parameters = + new ListTagConfigurationsOptionalParameters(); + return listTagConfigurationsWithPagination(parameters); + } + + /** + * Get a list of metrics. + * + *

See {@link #listTagConfigurationsWithHttpInfo}. + * + * @return MetricsAndMetricTagConfigurationsResponse + */ + public PaginationIterable listTagConfigurationsWithPagination( + ListTagConfigurationsOptionalParameters parameters) { + String resultsPath = "getData"; + String valueGetterPath = "getMeta.getPagination.getNextCursor"; + String valueSetterPath = "pageCursor"; + Boolean valueSetterParamOptional = true; + Integer limit; + + if (parameters.pageSize == null) { + limit = 10000; + parameters.pageSize(limit); + } else { + limit = parameters.pageSize; + } + + LinkedHashMap args = new LinkedHashMap(); + args.put("optionalParams", parameters); + + PaginationIterable iterator = + new PaginationIterable( + this, + "listTagConfigurations", + resultsPath, + valueGetterPath, + valueSetterPath, + valueSetterParamOptional, + true, + limit, + args); + + return iterator; + } + /** * Returns all metrics that can be configured in the Metrics Summary page or with Metrics without - * Limits™ (matching additional filters if specified). + * Limits™ (matching additional filters if specified). Optionally, paginate by using the + * page[cursor] and/or page[size] query parameters. To fetch the first page, + * pass in a query parameter with either a valid page[size] or an empty cursor like + * page[cursor]=. To fetch the next page, pass in the next_cursor value + * from the response as the new page[cursor] value. Once the + * meta.pagination.next_cursor value is null, all pages have been retrieved. * * @param parameters Optional parameters for the request. * @return ApiResponse<MetricsAndMetricTagConfigurationsResponse> @@ -1625,6 +1713,8 @@ public ApiResponse listTagConfigurati Boolean filterQueried = parameters.filterQueried; String filterTags = parameters.filterTags; Long windowSeconds = parameters.windowSeconds; + Integer pageSize = parameters.pageSize; + String pageCursor = parameters.pageCursor; // create path and map variables String localVarPath = "/api/v2/metrics"; @@ -1642,6 +1732,8 @@ public ApiResponse listTagConfigurati localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[queried]", filterQueried)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "window[seconds]", windowSeconds)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); Invocation.Builder builder = apiClient.createBuilder( @@ -1681,6 +1773,8 @@ public ApiResponse listTagConfigurati Boolean filterQueried = parameters.filterQueried; String filterTags = parameters.filterTags; Long windowSeconds = parameters.windowSeconds; + Integer pageSize = parameters.pageSize; + String pageCursor = parameters.pageCursor; // create path and map variables String localVarPath = "/api/v2/metrics"; @@ -1698,6 +1792,8 @@ public ApiResponse listTagConfigurati localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[queried]", filterQueried)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "window[seconds]", windowSeconds)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); Invocation.Builder builder; try { diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricMetaPage.java b/src/main/java/com/datadog/api/client/v2/model/MetricMetaPage.java new file mode 100644 index 00000000000..7a813b0bd73 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/MetricMetaPage.java @@ -0,0 +1,243 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Paging attributes. Only present if pagination query parameters were provided. */ +@JsonPropertyOrder({ + MetricMetaPage.JSON_PROPERTY_CURSOR, + MetricMetaPage.JSON_PROPERTY_LIMIT, + MetricMetaPage.JSON_PROPERTY_NEXT_CURSOR, + MetricMetaPage.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class MetricMetaPage { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CURSOR = "cursor"; + private JsonNullable cursor = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_LIMIT = "limit"; + private Integer limit; + + public static final String JSON_PROPERTY_NEXT_CURSOR = "next_cursor"; + private JsonNullable nextCursor = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TYPE = "type"; + private MetricMetaPageType type = MetricMetaPageType.CURSOR_LIMIT; + + public MetricMetaPage cursor(String cursor) { + this.cursor = JsonNullable.of(cursor); + return this; + } + + /** + * The cursor used to get the current results, if any. + * + * @return cursor + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getCursor() { + return cursor.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CURSOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getCursor_JsonNullable() { + return cursor; + } + + @JsonProperty(JSON_PROPERTY_CURSOR) + public void setCursor_JsonNullable(JsonNullable cursor) { + this.cursor = cursor; + } + + public void setCursor(String cursor) { + this.cursor = JsonNullable.of(cursor); + } + + public MetricMetaPage limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Number of results returned minimum: 0 maximum: 20000 + * + * @return limit + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getLimit() { + return limit; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public MetricMetaPage nextCursor(String nextCursor) { + this.nextCursor = JsonNullable.of(nextCursor); + return this; + } + + /** + * The cursor used to get the next results, if any. + * + * @return nextCursor + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getNextCursor() { + return nextCursor.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT_CURSOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getNextCursor_JsonNullable() { + return nextCursor; + } + + @JsonProperty(JSON_PROPERTY_NEXT_CURSOR) + public void setNextCursor_JsonNullable(JsonNullable nextCursor) { + this.nextCursor = nextCursor; + } + + public void setNextCursor(String nextCursor) { + this.nextCursor = JsonNullable.of(nextCursor); + } + + public MetricMetaPage type(MetricMetaPageType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Type of metric pagination. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public MetricMetaPageType getType() { + return type; + } + + public void setType(MetricMetaPageType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return MetricMetaPage + */ + @JsonAnySetter + public MetricMetaPage putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this MetricMetaPage object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MetricMetaPage metricMetaPage = (MetricMetaPage) o; + return Objects.equals(this.cursor, metricMetaPage.cursor) + && Objects.equals(this.limit, metricMetaPage.limit) + && Objects.equals(this.nextCursor, metricMetaPage.nextCursor) + && Objects.equals(this.type, metricMetaPage.type) + && Objects.equals(this.additionalProperties, metricMetaPage.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(cursor, limit, nextCursor, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MetricMetaPage {\n"); + sb.append(" cursor: ").append(toIndentedString(cursor)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" nextCursor: ").append(toIndentedString(nextCursor)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricMetaPageType.java b/src/main/java/com/datadog/api/client/v2/model/MetricMetaPageType.java new file mode 100644 index 00000000000..669604b3168 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/MetricMetaPageType.java @@ -0,0 +1,54 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Type of metric pagination. */ +@JsonSerialize(using = MetricMetaPageType.MetricMetaPageTypeSerializer.class) +public class MetricMetaPageType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("cursor_limit")); + + public static final MetricMetaPageType CURSOR_LIMIT = new MetricMetaPageType("cursor_limit"); + + MetricMetaPageType(String value) { + super(value, allowedValues); + } + + public static class MetricMetaPageTypeSerializer extends StdSerializer { + public MetricMetaPageTypeSerializer(Class t) { + super(t); + } + + public MetricMetaPageTypeSerializer() { + this(null); + } + + @Override + public void serialize(MetricMetaPageType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static MetricMetaPageType fromValue(String value) { + return new MetricMetaPageType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricPaginationMeta.java b/src/main/java/com/datadog/api/client/v2/model/MetricPaginationMeta.java new file mode 100644 index 00000000000..ec307737f24 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/MetricPaginationMeta.java @@ -0,0 +1,136 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response metadata object. */ +@JsonPropertyOrder({MetricPaginationMeta.JSON_PROPERTY_PAGINATION}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class MetricPaginationMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PAGINATION = "pagination"; + private MetricMetaPage pagination; + + public MetricPaginationMeta pagination(MetricMetaPage pagination) { + this.pagination = pagination; + this.unparsed |= pagination.unparsed; + return this; + } + + /** + * Paging attributes. Only present if pagination query parameters were provided. + * + * @return pagination + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGINATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public MetricMetaPage getPagination() { + return pagination; + } + + public void setPagination(MetricMetaPage pagination) { + this.pagination = pagination; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return MetricPaginationMeta + */ + @JsonAnySetter + public MetricPaginationMeta putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this MetricPaginationMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MetricPaginationMeta metricPaginationMeta = (MetricPaginationMeta) o; + return Objects.equals(this.pagination, metricPaginationMeta.pagination) + && Objects.equals(this.additionalProperties, metricPaginationMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MetricPaginationMeta {\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricsAndMetricTagConfigurationsResponse.java b/src/main/java/com/datadog/api/client/v2/model/MetricsAndMetricTagConfigurationsResponse.java index 59fe2283547..92fcdc5b591 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricsAndMetricTagConfigurationsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricsAndMetricTagConfigurationsResponse.java @@ -19,7 +19,11 @@ import java.util.Objects; /** Response object that includes metrics and metric tag configurations. */ -@JsonPropertyOrder({MetricsAndMetricTagConfigurationsResponse.JSON_PROPERTY_DATA}) +@JsonPropertyOrder({ + MetricsAndMetricTagConfigurationsResponse.JSON_PROPERTY_DATA, + MetricsAndMetricTagConfigurationsResponse.JSON_PROPERTY_LINKS, + MetricsAndMetricTagConfigurationsResponse.JSON_PROPERTY_META +}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class MetricsAndMetricTagConfigurationsResponse { @@ -27,6 +31,12 @@ public class MetricsAndMetricTagConfigurationsResponse { public static final String JSON_PROPERTY_DATA = "data"; private List data = null; + public static final String JSON_PROPERTY_LINKS = "links"; + private MetricsListResponseLinks links; + + public static final String JSON_PROPERTY_META = "meta"; + private MetricPaginationMeta meta; + public MetricsAndMetricTagConfigurationsResponse data( List data) { this.data = data; @@ -62,6 +72,50 @@ public void setData(List data) { this.data = data; } + public MetricsAndMetricTagConfigurationsResponse links(MetricsListResponseLinks links) { + this.links = links; + this.unparsed |= links.unparsed; + return this; + } + + /** + * Pagination links. Only present if pagination query parameters were provided. + * + * @return links + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public MetricsListResponseLinks getLinks() { + return links; + } + + public void setLinks(MetricsListResponseLinks links) { + this.links = links; + } + + public MetricsAndMetricTagConfigurationsResponse meta(MetricPaginationMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; + } + + /** + * Response metadata object. + * + * @return meta + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public MetricPaginationMeta getMeta() { + return meta; + } + + public void setMeta(MetricPaginationMeta meta) { + this.meta = meta; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -120,6 +174,8 @@ public boolean equals(Object o) { MetricsAndMetricTagConfigurationsResponse metricsAndMetricTagConfigurationsResponse = (MetricsAndMetricTagConfigurationsResponse) o; return Objects.equals(this.data, metricsAndMetricTagConfigurationsResponse.data) + && Objects.equals(this.links, metricsAndMetricTagConfigurationsResponse.links) + && Objects.equals(this.meta, metricsAndMetricTagConfigurationsResponse.meta) && Objects.equals( this.additionalProperties, metricsAndMetricTagConfigurationsResponse.additionalProperties); @@ -127,7 +183,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(data, additionalProperties); + return Objects.hash(data, links, meta, additionalProperties); } @Override @@ -135,6 +191,8 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MetricsAndMetricTagConfigurationsResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricsListResponseLinks.java b/src/main/java/com/datadog/api/client/v2/model/MetricsListResponseLinks.java new file mode 100644 index 00000000000..6b456b4e2eb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/MetricsListResponseLinks.java @@ -0,0 +1,276 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Pagination links. Only present if pagination query parameters were provided. */ +@JsonPropertyOrder({ + MetricsListResponseLinks.JSON_PROPERTY_FIRST, + MetricsListResponseLinks.JSON_PROPERTY_LAST, + MetricsListResponseLinks.JSON_PROPERTY_NEXT, + MetricsListResponseLinks.JSON_PROPERTY_PREV, + MetricsListResponseLinks.JSON_PROPERTY_SELF +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class MetricsListResponseLinks { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FIRST = "first"; + private String first; + + public static final String JSON_PROPERTY_LAST = "last"; + private JsonNullable last = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NEXT = "next"; + private JsonNullable next = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREV = "prev"; + private JsonNullable prev = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SELF = "self"; + private String self; + + public MetricsListResponseLinks first(String first) { + this.first = first; + return this; + } + + /** + * Link to the first page. + * + * @return first + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIRST) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFirst() { + return first; + } + + public void setFirst(String first) { + this.first = first; + } + + public MetricsListResponseLinks last(String last) { + this.last = JsonNullable.of(last); + return this; + } + + /** + * Link to the last page. + * + * @return last + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getLast() { + return last.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_LAST) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getLast_JsonNullable() { + return last; + } + + @JsonProperty(JSON_PROPERTY_LAST) + public void setLast_JsonNullable(JsonNullable last) { + this.last = last; + } + + public void setLast(String last) { + this.last = JsonNullable.of(last); + } + + public MetricsListResponseLinks next(String next) { + this.next = JsonNullable.of(next); + return this; + } + + /** + * Link to the next page. + * + * @return next + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getNext() { + return next.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getNext_JsonNullable() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + public void setNext_JsonNullable(JsonNullable next) { + this.next = next; + } + + public void setNext(String next) { + this.next = JsonNullable.of(next); + } + + public MetricsListResponseLinks prev(String prev) { + this.prev = JsonNullable.of(prev); + return this; + } + + /** + * Link to previous page. + * + * @return prev + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getPrev() { + return prev.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREV) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getPrev_JsonNullable() { + return prev; + } + + @JsonProperty(JSON_PROPERTY_PREV) + public void setPrev_JsonNullable(JsonNullable prev) { + this.prev = prev; + } + + public void setPrev(String prev) { + this.prev = JsonNullable.of(prev); + } + + public MetricsListResponseLinks self(String self) { + this.self = self; + return this; + } + + /** + * Link to current page. + * + * @return self + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SELF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSelf() { + return self; + } + + public void setSelf(String self) { + this.self = self; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return MetricsListResponseLinks + */ + @JsonAnySetter + public MetricsListResponseLinks putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this MetricsListResponseLinks object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MetricsListResponseLinks metricsListResponseLinks = (MetricsListResponseLinks) o; + return Objects.equals(this.first, metricsListResponseLinks.first) + && Objects.equals(this.last, metricsListResponseLinks.last) + && Objects.equals(this.next, metricsListResponseLinks.next) + && Objects.equals(this.prev, metricsListResponseLinks.prev) + && Objects.equals(this.self, metricsListResponseLinks.self) + && Objects.equals(this.additionalProperties, metricsListResponseLinks.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(first, last, next, prev, self, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MetricsListResponseLinks {\n"); + sb.append(" first: ").append(toIndentedString(first)).append("\n"); + sb.append(" last: ").append(toIndentedString(last)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" prev: ").append(toIndentedString(prev)).append("\n"); + sb.append(" self: ").append(toIndentedString(self)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/test/resources/cassettes/features/v2/Get_a_list_of_metrics_returns_Success_response_with_pagination.freeze b/src/test/resources/cassettes/features/v2/Get_a_list_of_metrics_returns_Success_response_with_pagination.freeze new file mode 100644 index 00000000000..f6dce24ea42 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_a_list_of_metrics_returns_Success_response_with_pagination.freeze @@ -0,0 +1 @@ +2024-12-06T19:12:25.667Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_list_of_metrics_returns_Success_response_with_pagination.json b/src/test/resources/cassettes/features/v2/Get_a_list_of_metrics_returns_Success_response_with_pagination.json new file mode 100644 index 00000000000..80308151078 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_a_list_of_metrics_returns_Success_response_with_pagination.json @@ -0,0 +1,67 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/metrics", + "queryStringParameters": { + "page[size]": [ + "2" + ] + }, + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":[{\"type\":\"metrics\",\"id\":\"datadog.event.tracking.indexation.audit.events\"},{\"type\":\"metrics\",\"id\":\"datadog.estimated_usage.events.ingested_events\"}],\"meta\":{\"pagination\":{\"cursor\":null,\"next_cursor\":\"6354566d64454633525642695631597759323173616d4d784f5768614d6d52355748704265455a7561453154526b704554315a4f616c5577566b685862456f305455646e6557517a526e6c5752555642526d787355314e756233686c617a56575656526b52465273516c6456526c5a74557a427756574a73525546425155464251554642526c705464316455566b354a5658706e4e574d7863465669565852465657316b576b354962464a566257733156564642516b5a7561453154526b704554315a4f616c5577566b685862456f305455646e6557517a526e6c57525556425155453950546f365a474630595752765a79356c63335270625746305a57526664584e685a3255755a585a6c626e527a4c6d6c755a32567a6447566b583256325a573530637977324c6a67794e7a677a4e3255724d44593d\",\"limit\":1,\"type\":\"cursor_limit\"}},\"links\":{\"self\":\"https://api.datadoghq.com/api/v2/metrics?page[size]=1\",\"last\":null,\"next\":\"https://api.datadoghq.com/api/v2/metrics?page[cursor]=6354566d64454633525642695631597759323173616d4d784f5768614d6d52355748704265455a7561453154526b704554315a4f616c5577566b685862456f305455646e6557517a526e6c5752555642526d787355314e756233686c617a56575656526b52465273516c6456526c5a74557a427756574a73525546425155464251554642526c705464316455566b354a5658706e4e574d7863465669565852465657316b576b354962464a566257733156564642516b5a7561453154526b704554315a4f616c5577566b685862456f305455646e6557517a526e6c57525556425155453950546f365a474630595752765a79356c63335270625746305a57526664584e685a3255755a585a6c626e527a4c6d6c755a32567a6447566b583256325a573530637977324c6a67794e7a677a4e3255724d44593d\",\"prev\":null,\"first\":\"https://api.datadoghq.com/api/v2/metrics?page[size]=1\"}}\n", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "8ebd8c6f-c837-a7c8-3491-4fdf3447ba1d" + }, + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/metrics", + "queryStringParameters": { + "page[size]": [ + "2" + ], + "page[cursor]": [ + "6354566d64454633525642695631597759323173616d4d784f5768614d6d52355748704265455a7561453154526b704554315a4f616c5577566b685862456f305455646e6557517a526e6c5752555642526d787355314e756233686c617a56575656526b52465273516c6456526c5a74557a427756574a73525546425155464251554642526c705464316455566b354a5658706e4e574d7863465669565852465657316b576b354962464a566257733156564642516b5a7561453154526b704554315a4f616c5577566b685862456f305455646e6557517a526e6c57525556425155453950546f365a474630595752765a79356c63335270625746305a57526664584e685a3255755a585a6c626e527a4c6d6c755a32567a6447566b583256325a573530637977324c6a67794e7a677a4e3255724d44593d" + ] + }, + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":[{\"type\":\"metrics\",\"id\":\"datadog.estimated_usage.synthetics.api_test_runs\"}],\"meta\":{\"pagination\":{\"cursor\":\"6354566d64454633525642695631597759323173616d4d784f5768614d6d52355748704265455a7561453154526b704554315a4f616c5577566b685862456f305455646e6557517a526e6c5752555642526d787355314e756233686c617a56575656526b52465273516c6456526c5a74557a427756574a73525546425155464251554642526c705464316455566b354a5658706e4e574d7863465669565852465657316b576b354962464a566257733156564642516b5a7561453154526b704554315a4f616c5577566b685862456f305455646e6557517a526e6c57525556425155453950546f365a474630595752765a79356c63335270625746305a57526664584e685a3255755a585a6c626e527a4c6d6c755a32567a6447566b583256325a573530637977324c6a67794e7a677a4e3255724d44593d\",\"next_cursor\":\"6354566d64454633525642695631597759323173616d4d784f5768614d6d52355748704265455a7561453154526b704554315a4f616c5577566b685862456f305455646e6557517a526e6c5752555642526d787355314e756233686c617a56575656526b52465273516c6456526c5a74557a427756574a73525546425155464251554642526c705464316455566b354a5658706e4e574d7863465669565852465657316b576b354962464a566257733156564642516b5a7561453154526b704554315a4f616c5577566b685862456f305455646e6557517a526e6c57525556425155453950546f365a474630595752765a79356c63335270625746305a57526664584e685a32557563336c756447686c64476c6a6379356863476c666447567a644639796457357a4c4445754d44417a4e6a4d795a5373774e673d3d\",\"limit\":1,\"type\":\"cursor_limit\"}},\"links\":{\"self\":\"https://api.datadoghq.com/api/v2/metrics?page[cursor]=6354566d64454633525642695631597759323173616d4d784f5768614d6d52355748704265455a7561453154526b704554315a4f616c5577566b685862456f305455646e6557517a526e6c5752555642526d787355314e756233686c617a56575656526b52465273516c6456526c5a74557a427756574a73525546425155464251554642526c705464316455566b354a5658706e4e574d7863465669565852465657316b576b354962464a566257733156564642516b5a7561453154526b704554315a4f616c5577566b685862456f305455646e6557517a526e6c57525556425155453950546f365a474630595752765a79356c63335270625746305a57526664584e685a3255755a585a6c626e527a4c6d6c755a32567a6447566b583256325a573530637977324c6a67794e7a677a4e3255724d44593d&page[size]=1\",\"last\":null,\"next\":\"https://api.datadoghq.com/api/v2/metrics?page[cursor]=6354566d64454633525642695631597759323173616d4d784f5768614d6d52355748704265455a7561453154526b704554315a4f616c5577566b685862456f305455646e6557517a526e6c5752555642526d787355314e756233686c617a56575656526b52465273516c6456526c5a74557a427756574a73525546425155464251554642526c705464316455566b354a5658706e4e574d7863465669565852465657316b576b354962464a566257733156564642516b5a7561453154526b704554315a4f616c5577566b685862456f305455646e6557517a526e6c57525556425155453950546f365a474630595752765a79356c63335270625746305a57526664584e685a32557563336c756447686c64476c6a6379356863476c666447567a644639796457357a4c4445754d44417a4e6a4d795a5373774e673d3d\",\"prev\":null,\"first\":\"https://api.datadoghq.com/api/v2/metrics?page[size]=1\"}}\n", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "71ffa01c-df3d-18b9-be9f-8b8bdf93efa0" + } +] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/metrics.feature b/src/test/resources/com/datadog/api/client/v2/api/metrics.feature index d98275fb2de..b69e8dc104c 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/metrics.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/metrics.feature @@ -125,6 +125,15 @@ Feature: Metrics When the request is sent Then the response status is 200 Success + @replay-only @skip-validation @team:DataDog/metrics-experience @with-pagination + Scenario: Get a list of metrics returns "Success" response with pagination + Given a valid "appKeyAuth" key in the system + And new "ListTagConfigurations" request + And request contains "page[size]" parameter with value 2 + When the request with pagination is sent + Then the response status is 200 Success + And the response has 3 items + @team:DataDog/metrics-experience Scenario: Get a list of metrics with a tag filter returns "Success" response Given a valid "appKeyAuth" key in the system