Skip to content

Commit 02d3234

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Support decimal sample_rate for RUM retention filters (#3310)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 08bc435 commit 02d3234

File tree

6 files changed

+23
-23
lines changed

6 files changed

+23
-23
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47336,12 +47336,12 @@ components:
4733647336
$ref: '#/components/schemas/RumRetentionFilterData'
4733747337
type: object
4733847338
RumRetentionFilterSampleRate:
47339-
description: The sample rate for a RUM retention filter, between 0 and 100.
47340-
example: 25
47341-
format: int64
47339+
description: The sample rate for a RUM retention filter, between 0.1 and 100.
47340+
example: 50.5
47341+
format: double
4734247342
maximum: 100
47343-
minimum: 0
47344-
type: integer
47343+
minimum: 0.1
47344+
type: number
4734547345
RumRetentionFilterType:
4734647346
default: retention_filters
4734747347
description: The type of the resource. The value should always be retention_filters.

examples/v2/rum-retention-filters/CreateRetentionFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static void main(String[] args) {
2525
.name("Test creating retention filter")
2626
.eventType(RumRetentionFilterEventType.SESSION)
2727
.query("custom_query")
28-
.sampleRate(50L)
28+
.sampleRate(50.0)
2929
.enabled(true)));
3030

3131
try {

examples/v2/rum-retention-filters/UpdateRetentionFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public static void main(String[] args) {
2626
.name("Test updating retention filter")
2727
.eventType(RumRetentionFilterEventType.VIEW)
2828
.query("view_query")
29-
.sampleRate(100L)
29+
.sampleRate(100.0)
3030
.enabled(true)));
3131

3232
try {

src/main/java/com/datadog/api/client/v2/model/RumRetentionFilterAttributes.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class RumRetentionFilterAttributes {
4141
private String query;
4242

4343
public static final String JSON_PROPERTY_SAMPLE_RATE = "sample_rate";
44-
private Long sampleRate;
44+
private Double sampleRate;
4545

4646
public RumRetentionFilterAttributes enabled(Boolean enabled) {
4747
this.enabled = enabled;
@@ -131,24 +131,24 @@ public void setQuery(String query) {
131131
this.query = query;
132132
}
133133

134-
public RumRetentionFilterAttributes sampleRate(Long sampleRate) {
134+
public RumRetentionFilterAttributes sampleRate(Double sampleRate) {
135135
this.sampleRate = sampleRate;
136136
return this;
137137
}
138138

139139
/**
140-
* The sample rate for a RUM retention filter, between 0 and 100. minimum: 0 maximum: 100
140+
* The sample rate for a RUM retention filter, between 0.1 and 100. minimum: 0.1 maximum: 100
141141
*
142142
* @return sampleRate
143143
*/
144144
@jakarta.annotation.Nullable
145145
@JsonProperty(JSON_PROPERTY_SAMPLE_RATE)
146146
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
147-
public Long getSampleRate() {
147+
public Double getSampleRate() {
148148
return sampleRate;
149149
}
150150

151-
public void setSampleRate(Long sampleRate) {
151+
public void setSampleRate(Double sampleRate) {
152152
this.sampleRate = sampleRate;
153153
}
154154

src/main/java/com/datadog/api/client/v2/model/RumRetentionFilterCreateAttributes.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public class RumRetentionFilterCreateAttributes {
4242
private String query;
4343

4444
public static final String JSON_PROPERTY_SAMPLE_RATE = "sample_rate";
45-
private Long sampleRate;
45+
private Double sampleRate;
4646

4747
public RumRetentionFilterCreateAttributes() {}
4848

@@ -51,7 +51,7 @@ public RumRetentionFilterCreateAttributes(
5151
@JsonProperty(required = true, value = JSON_PROPERTY_EVENT_TYPE)
5252
RumRetentionFilterEventType eventType,
5353
@JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name,
54-
@JsonProperty(required = true, value = JSON_PROPERTY_SAMPLE_RATE) Long sampleRate) {
54+
@JsonProperty(required = true, value = JSON_PROPERTY_SAMPLE_RATE) Double sampleRate) {
5555
this.eventType = eventType;
5656
this.unparsed |= !eventType.isValid();
5757
this.name = name;
@@ -144,23 +144,23 @@ public void setQuery(String query) {
144144
this.query = query;
145145
}
146146

147-
public RumRetentionFilterCreateAttributes sampleRate(Long sampleRate) {
147+
public RumRetentionFilterCreateAttributes sampleRate(Double sampleRate) {
148148
this.sampleRate = sampleRate;
149149
return this;
150150
}
151151

152152
/**
153-
* The sample rate for a RUM retention filter, between 0 and 100. minimum: 0 maximum: 100
153+
* The sample rate for a RUM retention filter, between 0.1 and 100. minimum: 0.1 maximum: 100
154154
*
155155
* @return sampleRate
156156
*/
157157
@JsonProperty(JSON_PROPERTY_SAMPLE_RATE)
158158
@JsonInclude(value = JsonInclude.Include.ALWAYS)
159-
public Long getSampleRate() {
159+
public Double getSampleRate() {
160160
return sampleRate;
161161
}
162162

163-
public void setSampleRate(Long sampleRate) {
163+
public void setSampleRate(Double sampleRate) {
164164
this.sampleRate = sampleRate;
165165
}
166166

src/main/java/com/datadog/api/client/v2/model/RumRetentionFilterUpdateAttributes.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class RumRetentionFilterUpdateAttributes {
4141
private String query;
4242

4343
public static final String JSON_PROPERTY_SAMPLE_RATE = "sample_rate";
44-
private Long sampleRate;
44+
private Double sampleRate;
4545

4646
public RumRetentionFilterUpdateAttributes enabled(Boolean enabled) {
4747
this.enabled = enabled;
@@ -131,24 +131,24 @@ public void setQuery(String query) {
131131
this.query = query;
132132
}
133133

134-
public RumRetentionFilterUpdateAttributes sampleRate(Long sampleRate) {
134+
public RumRetentionFilterUpdateAttributes sampleRate(Double sampleRate) {
135135
this.sampleRate = sampleRate;
136136
return this;
137137
}
138138

139139
/**
140-
* The sample rate for a RUM retention filter, between 0 and 100. minimum: 0 maximum: 100
140+
* The sample rate for a RUM retention filter, between 0.1 and 100. minimum: 0.1 maximum: 100
141141
*
142142
* @return sampleRate
143143
*/
144144
@jakarta.annotation.Nullable
145145
@JsonProperty(JSON_PROPERTY_SAMPLE_RATE)
146146
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
147-
public Long getSampleRate() {
147+
public Double getSampleRate() {
148148
return sampleRate;
149149
}
150150

151-
public void setSampleRate(Long sampleRate) {
151+
public void setSampleRate(Double sampleRate) {
152152
this.sampleRate = sampleRate;
153153
}
154154

0 commit comments

Comments
 (0)