From 77d68c6a1efa1c1d5b7b47469c5a1e563a5eab7c Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 29 Oct 2026 17:30:15 +0000 Subject: [PATCH] Regenerate client from commit 147c01e of spec repo --- .generator/schemas/v2/openapi.yaml | 22 +++++++ .../v2/model/routing_rule_action.py | 3 + .../v2/model/send_slack_message_action.py | 26 +++++++- ...ack_message_action_customizable_content.py | 64 +++++++++++++++++++ src/datadog_api_client/v2/models/__init__.py | 4 ++ 5 files changed, 117 insertions(+), 2 deletions(-) create mode 100644 src/datadog_api_client/v2/model/send_slack_message_action_customizable_content.py diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index f9b60ddf90..361195b349 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -120230,6 +120230,8 @@ components: description: "The channel ID." example: CHANNEL type: string + customizable_content: + $ref: "#/components/schemas/SendSlackMessageActionCustomizableContent" type: $ref: "#/components/schemas/SendSlackMessageActionType" workspace: @@ -120241,6 +120243,26 @@ components: - channel - workspace type: object + SendSlackMessageActionCustomizableContent: + description: "Options that customize the content of the Slack message sent for a Page." + properties: + include_description: + description: "Whether to include the Page description in the Slack message." + example: true + type: boolean + include_source: + description: "Whether to include the source that triggered the Page in the Slack message." + example: true + type: boolean + mirror_replies: + description: "Whether to mirror replies posted in the Slack message thread to the Page timeline." + example: false + type: boolean + thread_timeline: + description: "Whether to post Page timeline updates as replies in the Slack message thread." + example: false + type: boolean + type: object SendSlackMessageActionType: default: send_slack_message description: "Indicates that the action is a send Slack message action." diff --git a/src/datadog_api_client/v2/model/routing_rule_action.py b/src/datadog_api_client/v2/model/routing_rule_action.py index a6ffcd2f55..b714e270d6 100644 --- a/src/datadog_api_client/v2/model/routing_rule_action.py +++ b/src/datadog_api_client/v2/model/routing_rule_action.py @@ -18,6 +18,9 @@ def __init__(self, **kwargs): :param channel: The channel ID. :type channel: str + :param customizable_content: Options that customize the content of the Slack message sent for a Page. + :type customizable_content: SendSlackMessageActionCustomizableContent, optional + :param type: Indicates that the action is a send Slack message action. :type type: SendSlackMessageActionType diff --git a/src/datadog_api_client/v2/model/send_slack_message_action.py b/src/datadog_api_client/v2/model/send_slack_message_action.py index 44d7b05360..ec627996f8 100644 --- a/src/datadog_api_client/v2/model/send_slack_message_action.py +++ b/src/datadog_api_client/v2/model/send_slack_message_action.py @@ -3,48 +3,70 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import TYPE_CHECKING +from typing import Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, cached_property, + unset, + UnsetType, ) if TYPE_CHECKING: + from datadog_api_client.v2.model.send_slack_message_action_customizable_content import ( + SendSlackMessageActionCustomizableContent, + ) from datadog_api_client.v2.model.send_slack_message_action_type import SendSlackMessageActionType class SendSlackMessageAction(ModelNormal): @cached_property def openapi_types(_): + from datadog_api_client.v2.model.send_slack_message_action_customizable_content import ( + SendSlackMessageActionCustomizableContent, + ) from datadog_api_client.v2.model.send_slack_message_action_type import SendSlackMessageActionType return { "channel": (str,), + "customizable_content": (SendSlackMessageActionCustomizableContent,), "type": (SendSlackMessageActionType,), "workspace": (str,), } attribute_map = { "channel": "channel", + "customizable_content": "customizable_content", "type": "type", "workspace": "workspace", } - def __init__(self_, channel: str, type: SendSlackMessageActionType, workspace: str, **kwargs): + def __init__( + self_, + channel: str, + type: SendSlackMessageActionType, + workspace: str, + customizable_content: Union[SendSlackMessageActionCustomizableContent, UnsetType] = unset, + **kwargs, + ): """ Sends a message to a Slack channel. :param channel: The channel ID. :type channel: str + :param customizable_content: Options that customize the content of the Slack message sent for a Page. + :type customizable_content: SendSlackMessageActionCustomizableContent, optional + :param type: Indicates that the action is a send Slack message action. :type type: SendSlackMessageActionType :param workspace: The workspace ID. :type workspace: str """ + if customizable_content is not unset: + kwargs["customizable_content"] = customizable_content super().__init__(kwargs) self_.channel = channel diff --git a/src/datadog_api_client/v2/model/send_slack_message_action_customizable_content.py b/src/datadog_api_client/v2/model/send_slack_message_action_customizable_content.py new file mode 100644 index 0000000000..c32ade26a5 --- /dev/null +++ b/src/datadog_api_client/v2/model/send_slack_message_action_customizable_content.py @@ -0,0 +1,64 @@ +# 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 typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SendSlackMessageActionCustomizableContent(ModelNormal): + @cached_property + def openapi_types(_): + return { + "include_description": (bool,), + "include_source": (bool,), + "mirror_replies": (bool,), + "thread_timeline": (bool,), + } + + attribute_map = { + "include_description": "include_description", + "include_source": "include_source", + "mirror_replies": "mirror_replies", + "thread_timeline": "thread_timeline", + } + + def __init__( + self_, + include_description: Union[bool, UnsetType] = unset, + include_source: Union[bool, UnsetType] = unset, + mirror_replies: Union[bool, UnsetType] = unset, + thread_timeline: Union[bool, UnsetType] = unset, + **kwargs, + ): + """ + Options that customize the content of the Slack message sent for a Page. + + :param include_description: Whether to include the Page description in the Slack message. + :type include_description: bool, optional + + :param include_source: Whether to include the source that triggered the Page in the Slack message. + :type include_source: bool, optional + + :param mirror_replies: Whether to mirror replies posted in the Slack message thread to the Page timeline. + :type mirror_replies: bool, optional + + :param thread_timeline: Whether to post Page timeline updates as replies in the Slack message thread. + :type thread_timeline: bool, optional + """ + if include_description is not unset: + kwargs["include_description"] = include_description + if include_source is not unset: + kwargs["include_source"] = include_source + if mirror_replies is not unset: + kwargs["mirror_replies"] = mirror_replies + if thread_timeline is not unset: + kwargs["thread_timeline"] = thread_timeline + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 66758c8bbe..3dc0594071 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -10825,6 +10825,9 @@ from datadog_api_client.v2.model.selectors import Selectors from datadog_api_client.v2.model.self_service_trigger_wrapper import SelfServiceTriggerWrapper from datadog_api_client.v2.model.send_slack_message_action import SendSlackMessageAction +from datadog_api_client.v2.model.send_slack_message_action_customizable_content import ( + SendSlackMessageActionCustomizableContent, +) from datadog_api_client.v2.model.send_slack_message_action_type import SendSlackMessageActionType from datadog_api_client.v2.model.send_teams_message_action import SendTeamsMessageAction from datadog_api_client.v2.model.send_teams_message_action_type import SendTeamsMessageActionType @@ -20180,6 +20183,7 @@ "Selectors", "SelfServiceTriggerWrapper", "SendSlackMessageAction", + "SendSlackMessageActionCustomizableContent", "SendSlackMessageActionType", "SendTeamsMessageAction", "SendTeamsMessageActionType",