Skip to content

Commit 502ff79

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Set required properties for schedules in OnCall API (#2512)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 1a95681 commit 502ff79

18 files changed

+146
-158
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.6",
7-
"regenerated": "2025-04-16 20:33:00.160092",
8-
"spec_repo_commit": "9708d631"
7+
"regenerated": "2025-04-17 13:26:11.571880",
8+
"spec_repo_commit": "12ab5180"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-16 20:33:00.267234",
13-
"spec_repo_commit": "9708d631"
12+
"regenerated": "2025-04-17 13:26:11.587151",
13+
"spec_repo_commit": "12ab5180"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18206,6 +18206,8 @@ components:
1820618206
$ref: '#/components/schemas/LayerRelationships'
1820718207
type:
1820818208
$ref: '#/components/schemas/LayerType'
18209+
required:
18210+
- type
1820918211
type: object
1821018212
LayerAttributes:
1821118213
description: Describes key properties of a Layer, including rotation details,
@@ -18339,12 +18341,16 @@ components:
1833918341
type: string
1834018342
type:
1834118343
$ref: '#/components/schemas/LayerRelationshipsMembersDataItemsType'
18344+
required:
18345+
- type
18346+
- id
1834218347
type: object
1834318348
LayerRelationshipsMembersDataItemsType:
1834418349
default: members
1834518350
description: Members resource type.
1834618351
enum:
1834718352
- members
18353+
example: members
1834818354
type: string
1834918355
x-enum-varnames:
1835018356
- MEMBERS
@@ -18353,6 +18359,7 @@ components:
1835318359
description: Layers resource type.
1835418360
enum:
1835518361
- layers
18362+
example: layers
1835618363
type: string
1835718364
x-enum-varnames:
1835818365
- LAYERS
@@ -28179,15 +28186,20 @@ components:
2817928186
properties:
2818028187
id:
2818128188
description: A unique identifier for the team.
28189+
example: ''
2818228190
type: string
2818328191
type:
2818428192
$ref: '#/components/schemas/ScheduleCreateRequestDataRelationshipsTeamsDataItemsType'
28193+
required:
28194+
- type
28195+
- id
2818528196
type: object
2818628197
ScheduleCreateRequestDataRelationshipsTeamsDataItemsType:
2818728198
default: teams
2818828199
description: Teams resource type.
2818928200
enum:
2819028201
- teams
28202+
example: teams
2819128203
type: string
2819228204
x-enum-varnames:
2819328205
- TEAMS
@@ -28214,6 +28226,8 @@ components:
2821428226
$ref: '#/components/schemas/ScheduleDataRelationships'
2821528227
type:
2821628228
$ref: '#/components/schemas/ScheduleDataType'
28229+
required:
28230+
- type
2821728231
type: object
2821828232
ScheduleDataAttributes:
2821928233
description: Provides core properties of a schedule object, such as its name,
@@ -28269,6 +28283,9 @@ components:
2826928283
type: string
2827028284
type:
2827128285
$ref: '#/components/schemas/ScheduleDataRelationshipsLayersDataItemsType'
28286+
required:
28287+
- type
28288+
- id
2827228289
type: object
2827328290
ScheduleDataRelationshipsLayersDataItemsType:
2827428291
default: layers
@@ -28298,6 +28315,9 @@ components:
2829828315
type: string
2829928316
type:
2830028317
$ref: '#/components/schemas/ScheduleDataRelationshipsTeamsDataItemsType'
28318+
required:
28319+
- type
28320+
- id
2830128321
type: object
2830228322
ScheduleDataRelationshipsTeamsDataItemsType:
2830328323
default: teams
@@ -28313,6 +28333,7 @@ components:
2831328333
description: Schedules resource type.
2831428334
enum:
2831528335
- schedules
28336+
example: schedules
2831628337
type: string
2831728338
x-enum-varnames:
2831828339
- SCHEDULES
@@ -28327,6 +28348,8 @@ components:
2832728348
$ref: '#/components/schemas/ScheduleMemberRelationships'
2832828349
type:
2832928350
$ref: '#/components/schemas/ScheduleMemberType'
28351+
required:
28352+
- type
2833028353
type: object
2833128354
ScheduleMemberRelationships:
2833228355
description: Defines relationships for a schedule member, primarily referencing
@@ -28340,6 +28363,8 @@ components:
2834028363
properties:
2834128364
data:
2834228365
$ref: '#/components/schemas/ScheduleMemberRelationshipsUserData'
28366+
required:
28367+
- data
2834328368
type: object
2834428369
ScheduleMemberRelationshipsUserData:
2834528370
description: Points to the user data associated with this schedule member, including
@@ -28351,12 +28376,16 @@ components:
2835128376
type: string
2835228377
type:
2835328378
$ref: '#/components/schemas/ScheduleMemberRelationshipsUserDataType'
28379+
required:
28380+
- type
28381+
- id
2835428382
type: object
2835528383
ScheduleMemberRelationshipsUserDataType:
2835628384
default: users
2835728385
description: Users resource type.
2835828386
enum:
2835928387
- users
28388+
example: users
2836028389
type: string
2836128390
x-enum-varnames:
2836228391
- USERS
@@ -28365,6 +28394,7 @@ components:
2836528394
description: Schedule Members resource type.
2836628395
enum:
2836728396
- members
28397+
example: members
2836828398
type: string
2836928399
x-enum-varnames:
2837028400
- MEMBERS
@@ -28542,6 +28572,12 @@ components:
2854228572
example: '2025-02-01T00:00:00Z'
2854328573
format: date-time
2854428574
type: string
28575+
required:
28576+
- effective_date
28577+
- interval
28578+
- members
28579+
- name
28580+
- rotation_start
2854528581
type: object
2854628582
ScheduleUpdateRequestDataAttributesLayersItemsInterval:
2854728583
description: 'Specifies how the rotation repeats: number of days, plus optional
@@ -28662,12 +28698,16 @@ components:
2866228698
type: string
2866328699
type:
2866428700
$ref: '#/components/schemas/ScheduleUpdateRequestDataRelationshipsTeamsDataItemsType'
28701+
required:
28702+
- type
28703+
- id
2866528704
type: object
2866628705
ScheduleUpdateRequestDataRelationshipsTeamsDataItemsType:
2866728706
default: teams
2866828707
description: Teams resource type.
2866928708
enum:
2867028709
- teams
28710+
example: teams
2867128711
type: string
2867228712
x-enum-varnames:
2867328713
- TEAMS
@@ -28691,6 +28731,8 @@ components:
2869128731
type: string
2869228732
type:
2869328733
$ref: '#/components/schemas/ScheduleUserType'
28734+
required:
28735+
- type
2869428736
type: object
2869528737
ScheduleUserAttributes:
2869628738
description: Provides basic user information for a schedule, including a name
@@ -28710,6 +28752,7 @@ components:
2871028752
description: Users resource type.
2871128753
enum:
2871228754
- users
28755+
example: users
2871328756
type: string
2871428757
x-enum-varnames:
2871528758
- USERS
@@ -34401,6 +34444,8 @@ components:
3440134444
$ref: '#/components/schemas/TeamReferenceRelationships'
3440234445
type:
3440334446
$ref: '#/components/schemas/TeamReferenceType'
34447+
required:
34448+
- type
3440434449
type: object
3440534450
TeamReferenceAttributes:
3440634451
description: Encapsulates the basic attributes of a Team reference, such as
@@ -34446,12 +34491,16 @@ components:
3444634491
type: string
3444734492
type:
3444834493
$ref: '#/components/schemas/TeamReferenceRelationshipsOncallUsersDataItemsType'
34494+
required:
34495+
- type
34496+
- id
3444934497
type: object
3445034498
TeamReferenceRelationshipsOncallUsersDataItemsType:
3445134499
default: users
3445234500
description: Users resource type.
3445334501
enum:
3445434502
- users
34503+
example: users
3445534504
type: string
3445634505
x-enum-varnames:
3445734506
- USERS
@@ -34460,6 +34509,7 @@ components:
3446034509
description: Teams resource type.
3446134510
enum:
3446234511
- teams
34512+
example: teams
3446334513
type: string
3446434514
x-enum-varnames:
3446534515
- TEAMS

src/datadog_api_client/v2/model/escalation_policy_included.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def __init__(self, **kwargs):
2525
:type relationships: TeamReferenceRelationships, optional
2626
2727
:param type: Teams resource type.
28-
:type type: TeamReferenceType, optional
28+
:type type: TeamReferenceType
2929
"""
3030
super().__init__(kwargs)
3131

src/datadog_api_client/v2/model/layer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ def openapi_types(_):
4242

4343
def __init__(
4444
self_,
45+
type: LayerType,
4546
attributes: Union[LayerAttributes, UnsetType] = unset,
4647
id: Union[str, UnsetType] = unset,
4748
relationships: Union[LayerRelationships, UnsetType] = unset,
48-
type: Union[LayerType, UnsetType] = unset,
4949
**kwargs,
5050
):
5151
"""
@@ -61,14 +61,14 @@ def __init__(
6161
:type relationships: LayerRelationships, optional
6262
6363
:param type: Layers resource type.
64-
:type type: LayerType, optional
64+
:type type: LayerType
6565
"""
6666
if attributes is not unset:
6767
kwargs["attributes"] = attributes
6868
if id is not unset:
6969
kwargs["id"] = id
7070
if relationships is not unset:
7171
kwargs["relationships"] = relationships
72-
if type is not unset:
73-
kwargs["type"] = type
7472
super().__init__(kwargs)
73+
74+
self_.type = type

src/datadog_api_client/v2/model/layer_relationships_members_data_items.py

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33
# Copyright 2019-Present Datadog, Inc.
44
from __future__ import annotations
55

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

88
from datadog_api_client.model_utils import (
99
ModelNormal,
1010
cached_property,
11-
unset,
12-
UnsetType,
1311
)
1412

1513

@@ -36,24 +34,18 @@ def openapi_types(_):
3634
"type": "type",
3735
}
3836

39-
def __init__(
40-
self_,
41-
id: Union[str, UnsetType] = unset,
42-
type: Union[LayerRelationshipsMembersDataItemsType, UnsetType] = unset,
43-
**kwargs,
44-
):
37+
def __init__(self_, id: str, type: LayerRelationshipsMembersDataItemsType, **kwargs):
4538
"""
4639
Represents a single member object in a layer's ``members`` array, referencing
4740
a unique Datadog user ID.
4841
4942
:param id: The unique user ID of the layer member.
50-
:type id: str, optional
43+
:type id: str
5144
5245
:param type: Members resource type.
53-
:type type: LayerRelationshipsMembersDataItemsType, optional
46+
:type type: LayerRelationshipsMembersDataItemsType
5447
"""
55-
if id is not unset:
56-
kwargs["id"] = id
57-
if type is not unset:
58-
kwargs["type"] = type
5948
super().__init__(kwargs)
49+
50+
self_.id = id
51+
self_.type = type

src/datadog_api_client/v2/model/schedule_create_request_data_relationships_teams_data_items.py

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33
# Copyright 2019-Present Datadog, Inc.
44
from __future__ import annotations
55

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

88
from datadog_api_client.model_utils import (
99
ModelNormal,
1010
cached_property,
11-
unset,
12-
UnsetType,
1311
)
1412

1513

@@ -36,24 +34,18 @@ def openapi_types(_):
3634
"type": "type",
3735
}
3836

39-
def __init__(
40-
self_,
41-
id: Union[str, UnsetType] = unset,
42-
type: Union[ScheduleCreateRequestDataRelationshipsTeamsDataItemsType, UnsetType] = unset,
43-
**kwargs,
44-
):
37+
def __init__(self_, id: str, type: ScheduleCreateRequestDataRelationshipsTeamsDataItemsType, **kwargs):
4538
"""
4639
Holds the relationship data linking this schedule to a particular team,
4740
identified by ``id`` and ``type``.
4841
4942
:param id: A unique identifier for the team.
50-
:type id: str, optional
43+
:type id: str
5144
5245
:param type: Teams resource type.
53-
:type type: ScheduleCreateRequestDataRelationshipsTeamsDataItemsType, optional
46+
:type type: ScheduleCreateRequestDataRelationshipsTeamsDataItemsType
5447
"""
55-
if id is not unset:
56-
kwargs["id"] = id
57-
if type is not unset:
58-
kwargs["type"] = type
5948
super().__init__(kwargs)
49+
50+
self_.id = id
51+
self_.type = type

src/datadog_api_client/v2/model/schedule_data.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ def openapi_types(_):
4242

4343
def __init__(
4444
self_,
45+
type: ScheduleDataType,
4546
attributes: Union[ScheduleDataAttributes, UnsetType] = unset,
4647
id: Union[str, UnsetType] = unset,
4748
relationships: Union[ScheduleDataRelationships, UnsetType] = unset,
48-
type: Union[ScheduleDataType, UnsetType] = unset,
4949
**kwargs,
5050
):
5151
"""
@@ -61,14 +61,14 @@ def __init__(
6161
:type relationships: ScheduleDataRelationships, optional
6262
6363
:param type: Schedules resource type.
64-
:type type: ScheduleDataType, optional
64+
:type type: ScheduleDataType
6565
"""
6666
if attributes is not unset:
6767
kwargs["attributes"] = attributes
6868
if id is not unset:
6969
kwargs["id"] = id
7070
if relationships is not unset:
7171
kwargs["relationships"] = relationships
72-
if type is not unset:
73-
kwargs["type"] = type
7472
super().__init__(kwargs)
73+
74+
self_.type = type

0 commit comments

Comments
 (0)