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 @@ -8,6 +8,7 @@
from datadog_api_client.v2.model.rum_retention_filter_create_data import RumRetentionFilterCreateData
from datadog_api_client.v2.model.rum_retention_filter_create_request import RumRetentionFilterCreateRequest
from datadog_api_client.v2.model.rum_retention_filter_event_type import RumRetentionFilterEventType
from datadog_api_client.v2.model.rum_retention_filter_sample_rate import RumRetentionFilterSampleRate
from datadog_api_client.v2.model.rum_retention_filter_type import RumRetentionFilterType

body = RumRetentionFilterCreateRequest(
Expand All @@ -17,7 +18,7 @@
name="Test creating retention filter",
event_type=RumRetentionFilterEventType.SESSION,
query="custom_query",
sample_rate=50,
sample_rate=RumRetentionFilterSampleRate(50.0),
enabled=True,
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.rum_retention_filters_api import RumRetentionFiltersApi
from datadog_api_client.v2.model.rum_retention_filter_event_type import RumRetentionFilterEventType
from datadog_api_client.v2.model.rum_retention_filter_sample_rate import RumRetentionFilterSampleRate
from datadog_api_client.v2.model.rum_retention_filter_type import RumRetentionFilterType
from datadog_api_client.v2.model.rum_retention_filter_update_attributes import RumRetentionFilterUpdateAttributes
from datadog_api_client.v2.model.rum_retention_filter_update_data import RumRetentionFilterUpdateData
Expand All @@ -18,7 +19,7 @@
name="Test updating retention filter",
event_type=RumRetentionFilterEventType.VIEW,
query="view_query",
sample_rate=100,
sample_rate=RumRetentionFilterSampleRate(100.0),
enabled=True,
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class RumRetentionFilterAttributes(ModelNormal):
validations = {
"sample_rate": {
"inclusive_maximum": 100,
"inclusive_minimum": 0,
"inclusive_minimum": 0.1,
},
}

Expand All @@ -34,7 +34,7 @@ def openapi_types(_):
"event_type": (RumRetentionFilterEventType,),
"name": (str,),
"query": (str,),
"sample_rate": (int,),
"sample_rate": (float,),
}

attribute_map = {
Expand All @@ -51,7 +51,7 @@ def __init__(
event_type: Union[RumRetentionFilterEventType, UnsetType] = unset,
name: Union[str, UnsetType] = unset,
query: Union[str, UnsetType] = unset,
sample_rate: Union[int, UnsetType] = unset,
sample_rate: Union[float, UnsetType] = unset,
**kwargs,
):
"""
Expand All @@ -69,8 +69,8 @@ def __init__(
:param query: The query string for a RUM retention filter.
:type query: str, optional

:param sample_rate: The sample rate for a RUM retention filter, between 0 and 100.
:type sample_rate: int, optional
:param sample_rate: The sample rate for a RUM retention filter, between 0.1 and 100.
:type sample_rate: float, optional
"""
if enabled is not unset:
kwargs["enabled"] = enabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class RumRetentionFilterCreateAttributes(ModelNormal):
validations = {
"sample_rate": {
"inclusive_maximum": 100,
"inclusive_minimum": 0,
"inclusive_minimum": 0.1,
},
}

Expand All @@ -34,7 +34,7 @@ def openapi_types(_):
"event_type": (RumRetentionFilterEventType,),
"name": (str,),
"query": (str,),
"sample_rate": (int,),
"sample_rate": (float,),
}

attribute_map = {
Expand All @@ -49,7 +49,7 @@ def __init__(
self_,
event_type: RumRetentionFilterEventType,
name: str,
sample_rate: int,
sample_rate: float,
enabled: Union[bool, UnsetType] = unset,
query: Union[str, UnsetType] = unset,
**kwargs,
Expand All @@ -69,8 +69,8 @@ def __init__(
:param query: The query string for a RUM retention filter.
:type query: str, optional

:param sample_rate: The sample rate for a RUM retention filter, between 0 and 100.
:type sample_rate: int
:param sample_rate: The sample rate for a RUM retention filter, between 0.1 and 100.
:type sample_rate: float
"""
if enabled is not unset:
kwargs["enabled"] = enabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class RumRetentionFilterUpdateAttributes(ModelNormal):
validations = {
"sample_rate": {
"inclusive_maximum": 100,
"inclusive_minimum": 0,
"inclusive_minimum": 0.1,
},
}

Expand All @@ -34,7 +34,7 @@ def openapi_types(_):
"event_type": (RumRetentionFilterEventType,),
"name": (str,),
"query": (str,),
"sample_rate": (int,),
"sample_rate": (float,),
}

attribute_map = {
Expand All @@ -51,7 +51,7 @@ def __init__(
event_type: Union[RumRetentionFilterEventType, UnsetType] = unset,
name: Union[str, UnsetType] = unset,
query: Union[str, UnsetType] = unset,
sample_rate: Union[int, UnsetType] = unset,
sample_rate: Union[float, UnsetType] = unset,
**kwargs,
):
"""
Expand All @@ -69,8 +69,8 @@ def __init__(
:param query: The query string for a RUM retention filter.
:type query: str, optional

:param sample_rate: The sample rate for a RUM retention filter, between 0 and 100.
:type sample_rate: int, optional
:param sample_rate: The sample rate for a RUM retention filter, between 0.1 and 100.
:type sample_rate: float, optional
"""
if enabled is not unset:
kwargs["enabled"] = enabled
Expand Down
Loading