Skip to content

Commit 9eb82c6

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit a13b04a6 of spec repo
1 parent 961bd90 commit 9eb82c6

16 files changed

+35
-1443
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-05-06 15:05:58.407196",
8-
"spec_repo_commit": "d0ee626b"
7+
"regenerated": "2025-05-07 06:02:35.912698",
8+
"spec_repo_commit": "a13b04a6"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-05-06 15:05:58.424393",
13-
"spec_repo_commit": "d0ee626b"
12+
"regenerated": "2025-05-07 06:02:35.928461",
13+
"spec_repo_commit": "a13b04a6"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 3 additions & 173 deletions
Original file line numberDiff line numberDiff line change
@@ -18664,7 +18664,7 @@ components:
1866418664
description: An optional list of time restrictions for when this layer is
1866518665
in effect.
1866618666
items:
18667-
$ref: '#/components/schemas/LayerAttributesRestrictionsItems'
18667+
$ref: '#/components/schemas/TimeRestriction'
1866818668
type: array
1866918669
rotation_start:
1867018670
description: The date/time when the rotation starts (ISO 8601).
@@ -18688,63 +18688,6 @@ components:
1868818688
maximum: 2592000
1868918689
type: integer
1869018690
type: object
18691-
LayerAttributesRestrictionsItems:
18692-
description: 'Represents a time restriction within a layer, specifying the days
18693-
and times
18694-
18695-
when this layer is active or inactive.'
18696-
properties:
18697-
end_day:
18698-
$ref: '#/components/schemas/LayerAttributesRestrictionsItemsEndDay'
18699-
end_time:
18700-
description: The time of day the restriction ends (hh:mm:ss).
18701-
example: '17:00:00'
18702-
type: string
18703-
start_day:
18704-
$ref: '#/components/schemas/LayerAttributesRestrictionsItemsStartDay'
18705-
start_time:
18706-
description: The time of day the restriction begins (hh:mm:ss).
18707-
example: 09:00:00
18708-
type: string
18709-
type: object
18710-
LayerAttributesRestrictionsItemsEndDay:
18711-
description: Defines the end day of the restriction within a Layer.
18712-
enum:
18713-
- monday
18714-
- tuesday
18715-
- wednesday
18716-
- thursday
18717-
- friday
18718-
- saturday
18719-
- sunday
18720-
type: string
18721-
x-enum-varnames:
18722-
- MONDAY
18723-
- TUESDAY
18724-
- WEDNESDAY
18725-
- THURSDAY
18726-
- FRIDAY
18727-
- SATURDAY
18728-
- SUNDAY
18729-
LayerAttributesRestrictionsItemsStartDay:
18730-
description: Defines the start day of the restriction within a Layer.
18731-
enum:
18732-
- monday
18733-
- tuesday
18734-
- wednesday
18735-
- thursday
18736-
- friday
18737-
- saturday
18738-
- sunday
18739-
type: string
18740-
x-enum-varnames:
18741-
- MONDAY
18742-
- TUESDAY
18743-
- WEDNESDAY
18744-
- THURSDAY
18745-
- FRIDAY
18746-
- SATURDAY
18747-
- SUNDAY
1874818691
LayerRelationships:
1874918692
description: Holds references to objects related to the Layer entity, such as
1875018693
its members.
@@ -31121,7 +31064,7 @@ components:
3112131064
description: Zero or more time-based restrictions (for example, only weekdays,
3112231065
during business hours).
3112331066
items:
31124-
$ref: '#/components/schemas/ScheduleCreateRequestDataAttributesLayersItemsRestrictionsItems'
31067+
$ref: '#/components/schemas/TimeRestriction'
3112531068
type: array
3112631069
rotation_start:
3112731070
description: The date/time when the rotation for this layer starts (in ISO
@@ -31170,62 +31113,6 @@ components:
3117031113
example: 00000000-aba1-0000-0000-000000000000
3117131114
type: string
3117231115
type: object
31173-
ScheduleCreateRequestDataAttributesLayersItemsRestrictionsItems:
31174-
description: 'Defines a time restriction for a schedule layer, including which
31175-
day of the week
31176-
31177-
it starts and ends, along with start/end times.'
31178-
properties:
31179-
end_day:
31180-
$ref: '#/components/schemas/ScheduleCreateRequestDataAttributesLayersItemsRestrictionsItemsEndDay'
31181-
end_time:
31182-
description: The time of day when the restriction ends (hh:mm:ss).
31183-
type: string
31184-
start_day:
31185-
$ref: '#/components/schemas/ScheduleCreateRequestDataAttributesLayersItemsRestrictionsItemsStartDay'
31186-
start_time:
31187-
description: The time of day when the restriction begins (hh:mm:ss).
31188-
type: string
31189-
type: object
31190-
ScheduleCreateRequestDataAttributesLayersItemsRestrictionsItemsEndDay:
31191-
description: The weekday when the restriction period ends (Monday through Sunday).
31192-
enum:
31193-
- monday
31194-
- tuesday
31195-
- wednesday
31196-
- thursday
31197-
- friday
31198-
- saturday
31199-
- sunday
31200-
type: string
31201-
x-enum-varnames:
31202-
- MONDAY
31203-
- TUESDAY
31204-
- WEDNESDAY
31205-
- THURSDAY
31206-
- FRIDAY
31207-
- SATURDAY
31208-
- SUNDAY
31209-
ScheduleCreateRequestDataAttributesLayersItemsRestrictionsItemsStartDay:
31210-
description: The weekday when the restriction period starts (Monday through
31211-
Sunday).
31212-
enum:
31213-
- monday
31214-
- tuesday
31215-
- wednesday
31216-
- thursday
31217-
- friday
31218-
- saturday
31219-
- sunday
31220-
type: string
31221-
x-enum-varnames:
31222-
- MONDAY
31223-
- TUESDAY
31224-
- WEDNESDAY
31225-
- THURSDAY
31226-
- FRIDAY
31227-
- SATURDAY
31228-
- SUNDAY
3122931116
ScheduleCreateRequestDataRelationships:
3123031117
description: Gathers relationship objects for the schedule creation request,
3123131118
including the teams to associate.
@@ -31629,7 +31516,7 @@ components:
3162931516
restrictions:
3163031517
description: Any time restrictions that define when this layer is active.
3163131518
items:
31632-
$ref: '#/components/schemas/ScheduleUpdateRequestDataAttributesLayersItemsRestrictionsItems'
31519+
$ref: '#/components/schemas/TimeRestriction'
3163331520
type: array
3163431521
rotation_start:
3163531522
description: The date/time at which the rotation begins (ISO 8601 format).
@@ -31679,63 +31566,6 @@ components:
3167931566
example: 00000000-aba1-0000-0000-000000000000
3168031567
type: string
3168131568
type: object
31682-
ScheduleUpdateRequestDataAttributesLayersItemsRestrictionsItems:
31683-
description: 'Defines a time restriction object for a layer within a schedule
31684-
update, including
31685-
31686-
start and end days, as well as times.'
31687-
properties:
31688-
end_day:
31689-
$ref: '#/components/schemas/ScheduleUpdateRequestDataAttributesLayersItemsRestrictionsItemsEndDay'
31690-
end_time:
31691-
description: The time at which this restriction ends (hh:mm:ss).
31692-
example: '17:00:00'
31693-
type: string
31694-
start_day:
31695-
$ref: '#/components/schemas/ScheduleUpdateRequestDataAttributesLayersItemsRestrictionsItemsStartDay'
31696-
start_time:
31697-
description: The time at which this restriction starts (hh:mm:ss).
31698-
example: 09:00:00
31699-
type: string
31700-
type: object
31701-
ScheduleUpdateRequestDataAttributesLayersItemsRestrictionsItemsEndDay:
31702-
description: Defines the day of the week on which the time restriction ends.
31703-
enum:
31704-
- monday
31705-
- tuesday
31706-
- wednesday
31707-
- thursday
31708-
- friday
31709-
- saturday
31710-
- sunday
31711-
type: string
31712-
x-enum-varnames:
31713-
- MONDAY
31714-
- TUESDAY
31715-
- WEDNESDAY
31716-
- THURSDAY
31717-
- FRIDAY
31718-
- SATURDAY
31719-
- SUNDAY
31720-
ScheduleUpdateRequestDataAttributesLayersItemsRestrictionsItemsStartDay:
31721-
description: Defines the day of the week on which the time restriction starts.
31722-
enum:
31723-
- monday
31724-
- tuesday
31725-
- wednesday
31726-
- thursday
31727-
- friday
31728-
- saturday
31729-
- sunday
31730-
type: string
31731-
x-enum-varnames:
31732-
- MONDAY
31733-
- TUESDAY
31734-
- WEDNESDAY
31735-
- THURSDAY
31736-
- FRIDAY
31737-
- SATURDAY
31738-
- SUNDAY
3173931569
ScheduleUpdateRequestDataRelationships:
3174031570
description: Houses relationships for the schedule update, typically referencing
3174131571
teams.

examples/v2/on-call/CreateOnCallSchedule.java

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@
1010
import com.datadog.api.client.v2.model.ScheduleCreateRequestDataAttributesLayersItemsInterval;
1111
import com.datadog.api.client.v2.model.ScheduleCreateRequestDataAttributesLayersItemsMembersItems;
1212
import com.datadog.api.client.v2.model.ScheduleCreateRequestDataAttributesLayersItemsMembersItemsUser;
13-
import com.datadog.api.client.v2.model.ScheduleCreateRequestDataAttributesLayersItemsRestrictionsItems;
14-
import com.datadog.api.client.v2.model.ScheduleCreateRequestDataAttributesLayersItemsRestrictionsItemsEndDay;
15-
import com.datadog.api.client.v2.model.ScheduleCreateRequestDataAttributesLayersItemsRestrictionsItemsStartDay;
1613
import com.datadog.api.client.v2.model.ScheduleCreateRequestDataRelationships;
1714
import com.datadog.api.client.v2.model.ScheduleCreateRequestDataRelationshipsTeams;
1815
import com.datadog.api.client.v2.model.ScheduleCreateRequestDataRelationshipsTeamsDataItems;
1916
import com.datadog.api.client.v2.model.ScheduleCreateRequestDataRelationshipsTeamsDataItemsType;
2017
import com.datadog.api.client.v2.model.ScheduleCreateRequestDataType;
18+
import com.datadog.api.client.v2.model.TimeRestriction;
19+
import com.datadog.api.client.v2.model.Weekday;
2120
import java.time.OffsetDateTime;
2221
import java.util.Arrays;
2322
import java.util.Collections;
@@ -56,14 +55,10 @@ public static void main(String[] args) {
5655
.name("Layer 1")
5756
.restrictions(
5857
Collections.singletonList(
59-
new ScheduleCreateRequestDataAttributesLayersItemsRestrictionsItems()
60-
.endDay(
61-
ScheduleCreateRequestDataAttributesLayersItemsRestrictionsItemsEndDay
62-
.FRIDAY)
58+
new TimeRestriction()
59+
.endDay(Weekday.FRIDAY)
6360
.endTime("17:00:00")
64-
.startDay(
65-
ScheduleCreateRequestDataAttributesLayersItemsRestrictionsItemsStartDay
66-
.MONDAY)
61+
.startDay(Weekday.MONDAY)
6762
.startTime("09:00:00")))
6863
.rotationStart(OffsetDateTime.now().plusDays(-5))))
6964
.name("Example-On-Call")

