|
| 1 | +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. |
| 2 | +# This product includes software developed at Datadog (https://www.datadoghq.com/). |
| 3 | +# Copyright 2019-Present Datadog, Inc. |
| 4 | +from __future__ import annotations |
| 5 | + |
| 6 | +from typing import TYPE_CHECKING |
| 7 | + |
| 8 | +from datadog_api_client.model_utils import ( |
| 9 | + ModelNormal, |
| 10 | + cached_property, |
| 11 | + UUID, |
| 12 | +) |
| 13 | + |
| 14 | + |
| 15 | +if TYPE_CHECKING: |
| 16 | + from datadog_api_client.v2.model.routing_rule_reroute_to_team_action_type import RoutingRuleRerouteToTeamActionType |
| 17 | + |
| 18 | + |
| 19 | +class RoutingRuleRerouteToTeamAction(ModelNormal): |
| 20 | + @cached_property |
| 21 | + def openapi_types(_): |
| 22 | + from datadog_api_client.v2.model.routing_rule_reroute_to_team_action_type import ( |
| 23 | + RoutingRuleRerouteToTeamActionType, |
| 24 | + ) |
| 25 | + |
| 26 | + return { |
| 27 | + "destination_team_id": (UUID,), |
| 28 | + "type": (RoutingRuleRerouteToTeamActionType,), |
| 29 | + } |
| 30 | + |
| 31 | + attribute_map = { |
| 32 | + "destination_team_id": "destination_team_id", |
| 33 | + "type": "type", |
| 34 | + } |
| 35 | + |
| 36 | + def __init__(self_, destination_team_id: UUID, type: RoutingRuleRerouteToTeamActionType, **kwargs): |
| 37 | + """ |
| 38 | + Reroutes the page to another team, which then evaluates it against its own routing rules. Each routing rule can include this action only once. It can be combined only with ``send_slack_message`` and ``send_teams_message`` actions. It can't be used with ``escalation_policy`` or ``workflow`` actions, or when the routing rule sets ``policy_id``. |
| 39 | +
|
| 40 | + :param destination_team_id: The ID of the team to reroute the page to. |
| 41 | + :type destination_team_id: UUID |
| 42 | +
|
| 43 | + :param type: Indicates that the action reroutes the page to another team's routing rules. |
| 44 | + :type type: RoutingRuleRerouteToTeamActionType |
| 45 | + """ |
| 46 | + super().__init__(kwargs) |
| 47 | + |
| 48 | + self_.destination_team_id = destination_team_id |
| 49 | + self_.type = type |
0 commit comments