Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75138,6 +75138,8 @@ components:
example: 1
format: int64
type: integer
weekdayPositions:
$ref: "#/components/schemas/SyntheticsDowntimeWeekdayPositions"
weekdays:
$ref: "#/components/schemas/SyntheticsDowntimeWeekdays"
required:
Expand All @@ -75155,6 +75157,8 @@ components:
type: integer
until:
$ref: "#/components/schemas/SyntheticsDowntimeTimeSlotDate"
weekdayPositions:
$ref: "#/components/schemas/SyntheticsDowntimeWeekdayPositions"
weekdays:
$ref: "#/components/schemas/SyntheticsDowntimeWeekdays"
required:
Expand Down Expand Up @@ -75266,6 +75270,32 @@ components:
- FRIDAY
- SATURDAY
- SUNDAY
SyntheticsDowntimeWeekdayPosition:
description: >-
The position of a weekday within a month for a monthly Synthetics downtime recurrence. `1` through `4` select the first through fourth occurrence of the weekday in the month, and `-1` selects the last occurrence.
enum:
- 1
- 2
- 3
- 4
- -1
example: 1
format: int64
type: integer
x-enum-varnames:
- FIRST
- SECOND
- THIRD
- FOURTH
- LAST
SyntheticsDowntimeWeekdayPositions:
description: >-
Positions of the weekdays within a month for a monthly Synthetics downtime recurrence. Used in combination with `weekdays` to schedule occurrences such as "the first Monday of the month".
example:
- 1
items:
$ref: "#/components/schemas/SyntheticsDowntimeWeekdayPosition"
type: array
SyntheticsDowntimeWeekdays:
description: Days of the week for a Synthetics downtime recurrence schedule.
example:
Expand Down Expand Up @@ -143383,6 +143413,7 @@ paths:
operator: AND
permissions:
- synthetics_write
- synthetics_default_settings_write
/api/v2/synthetics/downtimes/{downtime_id}:
delete:
description: Delete a Synthetics downtime by its ID.
Expand Down Expand Up @@ -143425,6 +143456,7 @@ paths:
operator: AND
permissions:
- synthetics_write
- synthetics_default_settings_write
get:
description: Get a Synthetics downtime by its ID.
operationId: GetSyntheticsDowntime
Expand Down Expand Up @@ -143598,6 +143630,7 @@ paths:
operator: AND
permissions:
- synthetics_write
- synthetics_default_settings_write
/api/v2/synthetics/downtimes/{downtime_id}/tests/{test_id}:
delete:
description: Disassociate a Synthetics test from a downtime.
Expand Down
1 change: 1 addition & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5817,6 +5817,7 @@ def overrides
"v2.synthetics_downtime_time_slot_request" => "SyntheticsDowntimeTimeSlotRequest",
"v2.synthetics_downtime_time_slot_response" => "SyntheticsDowntimeTimeSlotResponse",
"v2.synthetics_downtime_weekday" => "SyntheticsDowntimeWeekday",
"v2.synthetics_downtime_weekday_position" => "SyntheticsDowntimeWeekdayPosition",
"v2.synthetics_fast_test_result" => "SyntheticsFastTestResult",
"v2.synthetics_fast_test_result_attributes" => "SyntheticsFastTestResultAttributes",
"v2.synthetics_fast_test_result_data" => "SyntheticsFastTestResultData",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ class SyntheticsDowntimeTimeSlotRecurrenceRequest
# The interval between recurrences, relative to the frequency.
attr_accessor :interval

# Positions of the weekdays within a month for a monthly Synthetics downtime recurrence. Used in combination with `weekdays` to schedule occurrences such as "the first Monday of the month".
attr_accessor :weekday_positions

# Days of the week for a Synthetics downtime recurrence schedule.
attr_accessor :weekdays