examples/v2/on-call/UpdateOnCallSchedule.java

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@
1010
import com.datadog.api.client.v2.model.ScheduleUpdateRequestDataAttributesLayersItemsInterval;
1111
import com.datadog.api.client.v2.model.ScheduleUpdateRequestDataAttributesLayersItemsMembersItems;
1212
import com.datadog.api.client.v2.model.ScheduleUpdateRequestDataAttributesLayersItemsMembersItemsUser;
13-
import com.datadog.api.client.v2.model.ScheduleUpdateRequestDataAttributesLayersItemsRestrictionsItems;
14-
import com.datadog.api.client.v2.model.ScheduleUpdateRequestDataAttributesLayersItemsRestrictionsItemsEndDay;
15-
import com.datadog.api.client.v2.model.ScheduleUpdateRequestDataAttributesLayersItemsRestrictionsItemsStartDay;
1613
import com.datadog.api.client.v2.model.ScheduleUpdateRequestDataRelationships;
1714
import com.datadog.api.client.v2.model.ScheduleUpdateRequestDataRelationshipsTeams;
1815
import com.datadog.api.client.v2.model.ScheduleUpdateRequestDataRelationshipsTeamsDataItems;
1916
import com.datadog.api.client.v2.model.ScheduleUpdateRequestDataRelationshipsTeamsDataItemsType;
2017
import com.datadog.api.client.v2.model.ScheduleUpdateRequestDataType;
18+
import com.datadog.api.client.v2.model.TimeRestriction;
19+
import com.datadog.api.client.v2.model.Weekday;
2120
import java.time.OffsetDateTime;
2221
import java.util.Arrays;
2322
import java.util.Collections;
@@ -63,14 +62,10 @@ public static void main(String[] args) {
6362
.name("Layer 1")
6463
.restrictions(
6564
Collections.singletonList(
66-
new ScheduleUpdateRequestDataAttributesLayersItemsRestrictionsItems()
67-
.endDay(
68-
ScheduleUpdateRequestDataAttributesLayersItemsRestrictionsItemsEndDay
69-
.FRIDAY)
65+
new TimeRestriction()
66+
.endDay(Weekday.FRIDAY)
7067
.endTime("17:00:00")
71-
.startDay(
72-
ScheduleUpdateRequestDataAttributesLayersItemsRestrictionsItemsStartDay
73-
.MONDAY)
68+
.startDay(Weekday.MONDAY)
7469
.startTime("09:00:00")))
7570
.rotationStart(OffsetDateTime.now().plusDays(-5))))
7671
.name("Example-On-Call")

