Skip to content

Commit 4ed5075

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Fix downtimes v2 schema and add missing field canceled (#1568)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 99554e1 commit 4ed5075

File tree

3 files changed

+34
-20
lines changed

3 files changed

+34
-20
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.5",
7-
"regenerated": "2023-07-10 14:14:46.515708",
8-
"spec_repo_commit": "19d6892e"
7+
"regenerated": "2023-07-10 14:43:41.796864",
8+
"spec_repo_commit": "96fb94b8"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.5",
12-
"regenerated": "2023-07-10 14:14:46.590885",
13-
"spec_repo_commit": "19d6892e"
12+
"regenerated": "2023-07-10 14:43:41.894242",
13+
"spec_repo_commit": "96fb94b8"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3974,7 +3974,13 @@ components:
39743974
DowntimeResponseAttributes:
39753975
description: Downtime details.
39763976
properties:
3977-
created_at:
3977+
canceled:
3978+
description: Time that the downtime was canceled.
3979+
example: 2020-01-02T03:04:05.282979+0000
3980+
format: date-time
3981+
nullable: true
3982+
type: string
3983+
created:
39783984
description: Creation time of the downtime.
39793985
example: 2020-01-02T03:04:05.282979+0000
39803986
format: date-time
@@ -3983,7 +3989,7 @@ components:
39833989
$ref: '#/components/schemas/DowntimeDisplayTimezone'
39843990
message:
39853991
$ref: '#/components/schemas/DowntimeMessage'
3986-
modified_at:
3992+
modified:
39873993
description: Time that the downtime was last modified.
39883994
example: 2020-01-02T03:04:05.282979+0000
39893995
format: date-time

src/datadog_api_client/v2/model/downtime_response_attributes.py

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@ def openapi_types(_):
3737
from datadog_api_client.v2.model.downtime_status import DowntimeStatus
3838

3939
return {
40-
"created_at": (datetime,),
40+
"canceled": (datetime, none_type),
41+
"created": (datetime,),
4142
"display_timezone": (str,),
4243
"message": (str,),
43-
"modified_at": (datetime,),
44+
"modified": (datetime,),
4445
"monitor_identifier": (DowntimeMonitorIdentifier,),
4546
"mute_first_recovery_notification": (bool,),
4647
"notify_end_states": ([DowntimeNotifyEndStateTypes],),
@@ -51,10 +52,11 @@ def openapi_types(_):
5152
}
5253

5354
attribute_map = {
54-
"created_at": "created_at",
55+
"canceled": "canceled",
56+
"created": "created",
5557
"display_timezone": "display_timezone",
5658
"message": "message",
57-
"modified_at": "modified_at",
59+
"modified": "modified",
5860
"monitor_identifier": "monitor_identifier",
5961
"mute_first_recovery_notification": "mute_first_recovery_notification",
6062
"notify_end_states": "notify_end_states",
@@ -66,10 +68,11 @@ def openapi_types(_):
6668

6769
def __init__(
6870
self_,
69-
created_at: Union[datetime, UnsetType] = unset,
71+
canceled: Union[datetime, none_type, UnsetType] = unset,
72+
created: Union[datetime, UnsetType] = unset,
7073
display_timezone: Union[str, none_type, UnsetType] = unset,
7174
message: Union[str, none_type, UnsetType] = unset,
72-
modified_at: Union[datetime, UnsetType] = unset,
75+
modified: Union[datetime, UnsetType] = unset,
7376
monitor_identifier: Union[
7477
DowntimeMonitorIdentifier, DowntimeMonitorIdentifierId, DowntimeMonitorIdentifierTags, UnsetType
7578
] = unset,
@@ -86,8 +89,11 @@ def __init__(
8689
"""
8790
Downtime details.
8891
89-
:param created_at: Creation time of the downtime.
90-
:type created_at: datetime, optional
92+
:param canceled: Time that the downtime was canceled.
93+
:type canceled: datetime, none_type, optional
94+
95+
:param created: Creation time of the downtime.
96+
:type created: datetime, optional
9197
9298
:param display_timezone: The timezone in which to display the downtime's start and end times in Datadog applications. This is not used
9399
as an offset for scheduling.
@@ -97,8 +103,8 @@ def __init__(
97103
by using the same ``@username`` notation as events.
98104
:type message: str, none_type, optional
99105
100-
:param modified_at: Time that the downtime was last modified.
101-
:type modified_at: datetime, optional
106+
:param modified: Time that the downtime was last modified.
107+
:type modified: datetime, optional
102108
103109
:param monitor_identifier: Monitor identifier for the downtime.
104110
:type monitor_identifier: DowntimeMonitorIdentifier, optional
@@ -123,14 +129,16 @@ def __init__(
123129
:param status: The current status of the downtime.
124130
:type status: DowntimeStatus, optional
125131
"""
126-
if created_at is not unset:
127-
kwargs["created_at"] = created_at
132+
if canceled is not unset:
133+
kwargs["canceled"] = canceled
134+
if created is not unset:
135+
kwargs["created"] = created
128136
if display_timezone is not unset:
129137
kwargs["display_timezone"] = display_timezone
130138
if message is not unset:
131139
kwargs["message"] = message
132-
if modified_at is not unset:
133-
kwargs["modified_at"] = modified_at
140+
if modified is not unset:
141+
kwargs["modified"] = modified
134142
if monitor_identifier is not unset:
135143
kwargs["monitor_identifier"] = monitor_identifier
136144
if mute_first_recovery_notification is not unset:

0 commit comments

Comments
 (0)