Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129207,15 +129207,37 @@ components:
example: user@datadoghq.com
readOnly: true
type: string
estimated_change_in_volume:
description: |-
Estimated change in indexed cardinality or points if the exemption is removed and the matching tag indexing
rule applies to the metric. A negative value indicates a reduction in indexed volume, a positive value
indicates an increase, and zero indicates no change. A `null` value indicates that the estimate is unavailable.
example: 45
format: int64
nullable: true
readOnly: true
type: integer
kind:
description: >-
Discriminates between an explicit exemption (`exemption`) and a pre-existing legacy tag configuration acting as an implicit exclusion (`legacy_tag_configuration`).
example: exemption
type: string
missing_indexed_tags:
description: |-
Tag keys used to query this metric in monitors, dashboards, notebooks, and SLOs that the matching rule would
remove or not include if the exemption is removed.
example:
- service
items:
type: string
readOnly: true
type: array
reason:
description: The reason the metric is exempt from tag indexing rules.
example: This metric has a pre-existing tag configuration.
type: string
volume_status:
$ref: "#/components/schemas/TagIndexingRuleExemptionVolumeStatus"
type: object
TagIndexingRuleExemptionCreateAttributes:
description: Attributes for creating a tag indexing rule exemption.
Expand Down Expand Up @@ -129274,6 +129296,22 @@ components:
type: string
x-enum-varnames:
- TAG_INDEXING_RULE_EXEMPTIONS
TagIndexingRuleExemptionVolumeStatus:
description: |-
Indicates whether `estimated_change_in_volume` is available and, if not, why. `ok` indicates a fresh estimate.
`unindexed_tags` indicates that the matching rule uses tags that are not indexed for the metric.
`unavailable` indicates that the estimate is stale, was not computed, or could not be retrieved.
enum:
- ok
- unindexed_tags
- unavailable
example: unavailable
readOnly: true
type: string
x-enum-varnames:
- OK
- UNINDEXED_TAGS
- UNAVAILABLE
TagIndexingRuleMetricMatch:
description: Criteria for matching metrics based on query state.
properties:
Expand Down Expand Up @@ -199163,8 +199201,12 @@ paths:
attributes:
created_at: "2024-01-15T12:00:00.000Z"
created_by_handle: user@datadoghq.com
estimated_change_in_volume: 45
kind: exemption
missing_indexed_tags:
- service
reason: This metric has a pre-existing tag configuration.
volume_status: ok
id: dd.test.metric
type: tag_indexing_rule_exemptions
schema:
Expand Down Expand Up @@ -199240,8 +199282,11 @@ paths:
attributes:
created_at: "2024-01-15T12:00:00.000Z"
created_by_handle: user@datadoghq.com
estimated_change_in_volume:
kind: exemption
missing_indexed_tags: []
reason: This metric has a pre-existing tag configuration.
volume_status: unavailable
id: dd.test.metric
type: tag_indexing_rule_exemptions
schema:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,20 @@
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.time.OffsetDateTime;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import org.openapitools.jackson.nullable.JsonNullable;

