Skip to content
Open
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
50 changes: 43 additions & 7 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67945,8 +67945,11 @@ components:
description: "Trigger a workflow when an incident is declared."
properties:
incidentType:
description: "The type of incident that triggers the workflow."
deprecated: true
description: "Deprecated. Use `incidentTypes` instead. The type of incident that triggers the workflow."
type: string
incidentTypes:
$ref: "#/components/schemas/IncidentTriggerIncidentTypes"
tagCondition:
$ref: "#/components/schemas/IncidentCondition"
type: object
Expand Down Expand Up @@ -68645,8 +68648,11 @@ components:
executionLimit:
$ref: "#/components/schemas/ExecutionLimit"
incidentType:
description: "The type of incident that triggers the workflow."
deprecated: true
description: "Deprecated. Use `incidentTypes` instead. The type of incident that triggers the workflow."
type: string
incidentTypes:
$ref: "#/components/schemas/IncidentTriggerIncidentTypes"
tagCondition:
$ref: "#/components/schemas/IncidentCondition"
type: object
Expand Down Expand Up @@ -68964,8 +68970,11 @@ components:
executionLimit:
$ref: "#/components/schemas/ExecutionLimit"
incidentType:
description: "The type of incident that triggers the workflow."
deprecated: true
description: "Deprecated. Use `incidentTypes` instead. The type of incident that triggers the workflow."
type: string
incidentTypes:
$ref: "#/components/schemas/IncidentTriggerIncidentTypes"
tagCondition:
$ref: "#/components/schemas/IncidentCondition"
type: object
Expand Down Expand Up @@ -70206,8 +70215,11 @@ components:
executionLimit:
$ref: "#/components/schemas/ExecutionLimit"
incidentType:
description: "The type of incident that triggers the workflow."
deprecated: true
description: "Deprecated. Use `incidentTypes` instead. The type of incident that triggers the workflow."
type: string
incidentTypes:
$ref: "#/components/schemas/IncidentTriggerIncidentTypes"
tagCondition:
$ref: "#/components/schemas/IncidentCondition"
type: object
Expand Down Expand Up @@ -70257,8 +70269,11 @@ components:
executionLimit:
$ref: "#/components/schemas/ExecutionLimit"
incidentType:
description: "The type of incident that triggers the workflow."
deprecated: true
description: "Deprecated. Use `incidentTypes` instead. The type of incident that triggers the workflow."
type: string
incidentTypes:
$ref: "#/components/schemas/IncidentTriggerIncidentTypes"
tagCondition:
$ref: "#/components/schemas/IncidentCondition"
type: object
Expand Down Expand Up @@ -71242,8 +71257,11 @@ components:
executionLimit:
$ref: "#/components/schemas/ExecutionLimit"
incidentType:
description: "The type of incident that triggers the workflow."
deprecated: true
description: "Deprecated. Use `incidentTypes` instead. The type of incident that triggers the workflow."
type: string
incidentTypes:
$ref: "#/components/schemas/IncidentTriggerIncidentTypes"
serialExecution:
$ref: "#/components/schemas/SerialExecution"
tagCondition:
Expand All @@ -71263,8 +71281,11 @@ components:
description: "Trigger a workflow on a schedule for an incident."
properties:
incidentType:
description: "The type of incident that triggers the workflow."
deprecated: true
description: "Deprecated. Use `incidentTypes` instead. The type of incident that triggers the workflow."
type: string
incidentTypes:
$ref: "#/components/schemas/IncidentTriggerIncidentTypes"
rrule:
description: "The recurrence rule for the schedule, expressed as an iCalendar `RRULE` string."
example: "DTSTART:20241220T151700Z\nRRULE:FREQ=MONTHLY"
Expand Down Expand Up @@ -72023,6 +72044,21 @@ components:
description: "Version of the incident manual trigger."
type: string
type: object
IncidentTriggerIncidentType:
description: "An incident type that triggers the workflow."
properties:
id:
description: "The ID of the incident type."
example: ""
type: string
required:
- id
type: object
IncidentTriggerIncidentTypes:
description: "The types of incident that trigger the workflow."
items:
$ref: "#/components/schemas/IncidentTriggerIncidentType"
type: array
IncidentTriggerWrapper:
description: "Schema for an incident-based trigger."
properties:
Expand Down
14 changes: 12 additions & 2 deletions src/datadog_api_client/v2/model/incident_created_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import Union, TYPE_CHECKING
from typing import List, Union, TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
Expand All @@ -14,41 +14,51 @@


