diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 413017e2a27..fd30acae59e 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -58798,13 +58798,15 @@ components: - token type: object Metric: - description: Object for a single metric tag configuration. + description: Object for a single metric. example: id: metric.foo.bar type: metrics properties: id: $ref: "#/components/schemas/MetricName" + relationships: + $ref: "#/components/schemas/MetricRelationships" type: $ref: "#/components/schemas/MetricType" type: object @@ -59341,12 +59343,12 @@ components: description: Object containing the definition of a metric's ingested and indexed volume. properties: indexed_volume: - description: Indexed volume for the given metric. + description: Estimated average hourly number of indexed time series for the given metric over the last hour. For organizations on Metric Name Pricing, this represents the estimated sum of indexed data points over the last hour. example: 10 format: int64 type: integer ingested_volume: - description: Ingested volume for the given metric. + description: Estimated average hourly number of ingested time series for the given metric over the last hour. This value is `0` for metrics not configured with Metrics Without Limits. For organizations on Metric Name Pricing, this represents the estimated sum of ingested data points over the last hour. example: 20 format: int64 type: integer @@ -59523,6 +59525,12 @@ components: format: double type: number type: object + MetricRelationships: + description: Relationships for a metric. + properties: + metric_volumes: + $ref: "#/components/schemas/MetricVolumesRelationship" + type: object MetricResource: description: Metric resource. example: {name: "dummyhost", type: "host"} @@ -59715,6 +59723,8 @@ components: $ref: "#/components/schemas/MetricTagConfigurationAttributes" id: $ref: "#/components/schemas/MetricName" + relationships: + $ref: "#/components/schemas/MetricRelationships" type: $ref: "#/components/schemas/MetricTagConfigurationType" type: object @@ -59927,6 +59937,20 @@ components: oneOf: - $ref: "#/components/schemas/MetricDistinctVolume" - $ref: "#/components/schemas/MetricIngestedIndexedVolume" + MetricVolumesRelationship: + description: Relationship to a metric volume included in the response. + properties: + data: + $ref: "#/components/schemas/MetricVolumesRelationshipData" + type: object + MetricVolumesRelationshipData: + description: Relationship data for a metric volume. + properties: + id: + $ref: "#/components/schemas/MetricName" + type: + $ref: "#/components/schemas/MetricIngestedIndexedVolumeType" + type: object MetricVolumesResponse: description: Response object which includes a single metric's volume. properties: @@ -59972,6 +59996,11 @@ components: items: $ref: "#/components/schemas/MetricsAndMetricTagConfigurations" type: array + included: + description: Array of metric volume resources included when requested with `include=metric_volumes`. + items: + $ref: "#/components/schemas/MetricIngestedIndexedVolume" + type: array links: $ref: "#/components/schemas/MetricsListResponseLinks" meta: @@ -152443,13 +152472,20 @@ paths: Query parameters use bracket notation (for example, `filter[tags]`, `filter[queried][window][seconds]`). Pass them as standard URL query strings, URL-encoding the brackets if your client does not handle them. For example: `GET /api/v2/metrics?filter[tags]=env:prod&window[seconds]=86400&page[size]=500`. operationId: ListTagConfigurations parameters: - - description: Only return custom metrics that have been configured with Metrics Without Limits. + - description: Only return custom metrics that have been configured (`true`) or not configured (`false`) with Metrics Without Limits. example: true in: query name: filter[configured] required: false schema: type: boolean + - description: Only return metrics that are eligible (`true`) or ineligible (`false`) for configuration with Metrics Without Limits. + example: true + in: query + name: filter[is_configurable] + required: false + schema: + type: boolean - description: Only return metrics that have the given tag key(s) in their Metrics Without Limits configuration (included or excluded). example: "app,env" in: query @@ -152507,6 +152543,20 @@ paths: required: false schema: type: boolean + - description: Include related resources in the response. Set to `metric_volumes` to include indexed and ingested volume counts for each metric. + example: metric_volumes + in: query + name: include + required: false + schema: + type: string + - description: "Sort results by metric volume. Prefix a key with `-` for descending order. Supported keys: `metric_volumes.indexed_volume`, `metric_volumes.ingested_volume`, `metric_volumes.indexed_volume_delta`, `metric_volumes.ingested_volume_delta`. Requires a paginated request (`page[size]` or `page[cursor]`)." + example: "-metric_volumes.indexed_volume" + in: query + name: sort + required: false + schema: + type: string - description: |- Only return metrics that have been actively reporting in the specified window. The default value is 3600 seconds (1 hour), the maximum value is 2,592,000 seconds (30 days), and the minimum value is 1 second. example: 3600 @@ -152548,6 +152598,34 @@ paths: meta: pagination: next_cursor: + with_metric_volumes: + value: + data: + - id: user.custom.cpu.usage + relationships: + metric_volumes: + data: + id: user.custom.cpu.usage + type: metric_volumes + type: metrics + - id: user.custom.mem.usage + relationships: + metric_volumes: + data: + id: user.custom.mem.usage + type: metric_volumes + type: metrics + included: + - attributes: + indexed_volume: 1000 + ingested_volume: 456 + id: user.custom.cpu.usage + type: metric_volumes + - attributes: + indexed_volume: 250 + ingested_volume: 1011 + id: user.custom.mem.usage + type: metric_volumes schema: $ref: "#/components/schemas/MetricsAndMetricTagConfigurationsResponse" description: Success 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 026b874d0f3..29e3525ece6 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 @@ -2490,6 +2490,7 @@ public ApiResponse listTagConfigurationByNameWit /** Manage optional parameters to listTagConfigurations. */ public static class ListTagConfigurationsOptionalParameters { private Boolean filterConfigured; + private Boolean filterIsConfigurable; private String filterTagsConfigured; private MetricTagConfigurationMetricTypeCategory filterMetricType; private Boolean filterIncludePercentiles; @@ -2497,6 +2498,8 @@ public static class ListTagConfigurationsOptionalParameters { private Long filterQueriedWindowSeconds; private String filterTags; private Boolean filterRelatedAssets; + private String include; + private String sort; private Long windowSeconds; private Integer pageSize; private String pageCursor; @@ -2504,8 +2507,8 @@ public static class ListTagConfigurationsOptionalParameters { /** * Set filterConfigured. * - * @param filterConfigured Only return custom metrics that have been configured with Metrics - * Without Limits. (optional) + * @param filterConfigured Only return custom metrics that have been configured (true + * ) or not configured (false) with Metrics Without Limits. (optional) * @return ListTagConfigurationsOptionalParameters */ public ListTagConfigurationsOptionalParameters filterConfigured(Boolean filterConfigured) { @@ -2513,6 +2516,19 @@ public ListTagConfigurationsOptionalParameters filterConfigured(Boolean filterCo return this; } + /** + * Set filterIsConfigurable. + * + * @param filterIsConfigurable Only return metrics that are eligible (true) or + * ineligible (false) for configuration with Metrics Without Limits. (optional) + * @return ListTagConfigurationsOptionalParameters + */ + public ListTagConfigurationsOptionalParameters filterIsConfigurable( + Boolean filterIsConfigurable) { + this.filterIsConfigurable = filterIsConfigurable; + return this; + } + /** * Set filterTagsConfigured. * @@ -2608,6 +2624,33 @@ public ListTagConfigurationsOptionalParameters filterRelatedAssets( return this; } + /** + * Set include. + * + * @param include Include related resources in the response. Set to metric_volumes + * to include indexed and ingested volume counts for each metric. (optional) + * @return ListTagConfigurationsOptionalParameters + */ + public ListTagConfigurationsOptionalParameters include(String include) { + this.include = include; + return this; + } + + /** + * Set sort. + * + * @param sort Sort results by metric volume. Prefix a key with - for descending + * order. Supported keys: metric_volumes.indexed_volume, + * metric_volumes.ingested_volume, metric_volumes.indexed_volume_delta, + * metric_volumes.ingested_volume_delta. Requires a paginated request ( + * page[size] or page[cursor]). (optional) + * @return ListTagConfigurationsOptionalParameters + */ + public ListTagConfigurationsOptionalParameters sort(String sort) { + this.sort = sort; + return this; + } + /** * Set windowSeconds. * @@ -2792,6 +2835,7 @@ public ApiResponse listTagConfigurati ListTagConfigurationsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; Boolean filterConfigured = parameters.filterConfigured; + Boolean filterIsConfigurable = parameters.filterIsConfigurable; String filterTagsConfigured = parameters.filterTagsConfigured; MetricTagConfigurationMetricTypeCategory filterMetricType = parameters.filterMetricType; Boolean filterIncludePercentiles = parameters.filterIncludePercentiles; @@ -2799,6 +2843,8 @@ public ApiResponse listTagConfigurati Long filterQueriedWindowSeconds = parameters.filterQueriedWindowSeconds; String filterTags = parameters.filterTags; Boolean filterRelatedAssets = parameters.filterRelatedAssets; + String include = parameters.include; + String sort = parameters.sort; Long windowSeconds = parameters.windowSeconds; Integer pageSize = parameters.pageSize; String pageCursor = parameters.pageCursor; @@ -2810,6 +2856,8 @@ public ApiResponse listTagConfigurati localVarQueryParams.addAll( apiClient.parameterToPairs("", "filter[configured]", filterConfigured)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[is_configurable]", filterIsConfigurable)); localVarQueryParams.addAll( apiClient.parameterToPairs("", "filter[tags_configured]", filterTagsConfigured)); localVarQueryParams.addAll( @@ -2823,6 +2871,8 @@ 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("", "sort", sort)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "window[seconds]", windowSeconds)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); @@ -2859,6 +2909,7 @@ public ApiResponse listTagConfigurati listTagConfigurationsWithHttpInfoAsync(ListTagConfigurationsOptionalParameters parameters) { Object localVarPostBody = null; Boolean filterConfigured = parameters.filterConfigured; + Boolean filterIsConfigurable = parameters.filterIsConfigurable; String filterTagsConfigured = parameters.filterTagsConfigured; MetricTagConfigurationMetricTypeCategory filterMetricType = parameters.filterMetricType; Boolean filterIncludePercentiles = parameters.filterIncludePercentiles; @@ -2866,6 +2917,8 @@ public ApiResponse listTagConfigurati Long filterQueriedWindowSeconds = parameters.filterQueriedWindowSeconds; String filterTags = parameters.filterTags; Boolean filterRelatedAssets = parameters.filterRelatedAssets; + String include = parameters.include; + String sort = parameters.sort; Long windowSeconds = parameters.windowSeconds; Integer pageSize = parameters.pageSize; String pageCursor = parameters.pageCursor; @@ -2877,6 +2930,8 @@ public ApiResponse listTagConfigurati localVarQueryParams.addAll( apiClient.parameterToPairs("", "filter[configured]", filterConfigured)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[is_configurable]", filterIsConfigurable)); localVarQueryParams.addAll( apiClient.parameterToPairs("", "filter[tags_configured]", filterTagsConfigured)); localVarQueryParams.addAll( @@ -2890,6 +2945,8 @@ 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("", "sort", sort)); 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..3bd2839b8bc 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 @@ -16,8 +16,12 @@ import java.util.Map; import java.util.Objects; -/** Object for a single metric tag configuration. */ -@JsonPropertyOrder({Metric.JSON_PROPERTY_ID, Metric.JSON_PROPERTY_TYPE}) +/** Object for a single metric. */ +@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 for a metric. + * + * @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/MetricIngestedIndexedVolumeAttributes.java b/src/main/java/com/datadog/api/client/v2/model/MetricIngestedIndexedVolumeAttributes.java index f94f6e7fc46..1a4bbb2ce9c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricIngestedIndexedVolumeAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricIngestedIndexedVolumeAttributes.java @@ -37,7 +37,9 @@ public MetricIngestedIndexedVolumeAttributes indexedVolume(Long indexedVolume) { } /** - * Indexed volume for the given metric. + * Estimated average hourly number of indexed time series for the given metric over the last hour. + * For organizations on Metric Name Pricing, this represents the estimated sum of indexed data + * points over the last hour. * * @return indexedVolume */ @@ -58,7 +60,10 @@ public MetricIngestedIndexedVolumeAttributes ingestedVolume(Long ingestedVolume) } /** - * Ingested volume for the given metric. + * Estimated average hourly number of ingested time series for the given metric over the last + * hour. This value is 0 for metrics not configured with Metrics Without Limits. For + * organizations on Metric Name Pricing, this represents the estimated sum of ingested data points + * over the last hour. * * @return ingestedVolume */ 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..81b1cdf17ef --- /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 for a metric. */ +@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 volume included in the response. + * + * @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/MetricTagConfiguration.java b/src/main/java/com/datadog/api/client/v2/model/MetricTagConfiguration.java index 84d1c237eae..f209b681d6b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MetricTagConfiguration.java +++ b/src/main/java/com/datadog/api/client/v2/model/MetricTagConfiguration.java @@ -20,6 +20,7 @@ @JsonPropertyOrder({ MetricTagConfiguration.JSON_PROPERTY_ATTRIBUTES, MetricTagConfiguration.JSON_PROPERTY_ID, + MetricTagConfiguration.JSON_PROPERTY_RELATIONSHIPS, MetricTagConfiguration.JSON_PROPERTY_TYPE }) @jakarta.annotation.Generated( @@ -32,6 +33,9 @@ public class MetricTagConfiguration { 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 MetricTagConfigurationType type = MetricTagConfigurationType.MANAGE_TAGS; @@ -78,6 +82,28 @@ public void setId(String id) { this.id = id; } + public MetricTagConfiguration relationships(MetricRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships for a metric. + * + * @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 MetricTagConfiguration type(MetricTagConfigurationType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -161,13 +187,14 @@ public boolean equals(Object o) { MetricTagConfiguration metricTagConfiguration = (MetricTagConfiguration) o; return Objects.equals(this.attributes, metricTagConfiguration.attributes) && Objects.equals(this.id, metricTagConfiguration.id) + && Objects.equals(this.relationships, metricTagConfiguration.relationships) && Objects.equals(this.type, metricTagConfiguration.type) && Objects.equals(this.additionalProperties, metricTagConfiguration.additionalProperties); } @Override public int hashCode() { - return Objects.hash(attributes, id, type, additionalProperties); + return Objects.hash(attributes, id, relationships, type, additionalProperties); } @Override @@ -176,6 +203,7 @@ public String toString() { sb.append("class MetricTagConfiguration {\n"); sb.append(" attributes: ").append(toIndentedString(attributes)).append("\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/MetricVolumesRelationship.java b/src/main/java/com/datadog/api/client/v2/model/MetricVolumesRelationship.java new file mode 100644 index 00000000000..4f0d69e3a24 --- /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 volume included in the response. */ +@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 volume. + * + * @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..4d89fcd7a43 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/MetricVolumesRelationshipData.java @@ -0,0 +1,169 @@ +/* + * 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 data for a metric volume. */ +@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 id(String id) { + this.id = id; + return this; + } + + /** + * The metric name for this resource. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + 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 + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + 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..5c4e8f8a6fc 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 metric volume resources included when requested with include=metric_volumes + * . + * + * @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: ")