/** Attributes of a tag indexing rule exemption. */
@JsonPropertyOrder({
TagIndexingRuleExemptionAttributes.JSON_PROPERTY_CREATED_AT,
TagIndexingRuleExemptionAttributes.JSON_PROPERTY_CREATED_BY_HANDLE,
TagIndexingRuleExemptionAttributes.JSON_PROPERTY_ESTIMATED_CHANGE_IN_VOLUME,
TagIndexingRuleExemptionAttributes.JSON_PROPERTY_KIND,
TagIndexingRuleExemptionAttributes.JSON_PROPERTY_REASON
TagIndexingRuleExemptionAttributes.JSON_PROPERTY_MISSING_INDEXED_TAGS,
TagIndexingRuleExemptionAttributes.JSON_PROPERTY_REASON,
TagIndexingRuleExemptionAttributes.JSON_PROPERTY_VOLUME_STATUS
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
Expand All @@ -34,12 +39,22 @@ public class TagIndexingRuleExemptionAttributes {
public static final String JSON_PROPERTY_CREATED_BY_HANDLE = "created_by_handle";
private String createdByHandle;

public static final String JSON_PROPERTY_ESTIMATED_CHANGE_IN_VOLUME =
"estimated_change_in_volume";
private JsonNullable<Long> estimatedChangeInVolume = JsonNullable.<Long>undefined();

public static final String JSON_PROPERTY_KIND = "kind";
private String kind;

public static final String JSON_PROPERTY_MISSING_INDEXED_TAGS = "missing_indexed_tags";
private List<String> missingIndexedTags = null;

public static final String JSON_PROPERTY_REASON = "reason";
private String reason;

public static final String JSON_PROPERTY_VOLUME_STATUS = "volume_status";
private TagIndexingRuleExemptionVolumeStatus volumeStatus;

/**
* Timestamp when the exemption was created.
*
Expand All @@ -64,6 +79,35 @@ public String getCreatedByHandle() {
return createdByHandle;
}

/**
* Estimated change in indexed cardinality or points if the exemption is removed and the matching
* tag indexing rule applies to the metric. A negative value indicates a reduction in indexed
* volume, a positive value indicates an increase, and zero indicates no change. A <code>null
* </code> value indicates that the estimate is unavailable.
*
* @return estimatedChangeInVolume
*/
@jakarta.annotation.Nullable
@JsonIgnore
public Long getEstimatedChangeInVolume() {

if (estimatedChangeInVolume == null) {
estimatedChangeInVolume = JsonNullable.<Long>undefined();
}
return estimatedChangeInVolume.orElse(null);
}

@JsonProperty(JSON_PROPERTY_ESTIMATED_CHANGE_IN_VOLUME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<Long> getEstimatedChangeInVolume_JsonNullable() {
return estimatedChangeInVolume;
}

@JsonProperty(JSON_PROPERTY_ESTIMATED_CHANGE_IN_VOLUME)
private void setEstimatedChangeInVolume_JsonNullable(JsonNullable<Long> estimatedChangeInVolume) {
this.estimatedChangeInVolume = estimatedChangeInVolume;
}

public TagIndexingRuleExemptionAttributes kind(String kind) {
this.kind = kind;
return this;
Expand All @@ -86,6 +130,19 @@ public void setKind(String kind) {
this.kind = kind;
}

/**
* Tag keys used to query this metric in monitors, dashboards, notebooks, and SLOs that the
* matching rule would remove or not include if the exemption is removed.
*
* @return missingIndexedTags
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_MISSING_INDEXED_TAGS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<String> getMissingIndexedTags() {
return missingIndexedTags;
}

public TagIndexingRuleExemptionAttributes reason(String reason) {
this.reason = reason;
return this;
Expand All @@ -107,6 +164,21 @@ public void setReason(String reason) {
this.reason = reason;
}

/**
* Indicates whether <code>estimated_change_in_volume</code> is available and, if not, why. <code>
* ok</code> indicates a fresh estimate. <code>unindexed_tags</code> indicates that the matching
* rule uses tags that are not indexed for the metric. <code>unavailable</code> indicates that the
* estimate is stale, was not computed, or could not be retrieved.
*
* @return volumeStatus
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_VOLUME_STATUS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public TagIndexingRuleExemptionVolumeStatus getVolumeStatus() {
return volumeStatus;
}

/**
* A container for additional, undeclared properties. This is a holder for any undeclared
* properties as specified with the 'additionalProperties' keyword in the OAS document.
Expand Down Expand Up @@ -166,15 +238,29 @@ public boolean equals(Object o) {
(TagIndexingRuleExemptionAttributes) o;
return Objects.equals(this.createdAt, tagIndexingRuleExemptionAttributes.createdAt)
&& Objects.equals(this.createdByHandle, tagIndexingRuleExemptionAttributes.createdByHandle)
&& Objects.equals(
this.estimatedChangeInVolume,
tagIndexingRuleExemptionAttributes.estimatedChangeInVolume)
&& Objects.equals(this.kind, tagIndexingRuleExemptionAttributes.kind)
&& Objects.equals(
this.missingIndexedTags, tagIndexingRuleExemptionAttributes.missingIndexedTags)
&& Objects.equals(this.reason, tagIndexingRuleExemptionAttributes.reason)
&& Objects.equals(this.volumeStatus, tagIndexingRuleExemptionAttributes.volumeStatus)
&& Objects.equals(
this.additionalProperties, tagIndexingRuleExemptionAttributes.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(createdAt, createdByHandle, kind, reason, additionalProperties);
return Objects.hash(
createdAt,
createdByHandle,
estimatedChangeInVolume,
kind,
missingIndexedTags,
reason,
volumeStatus,
additionalProperties);
}

@Override
Expand All @@ -183,8 +269,13 @@ public String toString() {
sb.append("class TagIndexingRuleExemptionAttributes {\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" createdByHandle: ").append(toIndentedString(createdByHandle)).append("\n");
sb.append(" estimatedChangeInVolume: ")
.append(toIndentedString(estimatedChangeInVolume))
.append("\n");
sb.append(" kind: ").append(toIndentedString(kind)).append("\n");
sb.append(" missingIndexedTags: ").append(toIndentedString(missingIndexedTags)).append("\n");
sb.append(" reason: ").append(toIndentedString(reason)).append("\n");
sb.append(" volumeStatus: ").append(toIndentedString(volumeStatus)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
.append("\n");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* 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;

/**
* Indicates whether <code>estimated_change_in_volume</code> is available and, if not, why. <code>ok
* </code> indicates a fresh estimate. <code>unindexed_tags</code> indicates that the matching rule
* uses tags that are not indexed for the metric. <code>unavailable</code> indicates that the
* estimate is stale, was not computed, or could not be retrieved.
*/
@JsonSerialize(
using =
TagIndexingRuleExemptionVolumeStatus.TagIndexingRuleExemptionVolumeStatusSerializer.class)
public class TagIndexingRuleExemptionVolumeStatus extends ModelEnum<String> {

private static final Set<String> allowedValues =
new HashSet<String>(Arrays.asList("ok", "unindexed_tags", "unavailable"));

public static final TagIndexingRuleExemptionVolumeStatus OK =
new TagIndexingRuleExemptionVolumeStatus("ok");
public static final TagIndexingRuleExemptionVolumeStatus UNINDEXED_TAGS =
new TagIndexingRuleExemptionVolumeStatus("unindexed_tags");
public static final TagIndexingRuleExemptionVolumeStatus UNAVAILABLE =
new TagIndexingRuleExemptionVolumeStatus("unavailable");

TagIndexingRuleExemptionVolumeStatus(String value) {
super(value, allowedValues);
}

public static class TagIndexingRuleExemptionVolumeStatusSerializer
extends StdSerializer<TagIndexingRuleExemptionVolumeStatus> {
public TagIndexingRuleExemptionVolumeStatusSerializer(
Class<TagIndexingRuleExemptionVolumeStatus> t) {
super(t);
}

public TagIndexingRuleExemptionVolumeStatusSerializer() {
this(null);
}

@Override
public void serialize(
TagIndexingRuleExemptionVolumeStatus value, JsonGenerator jgen, SerializerProvider provider)
throws IOException, JsonProcessingException {
jgen.writeObject(value.value);
}
}

@JsonCreator
public static TagIndexingRuleExemptionVolumeStatus fromValue(String value) {
return new TagIndexingRuleExemptionVolumeStatus(value);
}
}
Loading