if TYPE_CHECKING:
from datadog_api_client.v2.model.incident_trigger_incident_type import IncidentTriggerIncidentType
from datadog_api_client.v2.model.incident_condition import IncidentCondition


class IncidentCreatedTrigger(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.incident_trigger_incident_type import IncidentTriggerIncidentType
from datadog_api_client.v2.model.incident_condition import IncidentCondition

return {
"incident_type": (str,),
"incident_types": ([IncidentTriggerIncidentType],),
"tag_condition": (IncidentCondition,),
}

attribute_map = {
"incident_type": "incidentType",
"incident_types": "incidentTypes",
"tag_condition": "tagCondition",
}

def __init__(
self_,
incident_type: Union[str, UnsetType] = unset,
incident_types: Union[List[IncidentTriggerIncidentType], UnsetType] = unset,
tag_condition: Union[IncidentCondition, UnsetType] = unset,
**kwargs,
):
"""
Trigger a workflow when an incident is declared.

:param incident_type: The type of incident that triggers the workflow.
:param incident_type: Deprecated. Use ``incidentTypes`` instead. The type of incident that triggers the workflow. **Deprecated**.
:type incident_type: str, optional

:param incident_types: The types of incident that trigger the workflow.
:type incident_types: [IncidentTriggerIncidentType], optional

:param tag_condition: Conditions that determine which incidents trigger the workflow.
:type tag_condition: IncidentCondition, optional
"""
if incident_type is not unset:
kwargs["incident_type"] = incident_type
if incident_types is not unset:
kwargs["incident_types"] = incident_types
if tag_condition is not unset:
kwargs["tag_condition"] = tag_condition
super().__init__(kwargs)
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import Union, TYPE_CHECKING
from typing import List, Union, TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
Expand All @@ -15,31 +15,36 @@

if TYPE_CHECKING:
from datadog_api_client.v2.model.execution_limit import ExecutionLimit
from datadog_api_client.v2.model.incident_trigger_incident_type import IncidentTriggerIncidentType
from datadog_api_client.v2.model.incident_condition import IncidentCondition


class IncidentImpactCreatedTrigger(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.execution_limit import ExecutionLimit
from datadog_api_client.v2.model.incident_trigger_incident_type import IncidentTriggerIncidentType
from datadog_api_client.v2.model.incident_condition import IncidentCondition

return {
"execution_limit": (ExecutionLimit,),
"incident_type": (str,),
"incident_types": ([IncidentTriggerIncidentType],),
"tag_condition": (IncidentCondition,),
}

attribute_map = {
"execution_limit": "executionLimit",
"incident_type": "incidentType",
"incident_types": "incidentTypes",
"tag_condition": "tagCondition",
}

def __init__(
self_,
execution_limit: Union[ExecutionLimit, UnsetType] = unset,
incident_type: Union[str, UnsetType] = unset,
incident_types: Union[List[IncidentTriggerIncidentType], UnsetType] = unset,
tag_condition: Union[IncidentCondition, UnsetType] = unset,
**kwargs,
):
Expand All @@ -49,16 +54,21 @@ def __init__(
:param execution_limit: The maximum number of times to execute a workflow for an incident.
:type execution_limit: ExecutionLimit, optional

:param incident_type: The type of incident that triggers the workflow.
:param incident_type: Deprecated. Use ``incidentTypes`` instead. The type of incident that triggers the workflow. **Deprecated**.
:type incident_type: str, optional

:param incident_types: The types of incident that trigger the workflow.
:type incident_types: [IncidentTriggerIncidentType], optional

:param tag_condition: Conditions that determine which incidents trigger the workflow.
:type tag_condition: IncidentCondition, optional
"""
if execution_limit is not unset:
kwargs["execution_limit"] = execution_limit
if incident_type is not unset:
kwargs["incident_type"] = incident_type
if incident_types is not unset:
kwargs["incident_types"] = incident_types
if tag_condition is not unset:
kwargs["tag_condition"] = tag_condition
super().__init__(kwargs)
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import Union, TYPE_CHECKING
from typing import List, Union, TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
Expand All @@ -15,31 +15,36 @@

if TYPE_CHECKING:
from datadog_api_client.v2.model.execution_limit import ExecutionLimit
from datadog_api_client.v2.model.incident_trigger_incident_type import IncidentTriggerIncidentType
from datadog_api_client.v2.model.incident_condition import IncidentCondition


class IncidentImpactUpdatedTrigger(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.execution_limit import ExecutionLimit
from datadog_api_client.v2.model.incident_trigger_incident_type import IncidentTriggerIncidentType
from datadog_api_client.v2.model.incident_condition import IncidentCondition

return {
"execution_limit": (ExecutionLimit,),
"incident_type": (str,),
"incident_types": ([IncidentTriggerIncidentType],),
"tag_condition": (IncidentCondition,),
}

attribute_map = {
"execution_limit": "executionLimit",
"incident_type": "incidentType",
"incident_types": "incidentTypes",
"tag_condition": "tagCondition",
}

def __init__(
self_,
execution_limit: Union[ExecutionLimit, UnsetType] = unset,
incident_type: Union[str, UnsetType] = unset,
incident_types: Union[List[IncidentTriggerIncidentType], UnsetType] = unset,
tag_condition: Union[IncidentCondition, UnsetType] = unset,
**kwargs,
):
Expand All @@ -49,16 +54,21 @@ def __init__(
:param execution_limit: The maximum number of times to execute a workflow for an incident.
:type execution_limit: ExecutionLimit, optional

:param incident_type: The type of incident that triggers the workflow.
:param incident_type: Deprecated. Use ``incidentTypes`` instead. The type of incident that triggers the workflow. **Deprecated**.
:type incident_type: str, optional

:param incident_types: The types of incident that trigger the workflow.
:type incident_types: [IncidentTriggerIncidentType], optional

:param tag_condition: Conditions that determine which incidents trigger the workflow.
:type tag_condition: IncidentCondition, optional
"""
if execution_limit is not unset:
kwargs["execution_limit"] = execution_limit
if incident_type is not unset:
kwargs["incident_type"] = incident_type
if incident_types is not unset:
kwargs["incident_types"] = incident_types
if tag_condition is not unset:
kwargs["tag_condition"] = tag_condition
super().__init__(kwargs)
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import Union, TYPE_CHECKING
from typing import List, Union, TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
Expand All @@ -15,31 +15,36 @@

if TYPE_CHECKING:
from datadog_api_client.v2.model.execution_limit import ExecutionLimit
from datadog_api_client.v2.model.incident_trigger_incident_type import IncidentTriggerIncidentType
from datadog_api_client.v2.model.incident_condition import IncidentCondition


class IncidentPostmortemUpdatedTrigger(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.execution_limit import ExecutionLimit
from datadog_api_client.v2.model.incident_trigger_incident_type import IncidentTriggerIncidentType
from datadog_api_client.v2.model.incident_condition import IncidentCondition

return {
"execution_limit": (ExecutionLimit,),
"incident_type": (str,),
"incident_types": ([IncidentTriggerIncidentType],),
"tag_condition": (IncidentCondition,),
}

attribute_map = {
"execution_limit": "executionLimit",
"incident_type": "incidentType",
"incident_types": "incidentTypes",
"tag_condition": "tagCondition",
}

def __init__(
self_,
execution_limit: Union[ExecutionLimit, UnsetType] = unset,
incident_type: Union[str, UnsetType] = unset,
incident_types: Union[List[IncidentTriggerIncidentType], UnsetType] = unset,
tag_condition: Union[IncidentCondition, UnsetType] = unset,
**kwargs,
):
Expand All @@ -49,16 +54,21 @@ def __init__(
:param execution_limit: The maximum number of times to execute a workflow for an incident.
:type execution_limit: ExecutionLimit, optional

:param incident_type: The type of incident that triggers the workflow.
:param incident_type: Deprecated. Use ``incidentTypes`` instead. The type of incident that triggers the workflow. **Deprecated**.
:type incident_type: str, optional

:param incident_types: The types of incident that trigger the workflow.
:type incident_types: [IncidentTriggerIncidentType], optional

:param tag_condition: Conditions that determine which incidents trigger the workflow.
:type tag_condition: IncidentCondition, optional
"""
if execution_limit is not unset:
kwargs["execution_limit"] = execution_limit
if incident_type is not unset:
kwargs["incident_type"] = incident_type
if incident_types is not unset:
kwargs["incident_types"] = incident_types
if tag_condition is not unset:
kwargs["tag_condition"] = tag_condition
super().__init__(kwargs)
Loading
Loading