pierrejeambrun commented on code in PR #54341:
URL: https://github.com/apache/airflow/pull/54341#discussion_r2267168975


##########
airflow-core/src/airflow/api_fastapi/common/parameters.py:
##########
@@ -443,8 +446,59 @@ def to_orm(self, select: Select) -> Select:
 
     @classmethod
     def depends(cls, owners: list[str] = Query(default_factory=list)) -> 
_OwnersFilter:
-        return cls().set_value(owners)
+        return cls().set_value(owners)    
+
+class TimetableTypes(str, Enum):
+    """Different timetable types."""
+
+    cron = "airflow.timetables.trigger.CronTriggerTimetable"
+    multiple_cron = "airflow.timetables.trigger.MultipleCronTriggerTimetable"
+    delta = "airflow.timetables.trigger.DeltaTriggerTimetable"
+    delta_data_interval = 
"airflow.timetables.trigger.DeltaDataIntervalTimetable"
+    cron_data_interval = "airflow.timetables.trigger.CronDataIntervalTimetable"
+    events = "airflow.timetables.events.EventsTimetable"
+    assets = "airflow.timetables.assets.AssetOrTimeSchedule"
+    no_trigger_defined= "airflow.timetables.simple.NullTimetable"
+    dataset = "airflow.timetables.dataset.DatasetTriggerTimetable"
+

Review Comment:
   I don't think we can do that because people can register custom timetable, 
which will not be one of those classes.
   
   So I think we have no other choice that setting a 'str' for this.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to