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
10 changes: 5 additions & 5 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45104,12 +45104,12 @@ components:
$ref: '#/components/schemas/RumRetentionFilterData'
type: object
RumRetentionFilterSampleRate:
description: The sample rate for a RUM retention filter, between 0 and 100.
example: 25
format: int64
description: The sample rate for a RUM retention filter, between 0.1 and 100.
example: 50.5
format: double
maximum: 100
minimum: 0
type: integer
minimum: 0.1
type: number
RumRetentionFilterType:
default: retention_filters
description: The type of the resource. The value should always be retention_filters.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async fn main() {
RumRetentionFilterCreateAttributes::new(
RumRetentionFilterEventType::SESSION,
"Test creating retention filter".to_string(),
50,
50.0,
)
.enabled(true)
.query("custom_query".to_string()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async fn main() {
.event_type(RumRetentionFilterEventType::VIEW)
.name("Test updating retention filter".to_string())
.query("view_query".to_string())
.sample_rate(100),
.sample_rate(100.0 as f64),
"4b95d361-f65d-4515-9824-c9aaeba5ac2a".to_string(),
RumRetentionFilterType::RETENTION_FILTERS,
));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ pub struct RumRetentionFilterAttributes {
/// The query string for a RUM retention filter.
#[serde(rename = "query")]
pub query: Option<String>,
/// The sample rate for a RUM retention filter, between 0 and 100.
/// The sample rate for a RUM retention filter, between 0.1 and 100.
#[serde(rename = "sample_rate")]
pub sample_rate: Option<i64>,
pub sample_rate: Option<f64>,
#[serde(flatten)]
pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
#[serde(skip)]
Expand Down Expand Up @@ -69,7 +69,7 @@ impl RumRetentionFilterAttributes {
self
}

pub fn sample_rate(mut self, value: i64) -> Self {
pub fn sample_rate(mut self, value: f64) -> Self {
self.sample_rate = Some(value);
self
}
Expand Down Expand Up @@ -111,7 +111,7 @@ impl<'de> Deserialize<'de> for RumRetentionFilterAttributes {
None;
let mut name: Option<String> = None;
let mut query: Option<String> = None;
let mut sample_rate: Option<i64> = None;
let mut sample_rate: Option<f64> = None;
let mut additional_properties: std::collections::BTreeMap<
String,
serde_json::Value,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ pub struct RumRetentionFilterCreateAttributes {
/// The query string for a RUM retention filter.
#[serde(rename = "query")]
pub query: Option<String>,
/// The sample rate for a RUM retention filter, between 0 and 100.
/// The sample rate for a RUM retention filter, between 0.1 and 100.
#[serde(rename = "sample_rate")]
pub sample_rate: i64,
pub sample_rate: f64,
#[serde(flatten)]
pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
#[serde(skip)]
Expand All @@ -37,7 +37,7 @@ impl RumRetentionFilterCreateAttributes {
pub fn new(
event_type: crate::datadogV2::model::RumRetentionFilterEventType,
name: String,
sample_rate: i64,
sample_rate: f64,
) -> RumRetentionFilterCreateAttributes {
RumRetentionFilterCreateAttributes {
enabled: None,
Expand Down Expand Up @@ -91,7 +91,7 @@ impl<'de> Deserialize<'de> for RumRetentionFilterCreateAttributes {
None;
let mut name: Option<String> = None;
let mut query: Option<String> = None;
let mut sample_rate: Option<i64> = None;
let mut sample_rate: Option<f64> = None;
let mut additional_properties: std::collections::BTreeMap<
String,
serde_json::Value,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ pub struct RumRetentionFilterUpdateAttributes {
/// The query string for a RUM retention filter.
#[serde(rename = "query")]
pub query: Option<String>,
/// The sample rate for a RUM retention filter, between 0 and 100.
/// The sample rate for a RUM retention filter, between 0.1 and 100.
#[serde(rename = "sample_rate")]
pub sample_rate: Option<i64>,
pub sample_rate: Option<f64>,
#[serde(flatten)]
pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
#[serde(skip)]
Expand Down Expand Up @@ -69,7 +69,7 @@ impl RumRetentionFilterUpdateAttributes {
self
}

pub fn sample_rate(mut self, value: i64) -> Self {
pub fn sample_rate(mut self, value: f64) -> Self {
self.sample_rate = Some(value);
self
}
Expand Down Expand Up @@ -111,7 +111,7 @@ impl<'de> Deserialize<'de> for RumRetentionFilterUpdateAttributes {
None;
let mut name: Option<String> = None;
let mut query: Option<String> = None;
let mut sample_rate: Option<i64> = None;
let mut sample_rate: Option<f64> = None;
let mut additional_properties: std::collections::BTreeMap<
String,
serde_json::Value,
Expand Down
Loading