From 1acad59992d28906a7d09ba954a68633ff9266aa Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 18 May 2026 12:37:35 +0000 Subject: [PATCH] Regenerate client from commit 70b512d of spec repo --- .generator/schemas/v2/openapi.yaml | 33 +++++++++++++ docs/datadog_api_client.v2.model.rst | 7 +++ ...s_downtime_time_slot_recurrence_request.py | 10 ++++ ..._downtime_time_slot_recurrence_response.py | 10 ++++ .../synthetics_downtime_weekday_position.py | 47 +++++++++++++++++++ src/datadog_api_client/v2/models/__init__.py | 2 + 6 files changed, 109 insertions(+) create mode 100644 src/datadog_api_client/v2/model/synthetics_downtime_weekday_position.py diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index c554255f13..47a82b437c 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -75138,6 +75138,8 @@ components: example: 1 format: int64 type: integer + weekdayPositions: + $ref: "#/components/schemas/SyntheticsDowntimeWeekdayPositions" weekdays: $ref: "#/components/schemas/SyntheticsDowntimeWeekdays" required: @@ -75155,6 +75157,8 @@ components: type: integer until: $ref: "#/components/schemas/SyntheticsDowntimeTimeSlotDate" + weekdayPositions: + $ref: "#/components/schemas/SyntheticsDowntimeWeekdayPositions" weekdays: $ref: "#/components/schemas/SyntheticsDowntimeWeekdays" required: @@ -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: @@ -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. @@ -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 @@ -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. diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 0c5968992f..26892b37f3 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -33121,6 +33121,13 @@ datadog\_api\_client.v2.model.synthetics\_downtime\_weekday module :members: :show-inheritance: +datadog\_api\_client.v2.model.synthetics\_downtime\_weekday\_position module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_downtime_weekday_position + :members: + :show-inheritance: + datadog\_api\_client.v2.model.synthetics\_downtimes\_response module -------------------------------------------------------------------- diff --git a/src/datadog_api_client/v2/model/synthetics_downtime_time_slot_recurrence_request.py b/src/datadog_api_client/v2/model/synthetics_downtime_time_slot_recurrence_request.py index b0e0ac51eb..65761e8155 100644 --- a/src/datadog_api_client/v2/model/synthetics_downtime_time_slot_recurrence_request.py +++ b/src/datadog_api_client/v2/model/synthetics_downtime_time_slot_recurrence_request.py @@ -16,6 +16,7 @@ if TYPE_CHECKING: from datadog_api_client.v2.model.synthetics_downtime_time_slot_date import SyntheticsDowntimeTimeSlotDate from datadog_api_client.v2.model.synthetics_downtime_frequency import SyntheticsDowntimeFrequency + from datadog_api_client.v2.model.synthetics_downtime_weekday_position import SyntheticsDowntimeWeekdayPosition from datadog_api_client.v2.model.synthetics_downtime_weekday import SyntheticsDowntimeWeekday @@ -24,12 +25,14 @@ class SyntheticsDowntimeTimeSlotRecurrenceRequest(ModelNormal): def openapi_types(_): from datadog_api_client.v2.model.synthetics_downtime_time_slot_date import SyntheticsDowntimeTimeSlotDate from datadog_api_client.v2.model.synthetics_downtime_frequency import SyntheticsDowntimeFrequency + from datadog_api_client.v2.model.synthetics_downtime_weekday_position import SyntheticsDowntimeWeekdayPosition from datadog_api_client.v2.model.synthetics_downtime_weekday import SyntheticsDowntimeWeekday return { "end": (SyntheticsDowntimeTimeSlotDate,), "frequency": (SyntheticsDowntimeFrequency,), "interval": (int,), + "weekday_positions": ([SyntheticsDowntimeWeekdayPosition],), "weekdays": ([SyntheticsDowntimeWeekday],), } @@ -37,6 +40,7 @@ def openapi_types(_): "end": "end", "frequency": "frequency", "interval": "interval", + "weekday_positions": "weekdayPositions", "weekdays": "weekdays", } @@ -45,6 +49,7 @@ def __init__( frequency: SyntheticsDowntimeFrequency, end: Union[SyntheticsDowntimeTimeSlotDate, UnsetType] = unset, interval: Union[int, UnsetType] = unset, + weekday_positions: Union[List[SyntheticsDowntimeWeekdayPosition], UnsetType] = unset, weekdays: Union[List[SyntheticsDowntimeWeekday], UnsetType] = unset, **kwargs, ): @@ -60,6 +65,9 @@ def __init__( :param interval: The interval between recurrences, relative to the frequency. :type interval: int, optional + :param weekday_positions: 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". + :type weekday_positions: [SyntheticsDowntimeWeekdayPosition], optional + :param weekdays: Days of the week for a Synthetics downtime recurrence schedule. :type weekdays: [SyntheticsDowntimeWeekday], optional """ @@ -67,6 +75,8 @@ def __init__( kwargs["end"] = end if interval is not unset: kwargs["interval"] = interval + if weekday_positions is not unset: + kwargs["weekday_positions"] = weekday_positions if weekdays is not unset: kwargs["weekdays"] = weekdays super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_downtime_time_slot_recurrence_response.py b/src/datadog_api_client/v2/model/synthetics_downtime_time_slot_recurrence_response.py index a4b9bc3751..e4c7a674a2 100644 --- a/src/datadog_api_client/v2/model/synthetics_downtime_time_slot_recurrence_response.py +++ b/src/datadog_api_client/v2/model/synthetics_downtime_time_slot_recurrence_response.py @@ -16,6 +16,7 @@ if TYPE_CHECKING: from datadog_api_client.v2.model.synthetics_downtime_frequency import SyntheticsDowntimeFrequency from datadog_api_client.v2.model.synthetics_downtime_time_slot_date import SyntheticsDowntimeTimeSlotDate + from datadog_api_client.v2.model.synthetics_downtime_weekday_position import SyntheticsDowntimeWeekdayPosition from datadog_api_client.v2.model.synthetics_downtime_weekday import SyntheticsDowntimeWeekday @@ -24,12 +25,14 @@ class SyntheticsDowntimeTimeSlotRecurrenceResponse(ModelNormal): def openapi_types(_): from datadog_api_client.v2.model.synthetics_downtime_frequency import SyntheticsDowntimeFrequency from datadog_api_client.v2.model.synthetics_downtime_time_slot_date import SyntheticsDowntimeTimeSlotDate + from datadog_api_client.v2.model.synthetics_downtime_weekday_position import SyntheticsDowntimeWeekdayPosition from datadog_api_client.v2.model.synthetics_downtime_weekday import SyntheticsDowntimeWeekday return { "frequency": (SyntheticsDowntimeFrequency,), "interval": (int,), "until": (SyntheticsDowntimeTimeSlotDate,), + "weekday_positions": ([SyntheticsDowntimeWeekdayPosition],), "weekdays": ([SyntheticsDowntimeWeekday],), } @@ -37,6 +40,7 @@ def openapi_types(_): "frequency": "frequency", "interval": "interval", "until": "until", + "weekday_positions": "weekdayPositions", "weekdays": "weekdays", } @@ -46,6 +50,7 @@ def __init__( interval: int, weekdays: List[SyntheticsDowntimeWeekday], until: Union[SyntheticsDowntimeTimeSlotDate, UnsetType] = unset, + weekday_positions: Union[List[SyntheticsDowntimeWeekdayPosition], UnsetType] = unset, **kwargs, ): """ @@ -60,11 +65,16 @@ def __init__( :param until: A specific date and time used to define the start or end of a Synthetics downtime time slot. :type until: SyntheticsDowntimeTimeSlotDate, optional + :param weekday_positions: 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". + :type weekday_positions: [SyntheticsDowntimeWeekdayPosition], optional + :param weekdays: Days of the week for a Synthetics downtime recurrence schedule. :type weekdays: [SyntheticsDowntimeWeekday] """ if until is not unset: kwargs["until"] = until + if weekday_positions is not unset: + kwargs["weekday_positions"] = weekday_positions super().__init__(kwargs) self_.frequency = frequency diff --git a/src/datadog_api_client/v2/model/synthetics_downtime_weekday_position.py b/src/datadog_api_client/v2/model/synthetics_downtime_weekday_position.py new file mode 100644 index 0000000000..dcfca8e894 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_downtime_weekday_position.py @@ -0,0 +1,47 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class SyntheticsDowntimeWeekdayPosition(ModelSimple): + """ + 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. + + :param value: Must be one of [1, 2, 3, 4, -1]. + :type value: int + """ + + allowed_values = { + 1, + 2, + 3, + 4, + -1, + } + FIRST: ClassVar["SyntheticsDowntimeWeekdayPosition"] + SECOND: ClassVar["SyntheticsDowntimeWeekdayPosition"] + THIRD: ClassVar["SyntheticsDowntimeWeekdayPosition"] + FOURTH: ClassVar["SyntheticsDowntimeWeekdayPosition"] + LAST: ClassVar["SyntheticsDowntimeWeekdayPosition"] + + @cached_property + def openapi_types(_): + return { + "value": (int,), + } + + +SyntheticsDowntimeWeekdayPosition.FIRST = SyntheticsDowntimeWeekdayPosition(1) +SyntheticsDowntimeWeekdayPosition.SECOND = SyntheticsDowntimeWeekdayPosition(2) +SyntheticsDowntimeWeekdayPosition.THIRD = SyntheticsDowntimeWeekdayPosition(3) +SyntheticsDowntimeWeekdayPosition.FOURTH = SyntheticsDowntimeWeekdayPosition(4) +SyntheticsDowntimeWeekdayPosition.LAST = SyntheticsDowntimeWeekdayPosition(-1) diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index a3fe5f6f9d..8697e524ec 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -6761,6 +6761,7 @@ from datadog_api_client.v2.model.synthetics_downtime_time_slot_request import SyntheticsDowntimeTimeSlotRequest from datadog_api_client.v2.model.synthetics_downtime_time_slot_response import SyntheticsDowntimeTimeSlotResponse from datadog_api_client.v2.model.synthetics_downtime_weekday import SyntheticsDowntimeWeekday +from datadog_api_client.v2.model.synthetics_downtime_weekday_position import SyntheticsDowntimeWeekdayPosition from datadog_api_client.v2.model.synthetics_downtimes_response import SyntheticsDowntimesResponse from datadog_api_client.v2.model.synthetics_fast_test_result import SyntheticsFastTestResult from datadog_api_client.v2.model.synthetics_fast_test_result_attributes import SyntheticsFastTestResultAttributes @@ -12446,6 +12447,7 @@ "SyntheticsDowntimeTimeSlotRequest", "SyntheticsDowntimeTimeSlotResponse", "SyntheticsDowntimeWeekday", + "SyntheticsDowntimeWeekdayPosition", "SyntheticsDowntimesResponse", "SyntheticsFastTestResult", "SyntheticsFastTestResultAttributes",