|
| 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 List, Union, TYPE_CHECKING |
| 7 | + |
| 8 | +from datadog_api_client.model_utils import ( |
| 9 | + ModelNormal, |
| 10 | + cached_property, |
| 11 | + unset, |
| 12 | + UnsetType, |
| 13 | +) |
| 14 | + |
| 15 | + |
| 16 | +if TYPE_CHECKING: |
| 17 | + from datadog_api_client.v2.model.agent_trigger import AgentTrigger |
| 18 | + |
| 19 | + |
| 20 | +class AgentTriggerWrapper(ModelNormal): |
| 21 | + @cached_property |
| 22 | + def openapi_types(_): |
| 23 | + from datadog_api_client.v2.model.agent_trigger import AgentTrigger |
| 24 | + |
| 25 | + return { |
| 26 | + "agent_trigger": (AgentTrigger,), |
| 27 | + "start_step_names": ([str],), |
| 28 | + } |
| 29 | + |
| 30 | + attribute_map = { |
| 31 | + "agent_trigger": "agentTrigger", |
| 32 | + "start_step_names": "startStepNames", |
| 33 | + } |
| 34 | + |
| 35 | + def __init__(self_, agent_trigger: AgentTrigger, start_step_names: Union[List[str], UnsetType] = unset, **kwargs): |
| 36 | + """ |
| 37 | + Schema for an agent-based trigger. |
| 38 | +
|
| 39 | + :param agent_trigger: Trigger a workflow from an agent via the MCP execute tool. Workflow can be executed from Bits Chat, Bits Agent Builder, Claude Code, Codex, Cursor, and any other coding agent using the Datadog MCP. |
| 40 | + :type agent_trigger: AgentTrigger |
| 41 | +
|
| 42 | + :param start_step_names: Names of existing workflow steps that run first after a trigger fires. |
| 43 | + :type start_step_names: [str], optional |
| 44 | + """ |
| 45 | + if start_step_names is not unset: |
| 46 | + kwargs["start_step_names"] = start_step_names |
| 47 | + super().__init__(kwargs) |
| 48 | + |
| 49 | + self_.agent_trigger = agent_trigger |
0 commit comments