Expand All @@ -42,6 +45,7 @@ def self.attribute_map
:'_end' => :'end',
:'frequency' => :'frequency',
:'interval' => :'interval',
:'weekday_positions' => :'weekdayPositions',
:'weekdays' => :'weekdays'
}
end
Expand All @@ -53,6 +57,7 @@ def self.openapi_types
:'_end' => :'SyntheticsDowntimeTimeSlotDate',
:'frequency' => :'SyntheticsDowntimeFrequency',
:'interval' => :'Integer',
:'weekday_positions' => :'Array<SyntheticsDowntimeWeekdayPosition>',
:'weekdays' => :'Array<SyntheticsDowntimeWeekday>'
}
end
Expand Down Expand Up @@ -87,6 +92,12 @@ def initialize(attributes = {})
self.interval = attributes[:'interval']
end

if attributes.key?(:'weekday_positions')
if (value = attributes[:'weekday_positions']).is_a?(Array)
self.weekday_positions = value
end
end

if attributes.key?(:'weekdays')
if (value = attributes[:'weekdays']).is_a?(Array)
self.weekdays = value
Expand Down Expand Up @@ -141,6 +152,7 @@ def ==(o)
_end == o._end &&
frequency == o.frequency &&
interval == o.interval &&
weekday_positions == o.weekday_positions &&
weekdays == o.weekdays &&
additional_properties == o.additional_properties
end
Expand All @@ -149,7 +161,7 @@ def ==(o)
# @return [Integer] Hash code
# @!visibility private
def hash
[_end, frequency, interval, weekdays, additional_properties].hash
[_end, frequency, interval, weekday_positions, weekdays, additional_properties].hash
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ class SyntheticsDowntimeTimeSlotRecurrenceResponse
# A specific date and time used to define the start or end of a Synthetics downtime time slot.
attr_accessor :_until

# Positions of the weekdays within a month for a monthly Synthetics downtime recurrence. Used in combination with `weekdays` to schedule occurrences such as "the first Monday of the month".
attr_accessor :weekday_positions

# Days of the week for a Synthetics downtime recurrence schedule.
attr_reader :weekdays

Expand All @@ -42,6 +45,7 @@ def self.attribute_map
:'frequency' => :'frequency',
:'interval' => :'interval',
:'_until' => :'until',
:'weekday_positions' => :'weekdayPositions',
:'weekdays' => :'weekdays'
}
end
Expand All @@ -53,6 +57,7 @@ def self.openapi_types
:'frequency' => :'SyntheticsDowntimeFrequency',
:'interval' => :'Integer',
:'_until' => :'SyntheticsDowntimeTimeSlotDate',
:'weekday_positions' => :'Array<SyntheticsDowntimeWeekdayPosition>',
:'weekdays' => :'Array<SyntheticsDowntimeWeekday>'
}
end
Expand Down Expand Up @@ -87,6 +92,12 @@ def initialize(attributes = {})
self._until = attributes[:'_until']
end

if attributes.key?(:'weekday_positions')
if (value = attributes[:'weekday_positions']).is_a?(Array)
self.weekday_positions = value
end
end

if attributes.key?(:'weekdays')
if (value = attributes[:'weekdays']).is_a?(Array)
self.weekdays = value
Expand Down Expand Up @@ -163,6 +174,7 @@ def ==(o)
frequency == o.frequency &&
interval == o.interval &&
_until == o._until &&
weekday_positions == o.weekday_positions &&
weekdays == o.weekdays &&
additional_properties == o.additional_properties
end
Expand All @@ -171,7 +183,7 @@ def ==(o)
# @return [Integer] Hash code
# @!visibility private
def hash
[frequency, interval, _until, weekdays, additional_properties].hash
[frequency, interval, _until, weekday_positions, weekdays, additional_properties].hash
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
=begin
#Datadog API V2 Collection

#Collection of all Datadog Public endpoints.

The version of the OpenAPI document: 1.0
Contact: support@datadoghq.com
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator

Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
This product includes software developed at Datadog (https://www.datadoghq.com/).
Copyright 2020-Present Datadog, Inc.

=end

require 'date'
require 'time'

module DatadogAPIClient::V2
# The position of a weekday within a month for a monthly Synthetics downtime recurrence. `1` through `4` select the first through fourth occurrence of the weekday in the month, and `-1` selects the last occurrence.
class SyntheticsDowntimeWeekdayPosition
include BaseEnumModel

FIRST = 1.freeze
SECOND = 2.freeze
THIRD = 3.freeze
FOURTH = 4.freeze
LAST = -1.freeze
end
end
Loading