From d9072fd2ec0862355d30cce6fc5ab44ab5a8f88c Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 12 Mar 2026 20:26:05 +0000 Subject: [PATCH] Regenerate client from commit a357f01 of spec repo --- .generator/schemas/v2/openapi.yaml | 59 +++++- .../datadog/api/client/v2/api/MetricsApi.java | 27 ++- .../datadog/api/client/v2/model/Metric.java | 35 +++- .../client/v2/model/MetricRelationships.java | 136 +++++++++++++ .../client/v2/model/MetricVolumesInclude.java | 61 ++++++ .../v2/model/MetricVolumesRelationship.java | 137 +++++++++++++ .../model/MetricVolumesRelationshipData.java | 180 ++++++++++++++++++ ...icsAndMetricTagConfigurationsResponse.java | 44 ++++- 8 files changed, 674 insertions(+), 5 deletions(-) create mode 100644 src/main/java/com/datadog/api/client/v2/model/MetricRelationships.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/MetricVolumesInclude.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/MetricVolumesRelationship.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/MetricVolumesRelationshipData.java diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 0057dd635b3..6f80e4ca4b6 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -38523,6 +38523,8 @@ components: properties: id: $ref: '#/components/schemas/MetricName' + relationships: + $ref: '#/components/schemas/MetricRelationships' type: $ref: '#/components/schemas/MetricType' type: object @@ -39298,6 +39300,12 @@ components: format: double type: number type: object + MetricRelationships: + description: Relationships to related metric objects. + properties: + metric_volumes: + $ref: '#/components/schemas/MetricVolumesRelationship' + type: object MetricResource: description: Metric resource. example: @@ -39741,6 +39749,33 @@ components: oneOf: - $ref: '#/components/schemas/MetricDistinctVolume' - $ref: '#/components/schemas/MetricIngestedIndexedVolume' + MetricVolumesInclude: + description: Comma-separated list of additional data to include in the response. + Allowed values are `metric_volumes`. + enum: + - metric_volumes + - generated_metric_attributes + type: string + x-enum-varnames: + - METRIC_VOLUMES + - GENERATED_METRIC_ATTRIBUTES + MetricVolumesRelationship: + description: Relationship to a metric's ingested and indexed volumes. + properties: + data: + $ref: '#/components/schemas/MetricVolumesRelationshipData' + type: object + MetricVolumesRelationshipData: + description: Relationship data for a metric's ingested and indexed volumes. + properties: + id: + $ref: '#/components/schemas/MetricName' + type: + $ref: '#/components/schemas/MetricIngestedIndexedVolumeType' + required: + - type + - id + type: object MetricVolumesResponse: description: Response object which includes a single metric's volume. properties: @@ -39787,6 +39822,12 @@ components: items: $ref: '#/components/schemas/MetricsAndMetricTagConfigurations' type: array + included: + description: Array of included metric volume objects. Only present when + `include=metric_volumes` is requested. + items: + $ref: '#/components/schemas/MetricIngestedIndexedVolume' + type: array links: $ref: '#/components/schemas/MetricsListResponseLinks' meta: @@ -91450,7 +91491,13 @@ paths: `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.' + retrieved. + + Use the `include` query parameter to fetch additional data with the response. + When `include=metric_volumes` is specified, the response includes volume data + for each custom metric in the `included` array, with a corresponding `relationships` + link on each metric in `data`. Volume data is only returned for custom metrics. + All volume values represent a 1-hour timeframe.' operationId: ListTagConfigurations parameters: - description: Filter custom metrics that have configured tags. @@ -91532,6 +91579,16 @@ paths: required: false schema: type: boolean + - description: 'Comma-separated list of additional data to include in the response. + Allowed values: `metric_volumes`. When `metric_volumes` is specified, the + response includes volume data for each custom metric in the `included` array, + with a corresponding `relationships` link on each metric in `data`.' + example: metric_volumes + in: query + name: include + required: false + schema: + $ref: '#/components/schemas/MetricVolumesInclude' - description: 'The number of seconds of look back (from now) to apply to a filter[tag] or filter[queried] query. 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 9bc39e2ee70..cc11ce59955 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 @@ -20,6 +20,7 @@ import com.datadog.api.client.v2.model.MetricTagConfigurationMetricTypeCategory; import com.datadog.api.client.v2.model.MetricTagConfigurationResponse; import com.datadog.api.client.v2.model.MetricTagConfigurationUpdateRequest; +import com.datadog.api.client.v2.model.MetricVolumesInclude; import com.datadog.api.client.v2.model.MetricVolumesResponse; import com.datadog.api.client.v2.model.MetricsAndMetricTagConfigurations; import com.datadog.api.client.v2.model.MetricsAndMetricTagConfigurationsResponse; @@ -1599,6 +1600,7 @@ public static class ListTagConfigurationsOptionalParameters { private Long filterQueriedWindowSeconds; private String filterTags; private Boolean filterRelatedAssets; + private MetricVolumesInclude include; private Long windowSeconds; private Integer pageSize; private String pageCursor; @@ -1709,6 +1711,21 @@ public ListTagConfigurationsOptionalParameters filterRelatedAssets( return this; } + /** + * Set include. + * + * @param include Comma-separated list of additional data to include in the response. Allowed + * values: metric_volumes. When metric_volumes is specified, the + * response includes volume data for each custom metric in the included array, + * with a corresponding relationships link on each metric in data. + * (optional) + * @return ListTagConfigurationsOptionalParameters + */ + public ListTagConfigurationsOptionalParameters include(MetricVolumesInclude include) { + this.include = include; + return this; + } + /** * Set windowSeconds. * @@ -1867,7 +1884,11 @@ public PaginationIterable listTagConfiguratio * 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. + * been retrieved. Use the include query parameter to fetch additional data with the + * response. When include=metric_volumes is specified, the response includes volume + * data for each custom metric in the included array, with a corresponding + * relationships link on each metric in data. Volume data is only returned for + * custom metrics. All volume values represent a 1-hour timeframe. * * @param parameters Optional parameters for the request. * @return ApiResponse<MetricsAndMetricTagConfigurationsResponse> @@ -1893,6 +1914,7 @@ public ApiResponse listTagConfigurati Long filterQueriedWindowSeconds = parameters.filterQueriedWindowSeconds; String filterTags = parameters.filterTags; Boolean filterRelatedAssets = parameters.filterRelatedAssets; + MetricVolumesInclude include = parameters.include; Long windowSeconds = parameters.windowSeconds; Integer pageSize = parameters.pageSize; String pageCursor = parameters.pageCursor; @@ -1917,6 +1939,7 @@ public ApiResponse listTagConfigurati localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags)); localVarQueryParams.addAll( apiClient.parameterToPairs("", "filter[related_assets]", filterRelatedAssets)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "window[seconds]", windowSeconds)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); @@ -1960,6 +1983,7 @@ public ApiResponse listTagConfigurati Long filterQueriedWindowSeconds = parameters.filterQueriedWindowSeconds; String filterTags = parameters.filterTags; Boolean filterRelatedAssets = parameters.filterRelatedAssets; + MetricVolumesInclude include = parameters.include; Long windowSeconds = parameters.windowSeconds; Integer pageSize = parameters.pageSize; String pageCursor = parameters.pageCursor; @@ -1984,6 +2008,7 @@ public ApiResponse listTagConfigurati localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags)); localVarQueryParams.addAll( apiClient.parameterToPairs("", "filter[related_assets]", filterRelatedAssets)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "window[seconds]", windowSeconds)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); diff --git a/src/main/java/com/datadog/api/client/v2/model/Metric.java b/src/main/java/com/datadog/api/client/v2/model/Metric.java index 8c7eb255da9..2c69312fb42 100644 --- a/src/main/java/com/datadog/api/client/v2/model/Metric.java +++ b/src/main/java/com/datadog/api/client/v2/model/Metric.java @@ -17,7 +17,11 @@ import java.util.Objects; /** Object for a single metric tag configuration. */ -@JsonPropertyOrder({Metric.JSON_PROPERTY_ID, Metric.JSON_PROPERTY_TYPE}) +@JsonPropertyOrder({ + Metric.JSON_PROPERTY_ID, + Metric.JSON_PROPERTY_RELATIONSHIPS, + Metric.JSON_PROPERTY_TYPE +}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class Metric { @@ -25,6 +29,9 @@ public class Metric { public static final String JSON_PROPERTY_ID = "id"; private String id; + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private MetricRelationships relationships; + public static final String JSON_PROPERTY_TYPE = "type"; private MetricType type = MetricType.METRICS; @@ -49,6 +56,28 @@ public void setId(String id) { this.id = id; } + public Metric relationships(MetricRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships to related metric objects. + * + * @return relationships + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public MetricRelationships getRelationships() { + return relationships; + } + + public void setRelationships(MetricRelationships relationships) { + this.relationships = relationships; + } + public Metric type(MetricType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -131,13 +160,14 @@ public boolean equals(Object o) { } Metric metric = (Metric) o; return Objects.equals(this.id, metric.id) + && Objects.equals(this.relationships, metric.relationships) && Objects.equals(this.type, metric.type) && Objects.equals(this.additionalProperties, metric.additionalProperties); } @Override public int hashCode() { - return Objects.hash(id, type, additionalProperties); + return Objects.hash(id, relationships, type, additionalProperties); } @Override @@ -145,6 +175,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Metric {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricRelationships.java b/src/main/java/com/datadog/api/client/v2/model/MetricRelationships.java new file mode 100644 index 00000000000..736afda8109 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/MetricRelationships.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; + +/** Relationships to related metric objects. */ +@JsonPropertyOrder({MetricRelationships.JSON_PROPERTY_METRIC_VOLUMES}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class MetricRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_METRIC_VOLUMES = "metric_volumes"; + private MetricVolumesRelationship metricVolumes; + + public MetricRelationships metricVolumes(MetricVolumesRelationship metricVolumes) { + this.metricVolumes = metricVolumes; + this.unparsed |= metricVolumes.unparsed; + return this; + } + + /** + * Relationship to a metric's ingested and indexed volumes. + * + * @return metricVolumes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC_VOLUMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public MetricVolumesRelationship getMetricVolumes() { + return metricVolumes; + } + + public void setMetricVolumes(MetricVolumesRelationship metricVolumes) { + this.metricVolumes = metricVolumes; + } + + /** + * 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 MetricRelationships + */ + @JsonAnySetter + public MetricRelationships 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 MetricRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MetricRelationships metricRelationships = (MetricRelationships) o; + return Objects.equals(this.metricVolumes, metricRelationships.metricVolumes) + && Objects.equals(this.additionalProperties, metricRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(metricVolumes, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MetricRelationships {\n"); + sb.append(" metricVolumes: ").append(toIndentedString(metricVolumes)).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/MetricVolumesInclude.java b/src/main/java/com/datadog/api/client/v2/model/MetricVolumesInclude.java new file mode 100644 index 00000000000..92625552972 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/MetricVolumesInclude.java @@ -0,0 +1,61 @@ +/* + * 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; + +/** + * Comma-separated list of additional data to include in the response. Allowed values are + * metric_volumes. + */ +@JsonSerialize(using = MetricVolumesInclude.MetricVolumesIncludeSerializer.class) +public class MetricVolumesInclude extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("metric_volumes", "generated_metric_attributes")); + + public static final MetricVolumesInclude METRIC_VOLUMES = + new MetricVolumesInclude("metric_volumes"); + public static final MetricVolumesInclude GENERATED_METRIC_ATTRIBUTES = + new MetricVolumesInclude("generated_metric_attributes"); + + MetricVolumesInclude(String value) { + super(value, allowedValues); + } + + public static class MetricVolumesIncludeSerializer extends StdSerializer { + public MetricVolumesIncludeSerializer(Class t) { + super(t); + } + + public MetricVolumesIncludeSerializer() { + this(null); + } + + @Override + public void serialize( + MetricVolumesInclude value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static MetricVolumesInclude fromValue(String value) { + return new MetricVolumesInclude(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/MetricVolumesRelationship.java b/src/main/java/com/datadog/api/client/v2/model/MetricVolumesRelationship.java new file mode 100644 index 00000000000..a56847df084 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/MetricVolumesRelationship.java @@ -0,0 +1,137 @@ +/* + * 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; + +/** Relationship to a metric's ingested and indexed volumes. */ +@JsonPropertyOrder({MetricVolumesRelationship.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class MetricVolumesRelationship { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private MetricVolumesRelationshipData data; + + public MetricVolumesRelationship data(MetricVolumesRelationshipData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Relationship data for a metric's ingested and indexed volumes. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public MetricVolumesRelationshipData getData() { + return data; + } + + public void setData(MetricVolumesRelationshipData data) { + this.data = data; + } + + /** + * 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 MetricVolumesRelationship + */ + @JsonAnySetter + public MetricVolumesRelationship 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 MetricVolumesRelationship object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MetricVolumesRelationship metricVolumesRelationship = (MetricVolumesRelationship) o; + return Objects.equals(this.data, metricVolumesRelationship.data) + && Objects.equals( + this.additionalProperties, metricVolumesRelationship.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MetricVolumesRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).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/MetricVolumesRelationshipData.java b/src/main/java/com/datadog/api/client/v2/model/MetricVolumesRelationshipData.java new file mode 100644 index 00000000000..b76bcaf146f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/MetricVolumesRelationshipData.java @@ -0,0 +1,180 @@ +/* + * 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.JsonCreator; +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; + +/** Relationship data for a metric's ingested and indexed volumes. */ +@JsonPropertyOrder({ + MetricVolumesRelationshipData.JSON_PROPERTY_ID, + MetricVolumesRelationshipData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class MetricVolumesRelationshipData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private MetricIngestedIndexedVolumeType type = MetricIngestedIndexedVolumeType.METRIC_VOLUMES; + + public MetricVolumesRelationshipData() {} + + @JsonCreator + public MetricVolumesRelationshipData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + MetricIngestedIndexedVolumeType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public MetricVolumesRelationshipData id(String id) { + this.id = id; + return this; + } + + /** + * The metric name for this resource. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public MetricVolumesRelationshipData type(MetricIngestedIndexedVolumeType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The metric ingested and indexed volume type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public MetricIngestedIndexedVolumeType getType() { + return type; + } + + public void setType(MetricIngestedIndexedVolumeType 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 MetricVolumesRelationshipData + */ + @JsonAnySetter + public MetricVolumesRelationshipData 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 MetricVolumesRelationshipData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MetricVolumesRelationshipData metricVolumesRelationshipData = (MetricVolumesRelationshipData) o; + return Objects.equals(this.id, metricVolumesRelationshipData.id) + && Objects.equals(this.type, metricVolumesRelationshipData.type) + && Objects.equals( + this.additionalProperties, metricVolumesRelationshipData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MetricVolumesRelationshipData {\n"); + sb.append(" id: ").append(toIndentedString(id)).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/MetricsAndMetricTagConfigurationsResponse.java b/src/main/java/com/datadog/api/client/v2/model/MetricsAndMetricTagConfigurationsResponse.java index 92fcdc5b591..ca24d385d4c 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 @@ -21,6 +21,7 @@ /** Response object that includes metrics and metric tag configurations. */ @JsonPropertyOrder({ MetricsAndMetricTagConfigurationsResponse.JSON_PROPERTY_DATA, + MetricsAndMetricTagConfigurationsResponse.JSON_PROPERTY_INCLUDED, MetricsAndMetricTagConfigurationsResponse.JSON_PROPERTY_LINKS, MetricsAndMetricTagConfigurationsResponse.JSON_PROPERTY_META }) @@ -31,6 +32,9 @@ public class MetricsAndMetricTagConfigurationsResponse { public static final String JSON_PROPERTY_DATA = "data"; private List data = null; + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included = null; + public static final String JSON_PROPERTY_LINKS = "links"; private MetricsListResponseLinks links; @@ -72,6 +76,42 @@ public void setData(List data) { this.data = data; } + public MetricsAndMetricTagConfigurationsResponse included( + List included) { + this.included = included; + for (MetricIngestedIndexedVolume item : included) { + this.unparsed |= item.unparsed; + } + return this; + } + + public MetricsAndMetricTagConfigurationsResponse addIncludedItem( + MetricIngestedIndexedVolume includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + this.unparsed |= includedItem.unparsed; + return this; + } + + /** + * Array of included metric volume objects. Only present when include=metric_volumes + * is requested. + * + * @return included + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } + + public void setIncluded(List included) { + this.included = included; + } + public MetricsAndMetricTagConfigurationsResponse links(MetricsListResponseLinks links) { this.links = links; this.unparsed |= links.unparsed; @@ -174,6 +214,7 @@ public boolean equals(Object o) { MetricsAndMetricTagConfigurationsResponse metricsAndMetricTagConfigurationsResponse = (MetricsAndMetricTagConfigurationsResponse) o; return Objects.equals(this.data, metricsAndMetricTagConfigurationsResponse.data) + && Objects.equals(this.included, metricsAndMetricTagConfigurationsResponse.included) && Objects.equals(this.links, metricsAndMetricTagConfigurationsResponse.links) && Objects.equals(this.meta, metricsAndMetricTagConfigurationsResponse.meta) && Objects.equals( @@ -183,7 +224,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(data, links, meta, additionalProperties); + return Objects.hash(data, included, links, meta, additionalProperties); } @Override @@ -191,6 +232,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MetricsAndMetricTagConfigurationsResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); sb.append(" links: ").append(toIndentedString(links)).append("\n"); sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); sb.append(" additionalProperties: ")