src/main/java/com/datadog/api/client/v2/model/LayerAttributes.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public class LayerAttributes {
4848
private String name;
4949

5050
public static final String JSON_PROPERTY_RESTRICTIONS = "restrictions";
51-
private List<LayerAttributesRestrictionsItems> restrictions = null;
51+
private List<TimeRestriction> restrictions = null;
5252

5353
public static final String JSON_PROPERTY_ROTATION_START = "rotation_start";
5454
private OffsetDateTime rotationStart;
@@ -138,15 +138,15 @@ public void setName(String name) {
138138
this.name = name;
139139
}
140140

141-
public LayerAttributes restrictions(List<LayerAttributesRestrictionsItems> restrictions) {
141+
public LayerAttributes restrictions(List<TimeRestriction> restrictions) {
142142
this.restrictions = restrictions;
143-
for (LayerAttributesRestrictionsItems item : restrictions) {
143+
for (TimeRestriction item : restrictions) {
144144
this.unparsed |= item.unparsed;
145145
}
146146
return this;
147147
}
148148

149-
public LayerAttributes addRestrictionsItem(LayerAttributesRestrictionsItems restrictionsItem) {
149+
public LayerAttributes addRestrictionsItem(TimeRestriction restrictionsItem) {
150150
if (this.restrictions == null) {
151151
this.restrictions = new ArrayList<>();
152152
}
@@ -163,11 +163,11 @@ public LayerAttributes addRestrictionsItem(LayerAttributesRestrictionsItems rest
163163
@jakarta.annotation.Nullable
164164
@JsonProperty(JSON_PROPERTY_RESTRICTIONS)
165165
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
166-
public List<LayerAttributesRestrictionsItems> getRestrictions() {
166+
public List<TimeRestriction> getRestrictions() {
167167
return restrictions;
168168
}
169169

170-
public void setRestrictions(List<LayerAttributesRestrictionsItems> restrictions) {
170+
public void setRestrictions(List<TimeRestriction> restrictions) {
171171
this.restrictions = restrictions;
172172
}
173173

0 commit comments

Comments
 (0)