Skip to content

Commit 16b3b95

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
[STTSPG-987] Add 'required' label to Maintenance Attributes for Status Pages (#3444)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 1fb5092 commit 16b3b95

2 files changed

Lines changed: 26 additions & 23 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16546,10 +16546,12 @@ components:
1654616546
properties:
1654716547
completed_date:
1654816548
description: Timestamp of when the maintenance was completed.
16549+
example: "2026-02-18T19:51:13.332360075Z"
1654916550
format: date-time
1655016551
type: string
1655116552
completed_description:
1655216553
description: The description shown when the maintenance is completed.
16554+
example: "We have completed maintenance on the API to improve performance."
1655316555
type: string
1655416556
components_affected:
1655516557
description: The components affected by the maintenance.
@@ -16558,12 +16560,15 @@ components:
1655816560
type: array
1655916561
in_progress_description:
1656016562
description: The description shown while the maintenance is in progress.
16563+
example: "We are currently performing maintenance on the API to improve performance."
1656116564
type: string
1656216565
scheduled_description:
1656316566
description: The description shown when the maintenance is scheduled.
16567+
example: "We will be performing maintenance on the API to improve performance."
1656416568
type: string
1656516569
start_date:
1656616570
description: Timestamp of when the maintenance is scheduled to start.
16571+
example: "2026-02-18T19:21:13.332360075Z"
1656716572
format: date-time
1656816573
type: string
1656916574
title:
@@ -16573,6 +16578,11 @@ components:
1657316578
required:
1657416579
- components_affected
1657516580
- title
16581+
- completed_date
16582+
- completed_description
16583+
- scheduled_description
16584+
- start_date
16585+
- in_progress_description
1657616586
type: object
1657716587
CreateMaintenanceRequestDataAttributesComponentsAffectedItems:
1657816588
description: A component affected by a maintenance.

src/datadog_api_client/v2/model/create_maintenance_request_data_attributes.py

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@
33
# Copyright 2019-Present Datadog, Inc.
44
from __future__ import annotations
55

6-
from typing import List, Union, TYPE_CHECKING
6+
from typing import List, TYPE_CHECKING
77

88
from datadog_api_client.model_utils import (
99
ModelNormal,
1010
cached_property,
1111
datetime,
12-
unset,
13-
UnsetType,
1412
)
1513

1614

@@ -49,50 +47,45 @@ def openapi_types(_):
4947

5048
def __init__(
5149
self_,
50+
completed_date: datetime,
51+
completed_description: str,
5252
components_affected: List[CreateMaintenanceRequestDataAttributesComponentsAffectedItems],
53+
in_progress_description: str,
54+
scheduled_description: str,
55+
start_date: datetime,
5356
title: str,
54-
completed_date: Union[datetime, UnsetType] = unset,
55-
completed_description: Union[str, UnsetType] = unset,
56-
in_progress_description: Union[str, UnsetType] = unset,
57-
scheduled_description: Union[str, UnsetType] = unset,
58-
start_date: Union[datetime, UnsetType] = unset,
5957
**kwargs,
6058
):
6159
"""
6260
The supported attributes for creating a maintenance.
6361
6462
:param completed_date: Timestamp of when the maintenance was completed.
65-
:type completed_date: datetime, optional
63+
:type completed_date: datetime
6664
6765
:param completed_description: The description shown when the maintenance is completed.
68-
:type completed_description: str, optional
66+
:type completed_description: str
6967
7068
:param components_affected: The components affected by the maintenance.
7169
:type components_affected: [CreateMaintenanceRequestDataAttributesComponentsAffectedItems]
7270
7371
:param in_progress_description: The description shown while the maintenance is in progress.
74-
:type in_progress_description: str, optional
72+
:type in_progress_description: str
7573
7674
:param scheduled_description: The description shown when the maintenance is scheduled.
77-
:type scheduled_description: str, optional
75+
:type scheduled_description: str
7876
7977
:param start_date: Timestamp of when the maintenance is scheduled to start.
80-
:type start_date: datetime, optional
78+
:type start_date: datetime
8179
8280
:param title: The title of the maintenance.
8381
:type title: str
8482
"""
85-
if completed_date is not unset:
86-
kwargs["completed_date"] = completed_date
87-
if completed_description is not unset:
88-
kwargs["completed_description"] = completed_description
89-
if in_progress_description is not unset:
90-
kwargs["in_progress_description"] = in_progress_description
91-
if scheduled_description is not unset:
92-
kwargs["scheduled_description"] = scheduled_description
93-
if start_date is not unset:
94-
kwargs["start_date"] = start_date
9583
super().__init__(kwargs)
9684

85+
self_.completed_date = completed_date
86+
self_.completed_description = completed_description
9787
self_.components_affected = components_affected
88+
self_.in_progress_description = in_progress_description
89+
self_.scheduled_description = scheduled_description
90+
self_.start_date = start_date
9891
self_.title = title

0 commit comments

Comments
 (0)