Skip to content

Commit c43fe5d

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Share timerestriction object (#2397)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 490edd1 commit c43fe5d

17 files changed

+16
-795
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-09 02:41:20.820143",
8-
"spec_repo_commit": "39adb7c0"
7+
"regenerated": "2025-05-09 14:41:42.274122",
8+
"spec_repo_commit": "f0e5e32f"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-05-09 02:41:20.835754",
13-
"spec_repo_commit": "39adb7c0"
12+
"regenerated": "2025-05-09 14:41:42.291116",
13+
"spec_repo_commit": "f0e5e32f"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

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

examples/v2/on-call/CreateOnCallSchedule.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
],
2929
name: "Layer 1",
3030
restrictions: [
31-
DatadogAPIClient::V2::ScheduleCreateRequestDataAttributesLayersItemsRestrictionsItems.new({
32-
end_day: DatadogAPIClient::V2::ScheduleCreateRequestDataAttributesLayersItemsRestrictionsItemsEndDay::FRIDAY,
31+
DatadogAPIClient::V2::TimeRestriction.new({
32+
end_day: DatadogAPIClient::V2::Weekday::FRIDAY,
3333
end_time: "17:00:00",
34-
start_day: DatadogAPIClient::V2::ScheduleCreateRequestDataAttributesLayersItemsRestrictionsItemsStartDay::MONDAY,
34+
start_day: DatadogAPIClient::V2::Weekday::MONDAY,
3535
start_time: "09:00:00",
3636
}),
3737
],

examples/v2/on-call/UpdateOnCallSchedule.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@
3434
],
3535
name: "Layer 1",
3636
restrictions: [
37-
DatadogAPIClient::V2::ScheduleUpdateRequestDataAttributesLayersItemsRestrictionsItems.new({
38-
end_day: DatadogAPIClient::V2::ScheduleUpdateRequestDataAttributesLayersItemsRestrictionsItemsEndDay::FRIDAY,
37+
DatadogAPIClient::V2::TimeRestriction.new({
38+
end_day: DatadogAPIClient::V2::Weekday::FRIDAY,
3939
end_time: "17:00:00",
40-
start_day: DatadogAPIClient::V2::ScheduleUpdateRequestDataAttributesLayersItemsRestrictionsItemsStartDay::MONDAY,
40+
start_day: DatadogAPIClient::V2::Weekday::MONDAY,
4141
start_time: "09:00:00",
4242
}),
4343
],

lib/datadog_api_client/inflector.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2029,9 +2029,6 @@ def overrides
20292029
"v2.layer" => "Layer",
20302030
"v2.layer_attributes" => "LayerAttributes",
20312031
"v2.layer_attributes_interval" => "LayerAttributesInterval",
2032-
"v2.layer_attributes_restrictions_items" => "LayerAttributesRestrictionsItems",
2033-
"v2.layer_attributes_restrictions_items_end_day" => "LayerAttributesRestrictionsItemsEndDay",
2034-
"v2.layer_attributes_restrictions_items_start_day" => "LayerAttributesRestrictionsItemsStartDay",
20352032
"v2.layer_relationships" => "LayerRelationships",
20362033
"v2.layer_relationships_members" => "LayerRelationshipsMembers",
20372034
"v2.layer_relationships_members_data_items" => "LayerRelationshipsMembersDataItems",
@@ -2849,9 +2846,6 @@ def overrides
28492846
"v2.schedule_create_request_data_attributes_layers_items_interval" => "ScheduleCreateRequestDataAttributesLayersItemsInterval",
28502847
"v2.schedule_create_request_data_attributes_layers_items_members_items" => "ScheduleCreateRequestDataAttributesLayersItemsMembersItems",
28512848
"v2.schedule_create_request_data_attributes_layers_items_members_items_user" => "ScheduleCreateRequestDataAttributesLayersItemsMembersItemsUser",
2852-
"v2.schedule_create_request_data_attributes_layers_items_restrictions_items" => "ScheduleCreateRequestDataAttributesLayersItemsRestrictionsItems",
2853-
"v2.schedule_create_request_data_attributes_layers_items_restrictions_items_end_day" => "ScheduleCreateRequestDataAttributesLayersItemsRestrictionsItemsEndDay",
2854-
"v2.schedule_create_request_data_attributes_layers_items_restrictions_items_start_day" => "ScheduleCreateRequestDataAttributesLayersItemsRestrictionsItemsStartDay",
28552849
"v2.schedule_create_request_data_relationships" => "ScheduleCreateRequestDataRelationships",
28562850
"v2.schedule_create_request_data_relationships_teams" => "ScheduleCreateRequestDataRelationshipsTeams",
28572851
"v2.schedule_create_request_data_relationships_teams_data_items" => "ScheduleCreateRequestDataRelationshipsTeamsDataItems",
@@ -2885,9 +2879,6 @@ def overrides
28852879
"v2.schedule_update_request_data_attributes_layers_items_interval" => "ScheduleUpdateRequestDataAttributesLayersItemsInterval",
28862880
"v2.schedule_update_request_data_attributes_layers_items_members_items" => "ScheduleUpdateRequestDataAttributesLayersItemsMembersItems",
28872881
"v2.schedule_update_request_data_attributes_layers_items_members_items_user" => "ScheduleUpdateRequestDataAttributesLayersItemsMembersItemsUser",
2888-
"v2.schedule_update_request_data_attributes_layers_items_restrictions_items" => "ScheduleUpdateRequestDataAttributesLayersItemsRestrictionsItems",
2889-
"v2.schedule_update_request_data_attributes_layers_items_restrictions_items_end_day" => "ScheduleUpdateRequestDataAttributesLayersItemsRestrictionsItemsEndDay",
2890-
"v2.schedule_update_request_data_attributes_layers_items_restrictions_items_start_day" => "ScheduleUpdateRequestDataAttributesLayersItemsRestrictionsItemsStartDay",
28912882
"v2.schedule_update_request_data_relationships" => "ScheduleUpdateRequestDataRelationships",
28922883
"v2.schedule_update_request_data_relationships_teams" => "ScheduleUpdateRequestDataRelationshipsTeams",
28932884
"v2.schedule_update_request_data_relationships_teams_data_items" => "ScheduleUpdateRequestDataRelationshipsTeamsDataItems",

lib/datadog_api_client/v2/models/layer_attributes.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def self.openapi_types
6262
:'end_date' => :'Time',
6363
:'interval' => :'LayerAttributesInterval',
6464
:'name' => :'String',
65-
:'restrictions' => :'Array<LayerAttributesRestrictionsItems>',
65+
:'restrictions' => :'Array<TimeRestriction>',
6666
:'rotation_start' => :'Time'
6767
}
6868
end

0 commit comments

Comments
 (0)