Skip to content

Commit c9585c1

Browse files
Autoclaude
andcommitted
feat(gooddata-sdk): [AUTO] add CatalogAutomationAlert with interval and trigger fields
Adds CatalogAutomationAlert wrapper class with AlertTrigger (ALWAYS, ONCE, ONCE_PER_INTERVAL) and IntervalGranularity (DAY, WEEK, MONTH, QUARTER, YEAR) typed fields, plus alert field to CatalogDeclarativeAutomation. Exports new class from the public API surface. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent b65ee3f commit c9585c1

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

packages/gooddata-sdk/src/gooddata_sdk/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@
191191
CatalogDeclarativeExportDefinitionRequestPayload,
192192
)
193193
from gooddata_sdk.catalog.workspace.declarative_model.workspace.automation import (
194+
CatalogAutomationAlert,
194195
CatalogAutomationSchedule,
195196
CatalogDeclarativeAutomation,
196197
)

packages/gooddata-sdk/src/gooddata_sdk/catalog/workspace/declarative_model/workspace/automation.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
# (C) 2024 GoodData Corporation
2+
from __future__ import annotations
3+
24
import builtins
3-
from typing import Any
5+
from typing import Any, Literal
46

57
from attrs import define, field
8+
from gooddata_api_client.model.automation_alert import AutomationAlert
69
from gooddata_api_client.model.automation_schedule import AutomationSchedule
710
from gooddata_api_client.model.automation_tabular_export import AutomationTabularExport
811
from gooddata_api_client.model.automation_visual_export import AutomationVisualExport
@@ -20,6 +23,9 @@
2023
)
2124
from gooddata_sdk.catalog.workspace.declarative_model.workspace.analytics_model.base import CatalogAnalyticsBaseMeta
2225

26+
AlertTrigger = Literal["ALWAYS", "ONCE", "ONCE_PER_INTERVAL"]
27+
IntervalGranularity = Literal["DAY", "WEEK", "MONTH", "QUARTER", "YEAR"]
28+
2329

2430
@define(kw_only=True)
2531
class CatalogAutomationSchedule(Base):
@@ -51,6 +57,18 @@ def client_class() -> builtins.type[AutomationVisualExport]:
5157
return AutomationVisualExport
5258

5359

60+
@define(kw_only=True)
61+
class CatalogAutomationAlert(Base):
62+
condition: dict[str, Any]
63+
execution: dict[str, Any]
64+
trigger: AlertTrigger | None = None
65+
interval: IntervalGranularity | None = None
66+
67+
@staticmethod
68+
def client_class() -> builtins.type[AutomationAlert]:
69+
return AutomationAlert
70+
71+
5472
@define(kw_only=True)
5573
class CatalogDeclarativeAutomation(CatalogAnalyticsBaseMeta):
5674
description: str | None = None
@@ -65,6 +83,7 @@ class CatalogDeclarativeAutomation(CatalogAnalyticsBaseMeta):
6583
schedule: CatalogAutomationSchedule | None = None
6684
tabular_exports: list[CatalogAutomationTabularExport] | None = None
6785
visual_exports: list[CatalogAutomationVisualExport] | None = None
86+
alert: CatalogAutomationAlert | None = None
6887

6988
@staticmethod
7089
def client_class() -> builtins.type[DeclarativeAutomation]:

0 commit comments

Comments
 (0)