Skip to content

Commit 7169fbd

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 0895ae7 of spec repo (#3572)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent c3d788f commit 7169fbd

12 files changed

Lines changed: 444 additions & 11 deletions

.generator/schemas/v1/openapi.yaml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,6 +1345,50 @@ components:
13451345
type: string
13461346
x-enum-varnames:
13471347
- COHORT
1348+
ComparisonCustomTimeframe:
1349+
description: Fixed time range for a `custom_timeframe` comparison.
1350+
properties:
1351+
from:
1352+
description: Start time in milliseconds since epoch.
1353+
example: 1779290190000
1354+
format: int64
1355+
type: integer
1356+
to:
1357+
description: End time in milliseconds since epoch.
1358+
example: 1779894990000
1359+
format: int64
1360+
type: integer
1361+
required:
1362+
- from
1363+
- to
1364+
type: object
1365+
ComparisonDuration:
1366+
description: The comparison period. Use a preset `type` value or set `type` to `custom_timeframe` and provide `custom_timeframe` with explicit millisecond epoch bounds.
1367+
properties:
1368+
custom_timeframe:
1369+
$ref: "#/components/schemas/ComparisonCustomTimeframe"
1370+
description: Required when `type` is `custom_timeframe`. Fixed time range to compare against.
1371+
type:
1372+
$ref: "#/components/schemas/ComparisonDurationType"
1373+
required:
1374+
- type
1375+
type: object
1376+
ComparisonDurationType:
1377+
description: "The comparison window type."
1378+
enum:
1379+
- previous_timeframe
1380+
- custom_timeframe
1381+
- previous_day
1382+
- previous_week
1383+
- previous_month
1384+
example: previous_timeframe
1385+
type: string
1386+
x-enum-varnames:
1387+
- PREVIOUS_TIMEFRAME
1388+
- CUSTOM_TIMEFRAME
1389+
- PREVIOUS_DAY
1390+
- PREVIOUS_WEEK
1391+
- PREVIOUS_MONTH
13481392
ContentEncoding:
13491393
description: HTTP header used to compress the media-type.
13501394
enum:
@@ -12064,6 +12108,43 @@ components:
1206412108
x-enum-varnames:
1206512109
- ASC
1206612110
- DESC
12111+
QueryValueWidgetComparison:
12112+
description: A change indicator that compares the current value to a historical period.
12113+
properties:
12114+
directionality:
12115+
$ref: "#/components/schemas/QueryValueWidgetComparisonDirectionality"
12116+
description: Which direction of change is considered an improvement, determining the indicator color.
12117+
duration:
12118+
$ref: "#/components/schemas/ComparisonDuration"
12119+
type:
12120+
$ref: "#/components/schemas/QueryValueWidgetComparisonType"
12121+
required:
12122+
- duration
12123+
type: object
12124+
QueryValueWidgetComparisonDirectionality:
12125+
default: neutral
12126+
description: "Color-coding direction: `increase_better` (green on rise), `decrease_better` (green on drop), or `neutral` (no color)."
12127+
enum:
12128+
- increase_better
12129+
- decrease_better
12130+
- neutral
12131+
type: string
12132+
x-enum-varnames:
12133+
- INCREASE_BETTER
12134+
- DECREASE_BETTER
12135+
- NEUTRAL
12136+
QueryValueWidgetComparisonType:
12137+
default: absolute
12138+
description: "How the delta is expressed: `absolute` (raw difference), `relative` (percentage), or `both`."
12139+
enum:
12140+
- absolute
12141+
- relative
12142+
- both
12143+
type: string
12144+
x-enum-varnames:
12145+
- ABSOLUTE
12146+
- RELATIVE
12147+
- BOTH
1206712148
QueryValueWidgetDefinition:
1206812149
description: Query values display the current value of a given metric, APM, or log query.
1206912150
properties:
@@ -12135,6 +12216,9 @@ components:
1213512216
$ref: "#/components/schemas/LogQueryDefinition"
1213612217
deprecated: true
1213712218
description: Deprecated - Use `queries` and `formulas` instead.
12219+
comparison:
12220+
$ref: "#/components/schemas/QueryValueWidgetComparison"
12221+
description: Displays a change indicator showing a delta against a historical baseline.
1213812222
conditional_formats:
1213912223
description: List of conditional formats.
1214012224
items:

.generator/schemas/v2/openapi.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66681,9 +66681,6 @@ components:
6668166681
filter:
6668266682
description: Filter expression applied to the recommendations.
6668366683
type: string
66684-
scope:
66685-
description: Recommendations scope. Defaults to `ccm`; use `experiment` for experimental recommendations or `*` for both.
66686-
type: string
6668766684
sort:
6668866685
description: Ordered list of sort clauses applied to the result set.
6668966686
items:

docs/datadog_api_client.v1.model.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,27 @@ datadog\_api\_client.v1.model.cohort\_widget\_definition\_type module
501501
:members:
502502
:show-inheritance:
503503

504+
datadog\_api\_client.v1.model.comparison\_custom\_timeframe module
505+
------------------------------------------------------------------
506+
507+
.. automodule:: datadog_api_client.v1.model.comparison_custom_timeframe
508+
:members:
509+
:show-inheritance:
510+
511+
datadog\_api\_client.v1.model.comparison\_duration module
512+
---------------------------------------------------------
513+
514+
.. automodule:: datadog_api_client.v1.model.comparison_duration
515+
:members:
516+
:show-inheritance:
517+
518+
datadog\_api\_client.v1.model.comparison\_duration\_type module
519+
---------------------------------------------------------------
520+
521+
.. automodule:: datadog_api_client.v1.model.comparison_duration_type
522+
:members:
523+
:show-inheritance:
524+
504525
datadog\_api\_client.v1.model.content\_encoding module
505526
------------------------------------------------------
506527

@@ -3721,6 +3742,27 @@ datadog\_api\_client.v1.model.query\_sort\_order module
37213742
:members:
37223743
:show-inheritance:
37233744

3745+
datadog\_api\_client.v1.model.query\_value\_widget\_comparison module
3746+
---------------------------------------------------------------------
3747+
3748+
.. automodule:: datadog_api_client.v1.model.query_value_widget_comparison
3749+
:members:
3750+
:show-inheritance:
3751+
3752+
datadog\_api\_client.v1.model.query\_value\_widget\_comparison\_directionality module
3753+
-------------------------------------------------------------------------------------
3754+
3755+
.. automodule:: datadog_api_client.v1.model.query_value_widget_comparison_directionality
3756+
:members:
3757+
:show-inheritance:
3758+
3759+
datadog\_api\_client.v1.model.query\_value\_widget\_comparison\_type module
3760+
---------------------------------------------------------------------------
3761+
3762+
.. automodule:: datadog_api_client.v1.model.query_value_widget_comparison_type
3763+
:members:
3764+
:show-inheritance:
3765+
37243766
datadog\_api\_client.v1.model.query\_value\_widget\_definition module
37253767
---------------------------------------------------------------------
37263768

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
7+
from datadog_api_client.model_utils import (
8+
ModelNormal,
9+
cached_property,
10+
)
11+
12+
13+
class ComparisonCustomTimeframe(ModelNormal):
14+
@cached_property
15+
def openapi_types(_):
16+
return {
17+
"_from": (int,),
18+
"to": (int,),
19+
}
20+
21+
attribute_map = {
22+
"_from": "from",
23+
"to": "to",
24+
}
25+
26+
def __init__(self_, _from: int, to: int, **kwargs):
27+
"""
28+
Fixed time range for a ``custom_timeframe`` comparison.
29+
30+
:param _from: Start time in milliseconds since epoch.
31+
:type _from: int
32+
33+
:param to: End time in milliseconds since epoch.
34+
:type to: int
35+
"""
36+
super().__init__(kwargs)
37+
38+
self_._from = _from
39+
self_.to = to
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import Union, TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
unset,
12+
UnsetType,
13+
)
14+
15+
16+
if TYPE_CHECKING:
17+
from datadog_api_client.v1.model.comparison_custom_timeframe import ComparisonCustomTimeframe
18+
from datadog_api_client.v1.model.comparison_duration_type import ComparisonDurationType
19+
20+
21+
class ComparisonDuration(ModelNormal):
22+
@cached_property
23+
def openapi_types(_):
24+
from datadog_api_client.v1.model.comparison_custom_timeframe import ComparisonCustomTimeframe
25+
from datadog_api_client.v1.model.comparison_duration_type import ComparisonDurationType
26+
27+
return {
28+
"custom_timeframe": (ComparisonCustomTimeframe,),
29+
"type": (ComparisonDurationType,),
30+
}
31+
32+
attribute_map = {
33+
"custom_timeframe": "custom_timeframe",
34+
"type": "type",
35+
}
36+
37+
def __init__(
38+
self_,
39+
type: ComparisonDurationType,
40+
custom_timeframe: Union[ComparisonCustomTimeframe, UnsetType] = unset,
41+
**kwargs,
42+
):
43+
"""
44+
The comparison period. Use a preset ``type`` value or set ``type`` to ``custom_timeframe`` and provide ``custom_timeframe`` with explicit millisecond epoch bounds.
45+
46+
:param custom_timeframe: Fixed time range for a ``custom_timeframe`` comparison.
47+
:type custom_timeframe: ComparisonCustomTimeframe, optional
48+
49+
:param type: The comparison window type.
50+
:type type: ComparisonDurationType
51+
"""
52+
if custom_timeframe is not unset:
53+
kwargs["custom_timeframe"] = custom_timeframe
54+
super().__init__(kwargs)
55+
56+
self_.type = type
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
7+
from datadog_api_client.model_utils import (
8+
ModelSimple,
9+
cached_property,
10+
)
11+
12+
from typing import ClassVar
13+
14+
15+
class ComparisonDurationType(ModelSimple):
16+
"""
17+
The comparison window type.
18+
19+
:param value: Must be one of ["previous_timeframe", "custom_timeframe", "previous_day", "previous_week", "previous_month"].
20+
:type value: str
21+
"""
22+
23+
allowed_values = {
24+
"previous_timeframe",
25+
"custom_timeframe",
26+
"previous_day",
27+
"previous_week",
28+
"previous_month",
29+
}
30+
PREVIOUS_TIMEFRAME: ClassVar["ComparisonDurationType"]
31+
CUSTOM_TIMEFRAME: ClassVar["ComparisonDurationType"]
32+
PREVIOUS_DAY: ClassVar["ComparisonDurationType"]
33+
PREVIOUS_WEEK: ClassVar["ComparisonDurationType"]
34+
PREVIOUS_MONTH: ClassVar["ComparisonDurationType"]
35+
36+
@cached_property
37+
def openapi_types(_):
38+
return {
39+
"value": (str,),
40+
}
41+
42+
43+
ComparisonDurationType.PREVIOUS_TIMEFRAME = ComparisonDurationType("previous_timeframe")
44+
ComparisonDurationType.CUSTOM_TIMEFRAME = ComparisonDurationType("custom_timeframe")
45+
ComparisonDurationType.PREVIOUS_DAY = ComparisonDurationType("previous_day")
46+
ComparisonDurationType.PREVIOUS_WEEK = ComparisonDurationType("previous_week")
47+
ComparisonDurationType.PREVIOUS_MONTH = ComparisonDurationType("previous_month")
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import Union, TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
unset,
12+
UnsetType,
13+
)
14+
15+
16+
if TYPE_CHECKING:
17+
from datadog_api_client.v1.model.query_value_widget_comparison_directionality import (
18+
QueryValueWidgetComparisonDirectionality,
19+
)
20+
from datadog_api_client.v1.model.comparison_duration import ComparisonDuration
21+
from datadog_api_client.v1.model.query_value_widget_comparison_type import QueryValueWidgetComparisonType
22+
23+
24+
class QueryValueWidgetComparison(ModelNormal):
25+
@cached_property
26+
def openapi_types(_):
27+
from datadog_api_client.v1.model.query_value_widget_comparison_directionality import (
28+
QueryValueWidgetComparisonDirectionality,
29+
)
30+
from datadog_api_client.v1.model.comparison_duration import ComparisonDuration
31+
from datadog_api_client.v1.model.query_value_widget_comparison_type import QueryValueWidgetComparisonType
32+
33+
return {
34+
"directionality": (QueryValueWidgetComparisonDirectionality,),
35+
"duration": (ComparisonDuration,),
36+
"type": (QueryValueWidgetComparisonType,),
37+
}
38+
39+
attribute_map = {
40+
"directionality": "directionality",
41+
"duration": "duration",
42+
"type": "type",
43+
}
44+
45+
def __init__(
46+
self_,
47+
duration: ComparisonDuration,
48+
directionality: Union[QueryValueWidgetComparisonDirectionality, UnsetType] = unset,
49+
type: Union[QueryValueWidgetComparisonType, UnsetType] = unset,
50+
**kwargs,
51+
):
52+
"""
53+
A change indicator that compares the current value to a historical period.
54+
55+
:param directionality: Color-coding direction: ``increase_better`` (green on rise), ``decrease_better`` (green on drop), or ``neutral`` (no color).
56+
:type directionality: QueryValueWidgetComparisonDirectionality, optional
57+
58+
:param duration: The comparison period. Use a preset ``type`` value or set ``type`` to ``custom_timeframe`` and provide ``custom_timeframe`` with explicit millisecond epoch bounds.
59+
:type duration: ComparisonDuration
60+
61+
:param type: How the delta is expressed: ``absolute`` (raw difference), ``relative`` (percentage), or ``both``.
62+
:type type: QueryValueWidgetComparisonType, optional
63+
"""
64+
if directionality is not unset:
65+
kwargs["directionality"] = directionality
66+
if type is not unset:
67+
kwargs["type"] = type
68+
super().__init__(kwargs)
69+
70+
self_.duration = duration

0 commit comments

Comments
 (0)