From 34130e18e8d46ebc68947afe5fa627eadb8955fb Mon Sep 17 00:00:00 2001 From: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com> Date: Mon, 9 Nov 2026 13:30:11 +0530 Subject: [PATCH] Update Python Client to 3.4.0rc1 Co-Authored-By: Claude --- CHANGELOG.md | 76 + airflow_client/client/__init__.py | 90 +- airflow_client/client/api/__init__.py | 1 + airflow_client/client/api/asset_api.py | 160 +- .../client/api/asset_state_store_api.py | 24 +- airflow_client/client/api/backfill_api.py | 363 ++- airflow_client/client/api/config_api.py | 12 +- airflow_client/client/api/connection_api.py | 65 +- airflow_client/client/api/dag_api.py | 362 ++- airflow_client/client/api/dag_bundle_api.py | 930 ++++++ airflow_client/client/api/dag_parsing_api.py | 4 +- airflow_client/client/api/dag_run_api.py | 132 +- airflow_client/client/api/dag_source_api.py | 6 +- airflow_client/client/api/dag_stats_api.py | 4 +- airflow_client/client/api/dag_version_api.py | 337 ++- airflow_client/client/api/dag_warning_api.py | 12 +- airflow_client/client/api/event_log_api.py | 127 +- airflow_client/client/api/experimental_api.py | 336 ++- airflow_client/client/api/extra_links_api.py | 48 +- airflow_client/client/api/import_error_api.py | 20 +- airflow_client/client/api/job_api.py | 73 +- airflow_client/client/api/login_api.py | 8 +- airflow_client/client/api/monitor_api.py | 4 +- airflow_client/client/api/plugin_api.py | 8 +- airflow_client/client/api/pool_api.py | 36 +- airflow_client/client/api/provider_api.py | 4 +- airflow_client/client/api/task_api.py | 33 +- .../client/api/task_instance_api.py | 1172 +++++++- .../client/api/task_state_store_api.py | 342 ++- airflow_client/client/api/variable_api.py | 39 +- airflow_client/client/api/version_api.py | 4 +- airflow_client/client/api/x_com_api.py | 199 +- airflow_client/client/api_client.py | 60 +- airflow_client/client/configuration.py | 2 +- airflow_client/client/models/__init__.py | 43 + airflow_client/client/models/actions_inner.py | 64 +- .../client/models/actions_inner1.py | 64 +- .../client/models/actions_inner2.py | 64 +- .../client/models/actions_inner3.py | 64 +- .../client/models/actions_inner4.py | 64 +- .../client/models/actions_inner5.py | 151 + airflow_client/client/models/all_inner.py | 181 ++ .../client/models/asset_event_response.py | 5 +- .../client/models/asset_expression_alias.py | 92 + .../models/asset_expression_alias_info.py | 90 + .../client/models/asset_expression_all.py | 97 + .../client/models/asset_expression_any.py | 97 + .../client/models/asset_expression_asset.py | 92 + .../models/asset_expression_asset_info.py | 96 + .../client/models/asset_expression_ref.py | 88 + .../asset_state_store_last_updated_by.py | 13 +- .../backfill_dag_run_collection_response.py | 97 + .../models/backfill_dag_run_response.py | 107 + .../client/models/backfill_post_body.py | 9 +- .../client/models/base_info_response.py | 5 +- .../client/models/bulk_body_bulk_dag_body.py | 95 + .../models/bulk_body_bulk_dag_run_body.py | 6 +- .../bulk_body_bulk_task_instance_body.py | 6 +- .../models/bulk_body_connection_body.py | 6 +- .../client/models/bulk_body_pool_body.py | 6 +- .../client/models/bulk_body_variable_body.py | 6 +- .../bulk_create_action_bulk_dag_body.py | 107 + airflow_client/client/models/bulk_dag_body.py | 93 + .../bulk_delete_action_bulk_dag_body.py | 107 + .../bulk_delete_action_bulk_dag_run_body.py | 6 +- ...k_delete_action_bulk_task_instance_body.py | 6 +- .../bulk_delete_action_connection_body.py | 6 +- .../models/bulk_delete_action_pool_body.py | 6 +- .../bulk_delete_action_variable_body.py | 6 +- .../client/models/bulk_task_instance_body.py | 7 +- .../bulk_update_action_bulk_dag_body.py | 109 + .../models/clear_task_instances_body.py | 15 +- .../models/dag_bundle_collection_response.py | 97 + .../models/dag_bundle_detail_response.py | 103 + .../dag_bundle_file_collection_response.py | 97 + .../client/models/dag_bundle_file_response.py | 97 + .../client/models/dag_bundle_response.py | 101 + .../client/models/dag_details_response.py | 17 +- .../dag_details_response_asset_expression.py | 179 ++ .../client/models/dag_patch_body.py | 11 +- .../models/dag_processor_info_response.py | 17 +- .../dag_processor_instance_info_response.py | 92 + airflow_client/client/models/dag_response.py | 7 +- .../client/models/dag_run_asset_reference.py | 2 +- .../client/models/dag_run_response.py | 4 +- .../models/dag_schedule_asset_reference.py | 6 +- .../client/models/dag_scheduling_state.py | 38 + .../client/models/dag_source_response.py | 4 +- .../models/dag_version_diff_category.py | 46 + .../dag_version_diff_change_response.py | 117 + .../client/models/dag_version_diff_impact.py | 40 + .../client/models/dag_version_diff_mode.py | 37 + .../models/dag_version_diff_operation.py | 38 + .../models/dag_version_diff_response.py | 119 + .../dag_version_diff_serializer_versions.py | 90 + .../models/dag_version_diff_values_status.py | 37 + .../client/models/dag_warning_response.py | 9 +- .../client/models/dag_warning_type.py | 2 + .../client/models/detailed_health_status.py | 38 + .../client/models/entities_inner.py | 28 +- .../client/models/entities_inner1.py | 28 +- .../client/models/entities_inner2.py | 28 +- .../client/models/entities_inner3.py | 28 +- .../client/models/entities_inner4.py | 28 +- .../client/models/entities_inner5.py | 136 + .../client/models/event_log_response.py | 9 +- .../client/models/external_view_response.py | 10 +- airflow_client/client/models/health_status.py | 37 + .../client/models/import_error_response.py | 10 +- airflow_client/client/models/job_response.py | 6 +- .../client/models/loop_iteration_response.py | 91 + .../client/models/materialize_asset_body.py | 8 +- .../client/models/patch_task_instance_body.py | 11 +- .../models/plugin_link_action_response.py | 127 + .../models/plugin_react_action_response.py | 127 + .../client/models/plugin_response.py | 17 +- airflow_client/client/models/pool_body.py | 9 +- .../client/models/react_app_response.py | 10 +- .../client/models/scheduler_info_response.py | 17 +- .../scheduler_instance_info_response.py | 90 + .../models/task_instance_history_response.py | 21 +- .../client/models/task_instance_response.py | 22 +- .../models/task_outlet_asset_reference.py | 6 +- .../models/trigger_dag_run_post_body.py | 10 +- .../client/models/triggerer_info_response.py | 17 +- .../triggerer_instance_info_response.py | 92 + .../client/models/ui_actions_inner.py | 140 + .../models/update_hitl_detail_payload.py | 7 +- airflow_client/client/models/variable_body.py | 9 +- airflow_client/client/models/warning_type.py | 143 + airflow_client/client/models/warning_type1.py | 137 + .../client/models/x_com_create_body.py | 10 +- .../client/models/x_com_response.py | 9 +- .../client/models/x_com_response_native.py | 9 +- .../client/models/x_com_response_string.py | 9 +- .../client/models/x_com_update_body.py | 10 +- airflow_client/client/rest.py | 2 +- docs/ActionsInner5.md | 33 + docs/AllInner.md | 33 + docs/AssetApi.md | 26 +- docs/AssetEventResponse.md | 1 + docs/AssetExpressionAlias.md | 30 + docs/AssetExpressionAliasInfo.md | 31 + docs/AssetExpressionAll.md | 30 + docs/AssetExpressionAny.md | 30 + docs/AssetExpressionAsset.md | 30 + docs/AssetExpressionAssetInfo.md | 34 + docs/AssetExpressionRef.md | 30 + docs/AssetStateStoreLastUpdatedBy.md | 4 + docs/BackfillApi.md | 92 + docs/BackfillDagRunCollectionResponse.md | 31 + docs/BackfillDagRunResponse.md | 38 + docs/BackfillPostBody.md | 1 + docs/BaseInfoResponse.md | 2 +- docs/BulkBodyBulkDAGBody.md | 29 + docs/BulkBodyBulkDAGRunBody.md | 2 +- docs/BulkBodyBulkTaskInstanceBody.md | 2 +- docs/BulkBodyConnectionBody.md | 2 +- docs/BulkBodyPoolBody.md | 2 +- docs/BulkBodyVariableBody.md | 2 +- docs/BulkCreateActionBulkDAGBody.md | 31 + docs/BulkDAGBody.md | 32 + docs/BulkDeleteActionBulkDAGBody.md | 31 + docs/BulkDeleteActionBulkDAGRunBody.md | 2 +- docs/BulkDeleteActionBulkTaskInstanceBody.md | 2 +- docs/BulkDeleteActionConnectionBody.md | 2 +- docs/BulkDeleteActionPoolBody.md | 2 +- docs/BulkDeleteActionVariableBody.md | 2 +- docs/BulkTaskInstanceBody.md | 2 + docs/BulkUpdateActionBulkDAGBody.md | 32 + docs/ClearTaskInstancesBody.md | 5 + docs/ConnectionApi.md | 1 + docs/DAGApi.md | 97 +- docs/DAGDetailsResponse.md | 6 +- docs/DAGDetailsResponseAssetExpression.md | 33 + docs/DAGPatchBody.md | 3 +- docs/DAGResponse.md | 3 +- docs/DAGRunResponse.md | 1 + docs/DAGSourceResponse.md | 1 + docs/DAGWarningResponse.md | 2 +- docs/DagBundleApi.md | 296 ++ docs/DagBundleCollectionResponse.md | 31 + docs/DagBundleDetailResponse.md | 37 + docs/DagBundleFileCollectionResponse.md | 31 + docs/DagBundleFileResponse.md | 34 + docs/DagBundleResponse.md | 36 + docs/DagProcessorInfoResponse.md | 4 +- docs/DagProcessorInstanceInfoResponse.md | 32 + docs/DagRunApi.md | 11 +- docs/DagRunAssetReference.md | 2 +- docs/DagScheduleAssetReference.md | 1 + docs/DagSchedulingState.md | 15 + docs/DagVersionApi.md | 95 + docs/DagVersionDiffCategory.md | 31 + docs/DagVersionDiffChangeResponse.md | 38 + docs/DagVersionDiffImpact.md | 19 + docs/DagVersionDiffMode.md | 13 + docs/DagVersionDiffOperation.md | 15 + docs/DagVersionDiffResponse.md | 39 + docs/DagVersionDiffSerializerVersions.md | 31 + docs/DagVersionDiffValuesStatus.md | 13 + docs/DagWarningApi.md | 4 +- docs/DagWarningType.md | 4 + docs/DetailedHealthStatus.md | 15 + docs/EntitiesInner.md | 7 +- docs/EntitiesInner1.md | 10 +- docs/EntitiesInner2.md | 22 +- docs/EntitiesInner3.md | 11 +- docs/EntitiesInner4.md | 5 +- docs/EntitiesInner5.md | 32 + docs/EventLogApi.md | 21 +- docs/EventLogResponse.md | 3 + docs/ExperimentalApi.md | 96 + docs/ExternalViewResponse.md | 1 + docs/ExtraLinksApi.md | 10 +- docs/HealthStatus.md | 13 + docs/ImportErrorApi.md | 4 +- docs/ImportErrorResponse.md | 2 + docs/JobApi.md | 12 +- docs/JobResponse.md | 2 + docs/LoopIterationResponse.md | 31 + docs/MaterializeAssetBody.md | 2 + docs/PatchTaskInstanceBody.md | 2 + docs/PluginLinkActionResponse.md | 36 + docs/PluginReactActionResponse.md | 36 + docs/PluginResponse.md | 2 + docs/ReactAppResponse.md | 1 + docs/ResponseClearDagRun.md | 1 + docs/ResponseGetXcomEntry.md | 3 + docs/SchedulerInfoResponse.md | 4 +- docs/SchedulerInstanceInfoResponse.md | 31 + docs/TaskApi.md | 10 +- docs/TaskInstanceApi.md | 242 +- docs/TaskInstanceHistoryResponse.md | 7 + docs/TaskInstanceResponse.md | 7 + docs/TaskInstancesInner.md | 7 + docs/TaskOutletAssetReference.md | 1 + docs/TaskStateStoreApi.md | 65 +- docs/TriggerDAGRunPostBody.md | 2 + docs/TriggererInfoResponse.md | 4 +- docs/TriggererInstanceInfoResponse.md | 32 + docs/UiActionsInner.md | 36 + docs/UpdateHITLDetailPayload.md | 1 + docs/VariableApi.md | 1 + docs/WarningType.md | 28 + docs/WarningType1.md | 28 + docs/XComApi.md | 35 +- docs/XComCreateBody.md | 2 + docs/XComResponse.md | 3 + docs/XComResponseNative.md | 3 + docs/XComResponseString.md | 3 + docs/XComUpdateBody.md | 2 + pyproject.toml | 16 +- spec/v2.yaml | 2678 ++++++++++++++++- test/test_actions_inner5.py | 63 + test/test_all_inner.py | 86 + test/test_asset_collection_response.py | 4 + test/test_asset_event_collection_response.py | 2 + test/test_asset_event_response.py | 1 + test/test_asset_expression_alias.py | 56 + test/test_asset_expression_alias_info.py | 54 + test/test_asset_expression_all.py | 56 + test/test_asset_expression_any.py | 56 + test/test_asset_expression_asset.py | 62 + test/test_asset_expression_asset_info.py | 56 + test/test_asset_expression_ref.py | 56 + test/test_asset_response.py | 4 + .../test_asset_state_store_last_updated_by.py | 6 +- test/test_asset_state_store_response.py | 6 +- test/test_backfill_api.py | 7 + ...st_backfill_dag_run_collection_response.py | 76 + test/test_backfill_dag_run_response.py | 63 + test/test_backfill_post_body.py | 3 +- test/test_base_info_response.py | 2 +- test/test_bulk_body_bulk_dag_body.py | 56 + test/test_bulk_create_action_bulk_dag_body.py | 65 + ...k_create_action_bulk_task_instance_body.py | 4 + test/test_bulk_create_action_pool_body.py | 4 +- test/test_bulk_create_action_variable_body.py | 4 +- test/test_bulk_dag_body.py | 54 + test/test_bulk_delete_action_bulk_dag_body.py | 59 + test/test_bulk_task_instance_body.py | 2 + test/test_bulk_update_action_bulk_dag_body.py | 68 + ...k_update_action_bulk_task_instance_body.py | 4 + test/test_bulk_update_action_pool_body.py | 4 +- test/test_bulk_update_action_variable_body.py | 4 +- test/test_clear_task_instances_body.py | 9 + test/test_dag_api.py | 7 + test/test_dag_bundle_api.py | 52 + test/test_dag_bundle_collection_response.py | 72 + test/test_dag_bundle_detail_response.py | 60 + ...est_dag_bundle_file_collection_response.py | 68 + test/test_dag_bundle_file_response.py | 57 + test/test_dag_bundle_response.py | 58 + test/test_dag_collection_response.py | 2 + test/test_dag_details_response.py | 5 +- ...t_dag_details_response_asset_expression.py | 86 + test/test_dag_patch_body.py | 4 +- test/test_dag_processor_info_response.py | 11 +- ...st_dag_processor_instance_info_response.py | 55 + test/test_dag_response.py | 2 +- test/test_dag_run_asset_reference.py | 1 - test/test_dag_run_collection_response.py | 2 + test/test_dag_run_response.py | 1 + test/test_dag_schedule_asset_reference.py | 1 + test/test_dag_scheduling_state.py | 33 + test/test_dag_source_response.py | 1 + test/test_dag_version_api.py | 7 + test/test_dag_version_diff_category.py | 33 + test/test_dag_version_diff_change_response.py | 64 + test/test_dag_version_diff_impact.py | 33 + test/test_dag_version_diff_mode.py | 33 + test/test_dag_version_diff_operation.py | 33 + test/test_dag_version_diff_response.py | 95 + ...st_dag_version_diff_serializer_versions.py | 52 + test/test_dag_version_diff_values_status.py | 33 + test/test_dag_warning_collection_response.py | 4 +- test/test_dag_warning_response.py | 4 +- test/test_detailed_health_status.py | 33 + test/test_entities_inner.py | 7 +- test/test_entities_inner1.py | 10 +- test/test_entities_inner2.py | 25 +- test/test_entities_inner3.py | 15 +- test/test_entities_inner4.py | 11 +- test/test_entities_inner5.py | 56 + test/test_event_log_collection_response.py | 6 + test/test_event_log_response.py | 3 + test/test_experimental_api.py | 7 + test/test_external_view_response.py | 5 + test/test_health_info_response.py | 53 +- test/test_health_status.py | 33 + test/test_hitl_detail.py | 14 + test/test_hitl_detail_collection.py | 14 + test/test_hitl_detail_history.py | 14 + test/test_http_validation_error.py | 2 +- test/test_import_error_collection_response.py | 4 + test/test_import_error_response.py | 3 + test/test_job_collection_response.py | 12 + test/test_job_response.py | 6 + test/test_loop_iteration_response.py | 54 + test/test_materialize_asset_body.py | 2 + test/test_patch_task_instance_body.py | 4 +- test/test_plugin_collection_response.py | 8 + test/test_plugin_link_action_response.py | 65 + test/test_plugin_react_action_response.py | 65 + test/test_plugin_response.py | 4 + test/test_pool_body.py | 4 +- test/test_react_app_response.py | 5 + test/test_response_clear_dag_run.py | 1 + test/test_response_clear_dag_runs.py | 2 + test/test_response_get_xcom_entry.py | 3 + test/test_scheduler_info_response.py | 8 +- test/test_scheduler_instance_info_response.py | 52 + .../test_task_instance_collection_response.py | 14 + ...sk_instance_history_collection_response.py | 14 + test/test_task_instance_history_response.py | 10 + test/test_task_instance_response.py | 16 + test/test_task_instances_inner.py | 16 + test/test_task_outlet_asset_reference.py | 1 + test/test_trigger_dag_run_post_body.py | 2 + test/test_triggerer_info_response.py | 11 +- test/test_triggerer_instance_info_response.py | 58 + test/test_ui_actions_inner.py | 67 + test/test_update_hitl_detail_payload.py | 3 +- test/test_validation_error.py | 2 +- test/test_variable_body.py | 4 +- test/test_warning_type.py | 50 + test/test_warning_type1.py | 50 + test/test_x_com_collection_response.py | 6 + test/test_x_com_create_body.py | 2 + test/test_x_com_response.py | 3 + test/test_x_com_response_native.py | 3 + test/test_x_com_response_string.py | 3 + test/test_x_com_update_body.py | 2 + test_python_client.py | 2 +- version.txt | 2 +- 376 files changed, 17332 insertions(+), 1131 deletions(-) create mode 100644 airflow_client/client/api/dag_bundle_api.py create mode 100644 airflow_client/client/models/actions_inner5.py create mode 100644 airflow_client/client/models/all_inner.py create mode 100644 airflow_client/client/models/asset_expression_alias.py create mode 100644 airflow_client/client/models/asset_expression_alias_info.py create mode 100644 airflow_client/client/models/asset_expression_all.py create mode 100644 airflow_client/client/models/asset_expression_any.py create mode 100644 airflow_client/client/models/asset_expression_asset.py create mode 100644 airflow_client/client/models/asset_expression_asset_info.py create mode 100644 airflow_client/client/models/asset_expression_ref.py create mode 100644 airflow_client/client/models/backfill_dag_run_collection_response.py create mode 100644 airflow_client/client/models/backfill_dag_run_response.py create mode 100644 airflow_client/client/models/bulk_body_bulk_dag_body.py create mode 100644 airflow_client/client/models/bulk_create_action_bulk_dag_body.py create mode 100644 airflow_client/client/models/bulk_dag_body.py create mode 100644 airflow_client/client/models/bulk_delete_action_bulk_dag_body.py create mode 100644 airflow_client/client/models/bulk_update_action_bulk_dag_body.py create mode 100644 airflow_client/client/models/dag_bundle_collection_response.py create mode 100644 airflow_client/client/models/dag_bundle_detail_response.py create mode 100644 airflow_client/client/models/dag_bundle_file_collection_response.py create mode 100644 airflow_client/client/models/dag_bundle_file_response.py create mode 100644 airflow_client/client/models/dag_bundle_response.py create mode 100644 airflow_client/client/models/dag_details_response_asset_expression.py create mode 100644 airflow_client/client/models/dag_processor_instance_info_response.py create mode 100644 airflow_client/client/models/dag_scheduling_state.py create mode 100644 airflow_client/client/models/dag_version_diff_category.py create mode 100644 airflow_client/client/models/dag_version_diff_change_response.py create mode 100644 airflow_client/client/models/dag_version_diff_impact.py create mode 100644 airflow_client/client/models/dag_version_diff_mode.py create mode 100644 airflow_client/client/models/dag_version_diff_operation.py create mode 100644 airflow_client/client/models/dag_version_diff_response.py create mode 100644 airflow_client/client/models/dag_version_diff_serializer_versions.py create mode 100644 airflow_client/client/models/dag_version_diff_values_status.py create mode 100644 airflow_client/client/models/detailed_health_status.py create mode 100644 airflow_client/client/models/entities_inner5.py create mode 100644 airflow_client/client/models/health_status.py create mode 100644 airflow_client/client/models/loop_iteration_response.py create mode 100644 airflow_client/client/models/plugin_link_action_response.py create mode 100644 airflow_client/client/models/plugin_react_action_response.py create mode 100644 airflow_client/client/models/scheduler_instance_info_response.py create mode 100644 airflow_client/client/models/triggerer_instance_info_response.py create mode 100644 airflow_client/client/models/ui_actions_inner.py create mode 100644 airflow_client/client/models/warning_type.py create mode 100644 airflow_client/client/models/warning_type1.py create mode 100644 docs/ActionsInner5.md create mode 100644 docs/AllInner.md create mode 100644 docs/AssetExpressionAlias.md create mode 100644 docs/AssetExpressionAliasInfo.md create mode 100644 docs/AssetExpressionAll.md create mode 100644 docs/AssetExpressionAny.md create mode 100644 docs/AssetExpressionAsset.md create mode 100644 docs/AssetExpressionAssetInfo.md create mode 100644 docs/AssetExpressionRef.md create mode 100644 docs/BackfillDagRunCollectionResponse.md create mode 100644 docs/BackfillDagRunResponse.md create mode 100644 docs/BulkBodyBulkDAGBody.md create mode 100644 docs/BulkCreateActionBulkDAGBody.md create mode 100644 docs/BulkDAGBody.md create mode 100644 docs/BulkDeleteActionBulkDAGBody.md create mode 100644 docs/BulkUpdateActionBulkDAGBody.md create mode 100644 docs/DAGDetailsResponseAssetExpression.md create mode 100644 docs/DagBundleApi.md create mode 100644 docs/DagBundleCollectionResponse.md create mode 100644 docs/DagBundleDetailResponse.md create mode 100644 docs/DagBundleFileCollectionResponse.md create mode 100644 docs/DagBundleFileResponse.md create mode 100644 docs/DagBundleResponse.md create mode 100644 docs/DagProcessorInstanceInfoResponse.md create mode 100644 docs/DagSchedulingState.md create mode 100644 docs/DagVersionDiffCategory.md create mode 100644 docs/DagVersionDiffChangeResponse.md create mode 100644 docs/DagVersionDiffImpact.md create mode 100644 docs/DagVersionDiffMode.md create mode 100644 docs/DagVersionDiffOperation.md create mode 100644 docs/DagVersionDiffResponse.md create mode 100644 docs/DagVersionDiffSerializerVersions.md create mode 100644 docs/DagVersionDiffValuesStatus.md create mode 100644 docs/DetailedHealthStatus.md create mode 100644 docs/EntitiesInner5.md create mode 100644 docs/HealthStatus.md create mode 100644 docs/LoopIterationResponse.md create mode 100644 docs/PluginLinkActionResponse.md create mode 100644 docs/PluginReactActionResponse.md create mode 100644 docs/SchedulerInstanceInfoResponse.md create mode 100644 docs/TriggererInstanceInfoResponse.md create mode 100644 docs/UiActionsInner.md create mode 100644 docs/WarningType.md create mode 100644 docs/WarningType1.md create mode 100644 test/test_actions_inner5.py create mode 100644 test/test_all_inner.py create mode 100644 test/test_asset_expression_alias.py create mode 100644 test/test_asset_expression_alias_info.py create mode 100644 test/test_asset_expression_all.py create mode 100644 test/test_asset_expression_any.py create mode 100644 test/test_asset_expression_asset.py create mode 100644 test/test_asset_expression_asset_info.py create mode 100644 test/test_asset_expression_ref.py create mode 100644 test/test_backfill_dag_run_collection_response.py create mode 100644 test/test_backfill_dag_run_response.py create mode 100644 test/test_bulk_body_bulk_dag_body.py create mode 100644 test/test_bulk_create_action_bulk_dag_body.py create mode 100644 test/test_bulk_dag_body.py create mode 100644 test/test_bulk_delete_action_bulk_dag_body.py create mode 100644 test/test_bulk_update_action_bulk_dag_body.py create mode 100644 test/test_dag_bundle_api.py create mode 100644 test/test_dag_bundle_collection_response.py create mode 100644 test/test_dag_bundle_detail_response.py create mode 100644 test/test_dag_bundle_file_collection_response.py create mode 100644 test/test_dag_bundle_file_response.py create mode 100644 test/test_dag_bundle_response.py create mode 100644 test/test_dag_details_response_asset_expression.py create mode 100644 test/test_dag_processor_instance_info_response.py create mode 100644 test/test_dag_scheduling_state.py create mode 100644 test/test_dag_version_diff_category.py create mode 100644 test/test_dag_version_diff_change_response.py create mode 100644 test/test_dag_version_diff_impact.py create mode 100644 test/test_dag_version_diff_mode.py create mode 100644 test/test_dag_version_diff_operation.py create mode 100644 test/test_dag_version_diff_response.py create mode 100644 test/test_dag_version_diff_serializer_versions.py create mode 100644 test/test_dag_version_diff_values_status.py create mode 100644 test/test_detailed_health_status.py create mode 100644 test/test_entities_inner5.py create mode 100644 test/test_health_status.py create mode 100644 test/test_loop_iteration_response.py create mode 100644 test/test_plugin_link_action_response.py create mode 100644 test/test_plugin_react_action_response.py create mode 100644 test/test_scheduler_instance_info_response.py create mode 100644 test/test_triggerer_instance_info_response.py create mode 100644 test/test_ui_actions_inner.py create mode 100644 test/test_warning_type.py create mode 100644 test/test_warning_type1.py diff --git a/CHANGELOG.md b/CHANGELOG.md index f0f5a666..641edc48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,82 @@ under the License. --> +# v3.4.0 + +## New Features: + +- Let plugins add their own actions to Dag, run and task instance rows (#75427) +- Add an API endpoint comparing two stored Dag versions (#73322) +- Allow filtering the Dag runs list by Dag tags (#70861) +- Add a draining state for graceful Dag pausing (#72407) +- Add bulk pause, drain and unpause actions to the Dags list (#73055) +- Add a Dag bundle detail endpoint listing the files in a bundle (#73009) +- Add an `is_scheduled` filter to the REST API (#72029) +- Add an API endpoint for backfill Dag run entries (#67381) +- Add a bundle-version parameter to the Dag run trigger endpoint (#61550) +- Add an exact-match `uri` filter to `GET /assets` (#69489) +- Add `partition_key` and `partition_key_regexp_pattern` filters for asset events (#64610) +- Add extra-field filtering for asset events (#64611) +- Add filters and pagination to the jobs list (#68616) +- Add an Asset Tab plugin (#69986) +- Add React plugin support to Dag and task overviews (#69992) +- Add `owner_display_name` substring and prefix filters to the Dag list (#70583) +- Add a team column and filter to the Dag run and task instance lists (#70241) +- Add a team column and filter to the jobs list (#73295) +- Add a team column and filter to the XComs list (#72158) +- Add a team column and filter to the audit log (#71916) +- Add a team filter to the Human-in-the-loop task instances listing (#73726) +- Add Task Loops: expose loop iterations and outcomes via `loop_id`/`iteration` filters and a `LoopIterationResponse` (#74354) +- Read current task executions by exact loop region (`region_id`/`region_index`) and try (#74350) +- Clear selected task-loop work and regenerate only what was replaced (#74349) +- Describe a task at a specific Dag version via the task endpoint (#74365) +- Filter task instances by `loop_id` and a single loop pass (#74931) + +## Improvements: + +- Expose the retry deadline on task instances and reset run fields when a retry starts (#76028) +- Surface the retry-policy decision on task instances (#73030) +- Attribute log, asset-event and asset-state writes to the task attempt (#74347) +- Expose an `in_loop` flag on task instances (#74352) +- Give every mapped expansion a loop region, including a `409` on region conflicts (#74346) +- Let loop gates record human-readable decisions (#74932) +- Number task loop iterations from one instead of zero (#75260) +- Deprecate cyclic TaskGroup dependencies, adding a `task group cycle` Dag warning (#73746) +- Scope plugin views on any entity field, not a fixed criteria set (#74278) +- Allow scoping plugin tabs to specific Dags and tasks (#69148) +- Add a `team_name` attribute to plugins for multi-team (#69502) +- Allow a Job to be associated with several teams (#73561) +- Expand the health endpoint reporting (#70416) +- Add `source_reference` and `language` to the warning, import-error and Dag source models (#72474) +- Add a `duplicate dag id` Dag warning type (#68791) +- Show Dag bundle versions and refresh times (#72909) +- Show the owning team in asset dependencies (#71446) +- Show the owning team on Dag, Dag run and task instance detail responses (#70312) +- Add `owner_display_name` to the audit log (#68833) +- Return a `file_token` on Dag import errors for requesting a reparse (#72896) +- Allow explicit runs to drain a paused Dag (#73763) +- Type `asset_expression` in the REST API so consumers need not cast through unknown (#67725) +- Document HTTP statuses that route helpers raise (#74027) +- Keep OpenAPI error responses in sync with the statuses routes raise (#71647) +- Document favorite Dag's 409 and return a readable conflict message (#73411) +- Make `latest_dag_version` a required field on the Dag details response (#74247) + +## Bug Fixes: + +- Clear retry-policy state when a task instance is cleared (#75646) +- Reject non-positive `max_active_runs` when creating a backfill (#75320) +- Reject blank pool names and variable keys in the REST API (#75258) +- Fix HTTP 500 when ordering the Dag list by state or start date (#75148) +- Refuse a Human-in-the-loop response for a request the task has since replaced (#74982) +- Filter the jobs `is_alive` check in SQL so pagination stays correct (#73684) +- Discard a task instance's stored task-state values when it is cleared (#72100) +- Clear all task instances in a task group, not just the first page (#73547) +- Require a request body on the asset materialize endpoint (#73328) +- Hide unreadable assets in the asset expression served by `next_run_assets` (#72864) +- Stop reporting components as degraded after an instance restart (#73222) +- Return asset events for Dag runs without a start date (#71379) +- Fix the Dag detail HTTP 500 for Dags without a `fileloc` (#69110) + # v3.3.2 ## Improvements: diff --git a/airflow_client/client/__init__.py b/airflow_client/client/__init__.py index ea4fcb21..79b82418 100644 --- a/airflow_client/client/__init__.py +++ b/airflow_client/client/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "3.3.2" +__version__ = "3.4.0" # Define package exports __all__ = [ @@ -30,6 +30,7 @@ "DagStatsApi", "DagVersionApi", "DagWarningApi", + "DagBundleApi", "EventLogApi", "ExtraLinksApi", "ImportErrorApi", @@ -60,6 +61,8 @@ "ActionsInner2", "ActionsInner3", "ActionsInner4", + "ActionsInner5", + "AllInner", "AppBuilderMenuItemResponse", "AppBuilderViewResponse", "AssetAliasCollectionResponse", @@ -68,6 +71,13 @@ "AssetEventAccessControl", "AssetEventCollectionResponse", "AssetEventResponse", + "AssetExpressionAlias", + "AssetExpressionAliasInfo", + "AssetExpressionAll", + "AssetExpressionAny", + "AssetExpressionAsset", + "AssetExpressionAssetInfo", + "AssetExpressionRef", "AssetResponse", "AssetStateStoreBody", "AssetStateStoreCollectionResponse", @@ -77,24 +87,30 @@ "AssetWatcherResponse", "AsyncConnectionTestResponse", "BackfillCollectionResponse", + "BackfillDagRunCollectionResponse", + "BackfillDagRunResponse", "BackfillPostBody", "BackfillResponse", "BaseInfoResponse", "BulkActionNotOnExistence", "BulkActionOnExistence", "BulkActionResponse", + "BulkBodyBulkDAGBody", "BulkBodyBulkDAGRunBody", "BulkBodyBulkTaskInstanceBody", "BulkBodyConnectionBody", "BulkBodyPoolBody", "BulkBodyVariableBody", + "BulkCreateActionBulkDAGBody", "BulkCreateActionBulkDAGRunBody", "BulkCreateActionBulkTaskInstanceBody", "BulkCreateActionConnectionBody", "BulkCreateActionPoolBody", "BulkCreateActionVariableBody", + "BulkDAGBody", "BulkDAGRunBody", "BulkDAGRunClearBody", + "BulkDeleteActionBulkDAGBody", "BulkDeleteActionBulkDAGRunBody", "BulkDeleteActionBulkTaskInstanceBody", "BulkDeleteActionConnectionBody", @@ -102,6 +118,7 @@ "BulkDeleteActionVariableBody", "BulkResponse", "BulkTaskInstanceBody", + "BulkUpdateActionBulkDAGBody", "BulkUpdateActionBulkDAGRunBody", "BulkUpdateActionBulkTaskInstanceBody", "BulkUpdateActionConnectionBody", @@ -125,6 +142,7 @@ "CreateAssetEventsBody", "DAGCollectionResponse", "DAGDetailsResponse", + "DAGDetailsResponseAssetExpression", "DAGPatchBody", "DAGResponse", "DAGRunClearBody", @@ -137,20 +155,36 @@ "DAGVersionCollectionResponse", "DAGWarningCollectionResponse", "DAGWarningResponse", + "DagBundleCollectionResponse", + "DagBundleDetailResponse", + "DagBundleFileCollectionResponse", + "DagBundleFileResponse", + "DagBundleResponse", "DagProcessorInfoResponse", + "DagProcessorInstanceInfoResponse", "DagRunAssetReference", "DagRunMutableStates", "DagRunState", "DagRunTriggeredByType", "DagRunType", "DagScheduleAssetReference", + "DagSchedulingState", "DagStatsCollectionResponse", "DagStatsResponse", "DagStatsStateResponse", "DagTagResponse", + "DagVersionDiffCategory", + "DagVersionDiffChangeResponse", + "DagVersionDiffImpact", + "DagVersionDiffMode", + "DagVersionDiffOperation", + "DagVersionDiffResponse", + "DagVersionDiffSerializerVersions", + "DagVersionDiffValuesStatus", "DagVersionResponse", "DagWarningType", "Detail", + "DetailedHealthStatus", "DryRunBackfillCollectionResponse", "DryRunBackfillResponse", "EntitiesInner", @@ -158,6 +192,7 @@ "EntitiesInner2", "EntitiesInner3", "EntitiesInner4", + "EntitiesInner5", "EventLogCollectionResponse", "EventLogResponse", "ExpiresAt", @@ -174,18 +209,22 @@ "HTTPExceptionResponse", "HTTPValidationError", "HealthInfoResponse", + "HealthStatus", "ImportErrorCollectionResponse", "ImportErrorResponse", "JobCollectionResponse", "JobResponse", "LastAssetEventResponse", "LocationInner", + "LoopIterationResponse", "MaterializeAssetBody", "NewTaskResponse", "PatchTaskInstanceBody", "PluginCollectionResponse", "PluginImportErrorCollectionResponse", "PluginImportErrorResponse", + "PluginLinkActionResponse", + "PluginReactActionResponse", "PluginResponse", "PoolBody", "PoolCollectionResponse", @@ -201,6 +240,7 @@ "ResponseClearDagRuns", "ResponseGetXcomEntry", "SchedulerInfoResponse", + "SchedulerInstanceInfoResponse", "StructuredLogMessage", "TaskCollectionResponse", "TaskDependencyCollectionResponse", @@ -224,6 +264,8 @@ "TriggerDAGRunPostBody", "TriggerResponse", "TriggererInfoResponse", + "TriggererInstanceInfoResponse", + "UiActionsInner", "UpdateHITLDetailPayload", "ValidationError", "Value", @@ -231,6 +273,8 @@ "VariableCollectionResponse", "VariableResponse", "VersionInfo", + "WarningType", + "WarningType1", "XComCollectionResponse", "XComCreateBody", "XComResponse", @@ -252,6 +296,7 @@ from airflow_client.client.api.dag_stats_api import DagStatsApi as DagStatsApi from airflow_client.client.api.dag_version_api import DagVersionApi as DagVersionApi from airflow_client.client.api.dag_warning_api import DagWarningApi as DagWarningApi +from airflow_client.client.api.dag_bundle_api import DagBundleApi as DagBundleApi from airflow_client.client.api.event_log_api import EventLogApi as EventLogApi from airflow_client.client.api.extra_links_api import ExtraLinksApi as ExtraLinksApi from airflow_client.client.api.import_error_api import ImportErrorApi as ImportErrorApi @@ -286,6 +331,8 @@ from airflow_client.client.models.actions_inner2 import ActionsInner2 as ActionsInner2 from airflow_client.client.models.actions_inner3 import ActionsInner3 as ActionsInner3 from airflow_client.client.models.actions_inner4 import ActionsInner4 as ActionsInner4 +from airflow_client.client.models.actions_inner5 import ActionsInner5 as ActionsInner5 +from airflow_client.client.models.all_inner import AllInner as AllInner from airflow_client.client.models.app_builder_menu_item_response import AppBuilderMenuItemResponse as AppBuilderMenuItemResponse from airflow_client.client.models.app_builder_view_response import AppBuilderViewResponse as AppBuilderViewResponse from airflow_client.client.models.asset_alias_collection_response import AssetAliasCollectionResponse as AssetAliasCollectionResponse @@ -294,6 +341,13 @@ from airflow_client.client.models.asset_event_access_control import AssetEventAccessControl as AssetEventAccessControl from airflow_client.client.models.asset_event_collection_response import AssetEventCollectionResponse as AssetEventCollectionResponse from airflow_client.client.models.asset_event_response import AssetEventResponse as AssetEventResponse +from airflow_client.client.models.asset_expression_alias import AssetExpressionAlias as AssetExpressionAlias +from airflow_client.client.models.asset_expression_alias_info import AssetExpressionAliasInfo as AssetExpressionAliasInfo +from airflow_client.client.models.asset_expression_all import AssetExpressionAll as AssetExpressionAll +from airflow_client.client.models.asset_expression_any import AssetExpressionAny as AssetExpressionAny +from airflow_client.client.models.asset_expression_asset import AssetExpressionAsset as AssetExpressionAsset +from airflow_client.client.models.asset_expression_asset_info import AssetExpressionAssetInfo as AssetExpressionAssetInfo +from airflow_client.client.models.asset_expression_ref import AssetExpressionRef as AssetExpressionRef from airflow_client.client.models.asset_response import AssetResponse as AssetResponse from airflow_client.client.models.asset_state_store_body import AssetStateStoreBody as AssetStateStoreBody from airflow_client.client.models.asset_state_store_collection_response import AssetStateStoreCollectionResponse as AssetStateStoreCollectionResponse @@ -303,24 +357,30 @@ from airflow_client.client.models.asset_watcher_response import AssetWatcherResponse as AssetWatcherResponse from airflow_client.client.models.async_connection_test_response import AsyncConnectionTestResponse as AsyncConnectionTestResponse from airflow_client.client.models.backfill_collection_response import BackfillCollectionResponse as BackfillCollectionResponse +from airflow_client.client.models.backfill_dag_run_collection_response import BackfillDagRunCollectionResponse as BackfillDagRunCollectionResponse +from airflow_client.client.models.backfill_dag_run_response import BackfillDagRunResponse as BackfillDagRunResponse from airflow_client.client.models.backfill_post_body import BackfillPostBody as BackfillPostBody from airflow_client.client.models.backfill_response import BackfillResponse as BackfillResponse from airflow_client.client.models.base_info_response import BaseInfoResponse as BaseInfoResponse from airflow_client.client.models.bulk_action_not_on_existence import BulkActionNotOnExistence as BulkActionNotOnExistence from airflow_client.client.models.bulk_action_on_existence import BulkActionOnExistence as BulkActionOnExistence from airflow_client.client.models.bulk_action_response import BulkActionResponse as BulkActionResponse +from airflow_client.client.models.bulk_body_bulk_dag_body import BulkBodyBulkDAGBody as BulkBodyBulkDAGBody from airflow_client.client.models.bulk_body_bulk_dag_run_body import BulkBodyBulkDAGRunBody as BulkBodyBulkDAGRunBody from airflow_client.client.models.bulk_body_bulk_task_instance_body import BulkBodyBulkTaskInstanceBody as BulkBodyBulkTaskInstanceBody from airflow_client.client.models.bulk_body_connection_body import BulkBodyConnectionBody as BulkBodyConnectionBody from airflow_client.client.models.bulk_body_pool_body import BulkBodyPoolBody as BulkBodyPoolBody from airflow_client.client.models.bulk_body_variable_body import BulkBodyVariableBody as BulkBodyVariableBody +from airflow_client.client.models.bulk_create_action_bulk_dag_body import BulkCreateActionBulkDAGBody as BulkCreateActionBulkDAGBody from airflow_client.client.models.bulk_create_action_bulk_dag_run_body import BulkCreateActionBulkDAGRunBody as BulkCreateActionBulkDAGRunBody from airflow_client.client.models.bulk_create_action_bulk_task_instance_body import BulkCreateActionBulkTaskInstanceBody as BulkCreateActionBulkTaskInstanceBody from airflow_client.client.models.bulk_create_action_connection_body import BulkCreateActionConnectionBody as BulkCreateActionConnectionBody from airflow_client.client.models.bulk_create_action_pool_body import BulkCreateActionPoolBody as BulkCreateActionPoolBody from airflow_client.client.models.bulk_create_action_variable_body import BulkCreateActionVariableBody as BulkCreateActionVariableBody +from airflow_client.client.models.bulk_dag_body import BulkDAGBody as BulkDAGBody from airflow_client.client.models.bulk_dag_run_body import BulkDAGRunBody as BulkDAGRunBody from airflow_client.client.models.bulk_dag_run_clear_body import BulkDAGRunClearBody as BulkDAGRunClearBody +from airflow_client.client.models.bulk_delete_action_bulk_dag_body import BulkDeleteActionBulkDAGBody as BulkDeleteActionBulkDAGBody from airflow_client.client.models.bulk_delete_action_bulk_dag_run_body import BulkDeleteActionBulkDAGRunBody as BulkDeleteActionBulkDAGRunBody from airflow_client.client.models.bulk_delete_action_bulk_task_instance_body import BulkDeleteActionBulkTaskInstanceBody as BulkDeleteActionBulkTaskInstanceBody from airflow_client.client.models.bulk_delete_action_connection_body import BulkDeleteActionConnectionBody as BulkDeleteActionConnectionBody @@ -328,6 +388,7 @@ from airflow_client.client.models.bulk_delete_action_variable_body import BulkDeleteActionVariableBody as BulkDeleteActionVariableBody from airflow_client.client.models.bulk_response import BulkResponse as BulkResponse from airflow_client.client.models.bulk_task_instance_body import BulkTaskInstanceBody as BulkTaskInstanceBody +from airflow_client.client.models.bulk_update_action_bulk_dag_body import BulkUpdateActionBulkDAGBody as BulkUpdateActionBulkDAGBody from airflow_client.client.models.bulk_update_action_bulk_dag_run_body import BulkUpdateActionBulkDAGRunBody as BulkUpdateActionBulkDAGRunBody from airflow_client.client.models.bulk_update_action_bulk_task_instance_body import BulkUpdateActionBulkTaskInstanceBody as BulkUpdateActionBulkTaskInstanceBody from airflow_client.client.models.bulk_update_action_connection_body import BulkUpdateActionConnectionBody as BulkUpdateActionConnectionBody @@ -351,6 +412,7 @@ from airflow_client.client.models.create_asset_events_body import CreateAssetEventsBody as CreateAssetEventsBody from airflow_client.client.models.dag_collection_response import DAGCollectionResponse as DAGCollectionResponse from airflow_client.client.models.dag_details_response import DAGDetailsResponse as DAGDetailsResponse +from airflow_client.client.models.dag_details_response_asset_expression import DAGDetailsResponseAssetExpression as DAGDetailsResponseAssetExpression from airflow_client.client.models.dag_patch_body import DAGPatchBody as DAGPatchBody from airflow_client.client.models.dag_response import DAGResponse as DAGResponse from airflow_client.client.models.dag_run_clear_body import DAGRunClearBody as DAGRunClearBody @@ -363,20 +425,36 @@ from airflow_client.client.models.dag_version_collection_response import DAGVersionCollectionResponse as DAGVersionCollectionResponse from airflow_client.client.models.dag_warning_collection_response import DAGWarningCollectionResponse as DAGWarningCollectionResponse from airflow_client.client.models.dag_warning_response import DAGWarningResponse as DAGWarningResponse +from airflow_client.client.models.dag_bundle_collection_response import DagBundleCollectionResponse as DagBundleCollectionResponse +from airflow_client.client.models.dag_bundle_detail_response import DagBundleDetailResponse as DagBundleDetailResponse +from airflow_client.client.models.dag_bundle_file_collection_response import DagBundleFileCollectionResponse as DagBundleFileCollectionResponse +from airflow_client.client.models.dag_bundle_file_response import DagBundleFileResponse as DagBundleFileResponse +from airflow_client.client.models.dag_bundle_response import DagBundleResponse as DagBundleResponse from airflow_client.client.models.dag_processor_info_response import DagProcessorInfoResponse as DagProcessorInfoResponse +from airflow_client.client.models.dag_processor_instance_info_response import DagProcessorInstanceInfoResponse as DagProcessorInstanceInfoResponse from airflow_client.client.models.dag_run_asset_reference import DagRunAssetReference as DagRunAssetReference from airflow_client.client.models.dag_run_mutable_states import DagRunMutableStates as DagRunMutableStates from airflow_client.client.models.dag_run_state import DagRunState as DagRunState from airflow_client.client.models.dag_run_triggered_by_type import DagRunTriggeredByType as DagRunTriggeredByType from airflow_client.client.models.dag_run_type import DagRunType as DagRunType from airflow_client.client.models.dag_schedule_asset_reference import DagScheduleAssetReference as DagScheduleAssetReference +from airflow_client.client.models.dag_scheduling_state import DagSchedulingState as DagSchedulingState from airflow_client.client.models.dag_stats_collection_response import DagStatsCollectionResponse as DagStatsCollectionResponse from airflow_client.client.models.dag_stats_response import DagStatsResponse as DagStatsResponse from airflow_client.client.models.dag_stats_state_response import DagStatsStateResponse as DagStatsStateResponse from airflow_client.client.models.dag_tag_response import DagTagResponse as DagTagResponse +from airflow_client.client.models.dag_version_diff_category import DagVersionDiffCategory as DagVersionDiffCategory +from airflow_client.client.models.dag_version_diff_change_response import DagVersionDiffChangeResponse as DagVersionDiffChangeResponse +from airflow_client.client.models.dag_version_diff_impact import DagVersionDiffImpact as DagVersionDiffImpact +from airflow_client.client.models.dag_version_diff_mode import DagVersionDiffMode as DagVersionDiffMode +from airflow_client.client.models.dag_version_diff_operation import DagVersionDiffOperation as DagVersionDiffOperation +from airflow_client.client.models.dag_version_diff_response import DagVersionDiffResponse as DagVersionDiffResponse +from airflow_client.client.models.dag_version_diff_serializer_versions import DagVersionDiffSerializerVersions as DagVersionDiffSerializerVersions +from airflow_client.client.models.dag_version_diff_values_status import DagVersionDiffValuesStatus as DagVersionDiffValuesStatus from airflow_client.client.models.dag_version_response import DagVersionResponse as DagVersionResponse from airflow_client.client.models.dag_warning_type import DagWarningType as DagWarningType from airflow_client.client.models.detail import Detail as Detail +from airflow_client.client.models.detailed_health_status import DetailedHealthStatus as DetailedHealthStatus from airflow_client.client.models.dry_run_backfill_collection_response import DryRunBackfillCollectionResponse as DryRunBackfillCollectionResponse from airflow_client.client.models.dry_run_backfill_response import DryRunBackfillResponse as DryRunBackfillResponse from airflow_client.client.models.entities_inner import EntitiesInner as EntitiesInner @@ -384,6 +462,7 @@ from airflow_client.client.models.entities_inner2 import EntitiesInner2 as EntitiesInner2 from airflow_client.client.models.entities_inner3 import EntitiesInner3 as EntitiesInner3 from airflow_client.client.models.entities_inner4 import EntitiesInner4 as EntitiesInner4 +from airflow_client.client.models.entities_inner5 import EntitiesInner5 as EntitiesInner5 from airflow_client.client.models.event_log_collection_response import EventLogCollectionResponse as EventLogCollectionResponse from airflow_client.client.models.event_log_response import EventLogResponse as EventLogResponse from airflow_client.client.models.expires_at import ExpiresAt as ExpiresAt @@ -400,18 +479,22 @@ from airflow_client.client.models.http_exception_response import HTTPExceptionResponse as HTTPExceptionResponse from airflow_client.client.models.http_validation_error import HTTPValidationError as HTTPValidationError from airflow_client.client.models.health_info_response import HealthInfoResponse as HealthInfoResponse +from airflow_client.client.models.health_status import HealthStatus as HealthStatus from airflow_client.client.models.import_error_collection_response import ImportErrorCollectionResponse as ImportErrorCollectionResponse from airflow_client.client.models.import_error_response import ImportErrorResponse as ImportErrorResponse from airflow_client.client.models.job_collection_response import JobCollectionResponse as JobCollectionResponse from airflow_client.client.models.job_response import JobResponse as JobResponse from airflow_client.client.models.last_asset_event_response import LastAssetEventResponse as LastAssetEventResponse from airflow_client.client.models.location_inner import LocationInner as LocationInner +from airflow_client.client.models.loop_iteration_response import LoopIterationResponse as LoopIterationResponse from airflow_client.client.models.materialize_asset_body import MaterializeAssetBody as MaterializeAssetBody from airflow_client.client.models.new_task_response import NewTaskResponse as NewTaskResponse from airflow_client.client.models.patch_task_instance_body import PatchTaskInstanceBody as PatchTaskInstanceBody from airflow_client.client.models.plugin_collection_response import PluginCollectionResponse as PluginCollectionResponse from airflow_client.client.models.plugin_import_error_collection_response import PluginImportErrorCollectionResponse as PluginImportErrorCollectionResponse from airflow_client.client.models.plugin_import_error_response import PluginImportErrorResponse as PluginImportErrorResponse +from airflow_client.client.models.plugin_link_action_response import PluginLinkActionResponse as PluginLinkActionResponse +from airflow_client.client.models.plugin_react_action_response import PluginReactActionResponse as PluginReactActionResponse from airflow_client.client.models.plugin_response import PluginResponse as PluginResponse from airflow_client.client.models.pool_body import PoolBody as PoolBody from airflow_client.client.models.pool_collection_response import PoolCollectionResponse as PoolCollectionResponse @@ -427,6 +510,7 @@ from airflow_client.client.models.response_clear_dag_runs import ResponseClearDagRuns as ResponseClearDagRuns from airflow_client.client.models.response_get_xcom_entry import ResponseGetXcomEntry as ResponseGetXcomEntry from airflow_client.client.models.scheduler_info_response import SchedulerInfoResponse as SchedulerInfoResponse +from airflow_client.client.models.scheduler_instance_info_response import SchedulerInstanceInfoResponse as SchedulerInstanceInfoResponse from airflow_client.client.models.structured_log_message import StructuredLogMessage as StructuredLogMessage from airflow_client.client.models.task_collection_response import TaskCollectionResponse as TaskCollectionResponse from airflow_client.client.models.task_dependency_collection_response import TaskDependencyCollectionResponse as TaskDependencyCollectionResponse @@ -450,6 +534,8 @@ from airflow_client.client.models.trigger_dag_run_post_body import TriggerDAGRunPostBody as TriggerDAGRunPostBody from airflow_client.client.models.trigger_response import TriggerResponse as TriggerResponse from airflow_client.client.models.triggerer_info_response import TriggererInfoResponse as TriggererInfoResponse +from airflow_client.client.models.triggerer_instance_info_response import TriggererInstanceInfoResponse as TriggererInstanceInfoResponse +from airflow_client.client.models.ui_actions_inner import UiActionsInner as UiActionsInner from airflow_client.client.models.update_hitl_detail_payload import UpdateHITLDetailPayload as UpdateHITLDetailPayload from airflow_client.client.models.validation_error import ValidationError as ValidationError from airflow_client.client.models.value import Value as Value @@ -457,6 +543,8 @@ from airflow_client.client.models.variable_collection_response import VariableCollectionResponse as VariableCollectionResponse from airflow_client.client.models.variable_response import VariableResponse as VariableResponse from airflow_client.client.models.version_info import VersionInfo as VersionInfo +from airflow_client.client.models.warning_type import WarningType as WarningType +from airflow_client.client.models.warning_type1 import WarningType1 as WarningType1 from airflow_client.client.models.x_com_collection_response import XComCollectionResponse as XComCollectionResponse from airflow_client.client.models.x_com_create_body import XComCreateBody as XComCreateBody from airflow_client.client.models.x_com_response import XComResponse as XComResponse diff --git a/airflow_client/client/api/__init__.py b/airflow_client/client/api/__init__.py index a148b644..d4d32e21 100644 --- a/airflow_client/client/api/__init__.py +++ b/airflow_client/client/api/__init__.py @@ -13,6 +13,7 @@ from airflow_client.client.api.dag_stats_api import DagStatsApi from airflow_client.client.api.dag_version_api import DagVersionApi from airflow_client.client.api.dag_warning_api import DagWarningApi +from airflow_client.client.api.dag_bundle_api import DagBundleApi from airflow_client.client.api.event_log_api import EventLogApi from airflow_client.client.api.extra_links_api import ExtraLinksApi from airflow_client.client.api.import_error_api import ImportErrorApi diff --git a/airflow_client/client/api/asset_api.py b/airflow_client/client/api/asset_api.py index 9c31b6c3..f8abcda3 100644 --- a/airflow_client/client/api/asset_api.py +++ b/airflow_client/client/api/asset_api.py @@ -19,6 +19,7 @@ from pydantic import Field, StrictBool, StrictInt, StrictStr from typing import Any, List, Optional from typing_extensions import Annotated +from uuid import UUID from airflow_client.client.models.asset_alias_collection_response import AssetAliasCollectionResponse from airflow_client.client.models.asset_collection_response import AssetCollectionResponse from airflow_client.client.models.asset_event_collection_response import AssetEventCollectionResponse @@ -273,7 +274,7 @@ def _create_asset_event_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -290,7 +291,7 @@ def _create_asset_event_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -299,7 +300,7 @@ def _create_asset_event_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -309,7 +310,7 @@ def _create_asset_event_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -573,7 +574,7 @@ def _delete_asset_queued_events_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -594,7 +595,7 @@ def _delete_asset_queued_events_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -880,7 +881,7 @@ def _delete_dag_asset_queued_event_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -903,7 +904,7 @@ def _delete_dag_asset_queued_event_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1173,7 +1174,7 @@ def _delete_dag_asset_queued_events_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1194,7 +1195,7 @@ def _delete_dag_asset_queued_events_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1451,7 +1452,7 @@ def _get_asset_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1468,7 +1469,7 @@ def _get_asset_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1725,7 +1726,7 @@ def _get_asset_alias_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1742,7 +1743,7 @@ def _get_asset_alias_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -2052,7 +2053,7 @@ def _get_asset_aliases_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -2087,7 +2088,7 @@ def _get_asset_aliases_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -2128,10 +2129,14 @@ def get_asset_events( asset_id: Optional[StrictInt] = None, source_dag_id: Optional[StrictStr] = None, source_task_id: Optional[StrictStr] = None, + source_task_instance_id: Optional[UUID] = None, source_run_id: Optional[StrictStr] = None, source_map_index: Optional[StrictInt] = None, + partition_key: Optional[StrictStr] = None, + partition_key_regexp_pattern: Annotated[Optional[StrictStr], Field(description="Filter results by matching this regular expression against the field value.")] = None, name_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, name_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, + extra: Annotated[Optional[List[StrictStr]], Field(description="Filter by JSON key-value pairs. Repeat for multiple conditions (AND logic). Format: key=value (e.g. extra=region=us&extra=env=prod).")] = None, timestamp_gte: Optional[datetime] = None, timestamp_gt: Optional[datetime] = None, timestamp_lte: Optional[datetime] = None, @@ -2165,14 +2170,22 @@ def get_asset_events( :type source_dag_id: str :param source_task_id: :type source_task_id: str + :param source_task_instance_id: + :type source_task_instance_id: UUID :param source_run_id: :type source_run_id: str :param source_map_index: :type source_map_index: int + :param partition_key: + :type partition_key: str + :param partition_key_regexp_pattern: Filter results by matching this regular expression against the field value. + :type partition_key_regexp_pattern: str :param name_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". :type name_pattern: str :param name_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". :type name_prefix_pattern: str + :param extra: Filter by JSON key-value pairs. Repeat for multiple conditions (AND logic). Format: key=value (e.g. extra=region=us&extra=env=prod). + :type extra: List[str] :param timestamp_gte: :type timestamp_gte: datetime :param timestamp_gt: @@ -2210,10 +2223,14 @@ def get_asset_events( asset_id=asset_id, source_dag_id=source_dag_id, source_task_id=source_task_id, + source_task_instance_id=source_task_instance_id, source_run_id=source_run_id, source_map_index=source_map_index, + partition_key=partition_key, + partition_key_regexp_pattern=partition_key_regexp_pattern, name_pattern=name_pattern, name_prefix_pattern=name_prefix_pattern, + extra=extra, timestamp_gte=timestamp_gte, timestamp_gt=timestamp_gt, timestamp_lte=timestamp_lte, @@ -2251,10 +2268,14 @@ def get_asset_events_with_http_info( asset_id: Optional[StrictInt] = None, source_dag_id: Optional[StrictStr] = None, source_task_id: Optional[StrictStr] = None, + source_task_instance_id: Optional[UUID] = None, source_run_id: Optional[StrictStr] = None, source_map_index: Optional[StrictInt] = None, + partition_key: Optional[StrictStr] = None, + partition_key_regexp_pattern: Annotated[Optional[StrictStr], Field(description="Filter results by matching this regular expression against the field value.")] = None, name_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, name_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, + extra: Annotated[Optional[List[StrictStr]], Field(description="Filter by JSON key-value pairs. Repeat for multiple conditions (AND logic). Format: key=value (e.g. extra=region=us&extra=env=prod).")] = None, timestamp_gte: Optional[datetime] = None, timestamp_gt: Optional[datetime] = None, timestamp_lte: Optional[datetime] = None, @@ -2288,14 +2309,22 @@ def get_asset_events_with_http_info( :type source_dag_id: str :param source_task_id: :type source_task_id: str + :param source_task_instance_id: + :type source_task_instance_id: UUID :param source_run_id: :type source_run_id: str :param source_map_index: :type source_map_index: int + :param partition_key: + :type partition_key: str + :param partition_key_regexp_pattern: Filter results by matching this regular expression against the field value. + :type partition_key_regexp_pattern: str :param name_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". :type name_pattern: str :param name_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". :type name_prefix_pattern: str + :param extra: Filter by JSON key-value pairs. Repeat for multiple conditions (AND logic). Format: key=value (e.g. extra=region=us&extra=env=prod). + :type extra: List[str] :param timestamp_gte: :type timestamp_gte: datetime :param timestamp_gt: @@ -2333,10 +2362,14 @@ def get_asset_events_with_http_info( asset_id=asset_id, source_dag_id=source_dag_id, source_task_id=source_task_id, + source_task_instance_id=source_task_instance_id, source_run_id=source_run_id, source_map_index=source_map_index, + partition_key=partition_key, + partition_key_regexp_pattern=partition_key_regexp_pattern, name_pattern=name_pattern, name_prefix_pattern=name_prefix_pattern, + extra=extra, timestamp_gte=timestamp_gte, timestamp_gt=timestamp_gt, timestamp_lte=timestamp_lte, @@ -2374,10 +2407,14 @@ def get_asset_events_without_preload_content( asset_id: Optional[StrictInt] = None, source_dag_id: Optional[StrictStr] = None, source_task_id: Optional[StrictStr] = None, + source_task_instance_id: Optional[UUID] = None, source_run_id: Optional[StrictStr] = None, source_map_index: Optional[StrictInt] = None, + partition_key: Optional[StrictStr] = None, + partition_key_regexp_pattern: Annotated[Optional[StrictStr], Field(description="Filter results by matching this regular expression against the field value.")] = None, name_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, name_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, + extra: Annotated[Optional[List[StrictStr]], Field(description="Filter by JSON key-value pairs. Repeat for multiple conditions (AND logic). Format: key=value (e.g. extra=region=us&extra=env=prod).")] = None, timestamp_gte: Optional[datetime] = None, timestamp_gt: Optional[datetime] = None, timestamp_lte: Optional[datetime] = None, @@ -2411,14 +2448,22 @@ def get_asset_events_without_preload_content( :type source_dag_id: str :param source_task_id: :type source_task_id: str + :param source_task_instance_id: + :type source_task_instance_id: UUID :param source_run_id: :type source_run_id: str :param source_map_index: :type source_map_index: int + :param partition_key: + :type partition_key: str + :param partition_key_regexp_pattern: Filter results by matching this regular expression against the field value. + :type partition_key_regexp_pattern: str :param name_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". :type name_pattern: str :param name_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". :type name_prefix_pattern: str + :param extra: Filter by JSON key-value pairs. Repeat for multiple conditions (AND logic). Format: key=value (e.g. extra=region=us&extra=env=prod). + :type extra: List[str] :param timestamp_gte: :type timestamp_gte: datetime :param timestamp_gt: @@ -2456,10 +2501,14 @@ def get_asset_events_without_preload_content( asset_id=asset_id, source_dag_id=source_dag_id, source_task_id=source_task_id, + source_task_instance_id=source_task_instance_id, source_run_id=source_run_id, source_map_index=source_map_index, + partition_key=partition_key, + partition_key_regexp_pattern=partition_key_regexp_pattern, name_pattern=name_pattern, name_prefix_pattern=name_prefix_pattern, + extra=extra, timestamp_gte=timestamp_gte, timestamp_gt=timestamp_gt, timestamp_lte=timestamp_lte, @@ -2492,10 +2541,14 @@ def _get_asset_events_serialize( asset_id, source_dag_id, source_task_id, + source_task_instance_id, source_run_id, source_map_index, + partition_key, + partition_key_regexp_pattern, name_pattern, name_prefix_pattern, + extra, timestamp_gte, timestamp_gt, timestamp_lte, @@ -2510,11 +2563,12 @@ def _get_asset_events_serialize( _collection_formats: Dict[str, str] = { 'order_by': 'multi', + 'extra': 'multi', } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -2547,6 +2601,10 @@ def _get_asset_events_serialize( _query_params.append(('source_task_id', source_task_id)) + if source_task_instance_id is not None: + + _query_params.append(('source_task_instance_id', source_task_instance_id)) + if source_run_id is not None: _query_params.append(('source_run_id', source_run_id)) @@ -2555,6 +2613,14 @@ def _get_asset_events_serialize( _query_params.append(('source_map_index', source_map_index)) + if partition_key is not None: + + _query_params.append(('partition_key', partition_key)) + + if partition_key_regexp_pattern is not None: + + _query_params.append(('partition_key_regexp_pattern', partition_key_regexp_pattern)) + if name_pattern is not None: _query_params.append(('name_pattern', name_pattern)) @@ -2563,6 +2629,10 @@ def _get_asset_events_serialize( _query_params.append(('name_prefix_pattern', name_prefix_pattern)) + if extra is not None: + + _query_params.append(('extra', extra)) + if timestamp_gte is not None: if isinstance(timestamp_gte, datetime): _query_params.append( @@ -2621,7 +2691,7 @@ def _get_asset_events_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -2888,7 +2958,7 @@ def _get_asset_queued_events_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -2909,7 +2979,7 @@ def _get_asset_queued_events_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -2948,6 +3018,7 @@ def get_assets( offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, name_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, name_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, + uri: Annotated[Optional[List[StrictStr]], Field(description="Exact-match filter on the full asset URI. Compiles to an indexed equality comparison (``uri = ...``). Repeat the parameter (``?uri=a&uri=b``) to match multiple assets.")] = None, uri_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `uri_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, uri_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, dag_ids: Optional[List[StrictStr]] = None, @@ -2978,6 +3049,8 @@ def get_assets( :type name_pattern: str :param name_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". :type name_prefix_pattern: str + :param uri: Exact-match filter on the full asset URI. Compiles to an indexed equality comparison (``uri = ...``). Repeat the parameter (``?uri=a&uri=b``) to match multiple assets. + :type uri: List[str] :param uri_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `uri_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". :type uri_pattern: str :param uri_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". @@ -3015,6 +3088,7 @@ def get_assets( offset=offset, name_pattern=name_pattern, name_prefix_pattern=name_prefix_pattern, + uri=uri, uri_pattern=uri_pattern, uri_prefix_pattern=uri_prefix_pattern, dag_ids=dag_ids, @@ -3051,6 +3125,7 @@ def get_assets_with_http_info( offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, name_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, name_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, + uri: Annotated[Optional[List[StrictStr]], Field(description="Exact-match filter on the full asset URI. Compiles to an indexed equality comparison (``uri = ...``). Repeat the parameter (``?uri=a&uri=b``) to match multiple assets.")] = None, uri_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `uri_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, uri_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, dag_ids: Optional[List[StrictStr]] = None, @@ -3081,6 +3156,8 @@ def get_assets_with_http_info( :type name_pattern: str :param name_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". :type name_prefix_pattern: str + :param uri: Exact-match filter on the full asset URI. Compiles to an indexed equality comparison (``uri = ...``). Repeat the parameter (``?uri=a&uri=b``) to match multiple assets. + :type uri: List[str] :param uri_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `uri_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". :type uri_pattern: str :param uri_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". @@ -3118,6 +3195,7 @@ def get_assets_with_http_info( offset=offset, name_pattern=name_pattern, name_prefix_pattern=name_prefix_pattern, + uri=uri, uri_pattern=uri_pattern, uri_prefix_pattern=uri_prefix_pattern, dag_ids=dag_ids, @@ -3154,6 +3232,7 @@ def get_assets_without_preload_content( offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, name_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, name_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, + uri: Annotated[Optional[List[StrictStr]], Field(description="Exact-match filter on the full asset URI. Compiles to an indexed equality comparison (``uri = ...``). Repeat the parameter (``?uri=a&uri=b``) to match multiple assets.")] = None, uri_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `uri_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, uri_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, dag_ids: Optional[List[StrictStr]] = None, @@ -3184,6 +3263,8 @@ def get_assets_without_preload_content( :type name_pattern: str :param name_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". :type name_prefix_pattern: str + :param uri: Exact-match filter on the full asset URI. Compiles to an indexed equality comparison (``uri = ...``). Repeat the parameter (``?uri=a&uri=b``) to match multiple assets. + :type uri: List[str] :param uri_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `uri_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". :type uri_pattern: str :param uri_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". @@ -3221,6 +3302,7 @@ def get_assets_without_preload_content( offset=offset, name_pattern=name_pattern, name_prefix_pattern=name_prefix_pattern, + uri=uri, uri_pattern=uri_pattern, uri_prefix_pattern=uri_prefix_pattern, dag_ids=dag_ids, @@ -3252,6 +3334,7 @@ def _get_assets_serialize( offset, name_pattern, name_prefix_pattern, + uri, uri_pattern, uri_prefix_pattern, dag_ids, @@ -3266,13 +3349,14 @@ def _get_assets_serialize( _host = None _collection_formats: Dict[str, str] = { + 'uri': 'multi', 'dag_ids': 'multi', 'order_by': 'multi', } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -3297,6 +3381,10 @@ def _get_assets_serialize( _query_params.append(('name_prefix_pattern', name_prefix_pattern)) + if uri is not None: + + _query_params.append(('uri', uri)) + if uri_pattern is not None: _query_params.append(('uri_pattern', uri_pattern)) @@ -3323,7 +3411,7 @@ def _get_assets_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -3606,7 +3694,7 @@ def _get_dag_asset_queued_event_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -3629,7 +3717,7 @@ def _get_dag_asset_queued_event_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -3896,7 +3984,7 @@ def _get_dag_asset_queued_events_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -3917,7 +4005,7 @@ def _get_dag_asset_queued_events_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -3953,7 +4041,7 @@ def _get_dag_asset_queued_events_serialize( def materialize_asset( self, asset_id: StrictInt, - materialize_asset_body: Optional[MaterializeAssetBody] = None, + materialize_asset_body: MaterializeAssetBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3973,7 +4061,7 @@ def materialize_asset( :param asset_id: (required) :type asset_id: int - :param materialize_asset_body: + :param materialize_asset_body: (required) :type materialize_asset_body: MaterializeAssetBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -4030,7 +4118,7 @@ def materialize_asset( def materialize_asset_with_http_info( self, asset_id: StrictInt, - materialize_asset_body: Optional[MaterializeAssetBody] = None, + materialize_asset_body: MaterializeAssetBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4050,7 +4138,7 @@ def materialize_asset_with_http_info( :param asset_id: (required) :type asset_id: int - :param materialize_asset_body: + :param materialize_asset_body: (required) :type materialize_asset_body: MaterializeAssetBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -4107,7 +4195,7 @@ def materialize_asset_with_http_info( def materialize_asset_without_preload_content( self, asset_id: StrictInt, - materialize_asset_body: Optional[MaterializeAssetBody] = None, + materialize_asset_body: MaterializeAssetBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4127,7 +4215,7 @@ def materialize_asset_without_preload_content( :param asset_id: (required) :type asset_id: int - :param materialize_asset_body: + :param materialize_asset_body: (required) :type materialize_asset_body: MaterializeAssetBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -4193,7 +4281,7 @@ def _materialize_asset_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -4212,7 +4300,7 @@ def _materialize_asset_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -4221,7 +4309,7 @@ def _materialize_asset_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -4231,7 +4319,7 @@ def _materialize_asset_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ diff --git a/airflow_client/client/api/asset_state_store_api.py b/airflow_client/client/api/asset_state_store_api.py index c99823aa..5b0b7bb7 100644 --- a/airflow_client/client/api/asset_state_store_api.py +++ b/airflow_client/client/api/asset_state_store_api.py @@ -265,7 +265,7 @@ def _clear_asset_state_store_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -282,7 +282,7 @@ def _clear_asset_state_store_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -552,7 +552,7 @@ def _delete_asset_state_store_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -571,7 +571,7 @@ def _delete_asset_state_store_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -841,7 +841,7 @@ def _get_asset_state_store_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -860,7 +860,7 @@ def _get_asset_state_store_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1143,7 +1143,7 @@ def _list_asset_state_store_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1168,7 +1168,7 @@ def _list_asset_state_store_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1451,7 +1451,7 @@ def _set_asset_state_store_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1472,7 +1472,7 @@ def _set_asset_state_store_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1481,7 +1481,7 @@ def _set_asset_state_store_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -1491,7 +1491,7 @@ def _set_asset_state_store_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ diff --git a/airflow_client/client/api/backfill_api.py b/airflow_client/client/api/backfill_api.py index 2c795985..1cf56b96 100644 --- a/airflow_client/client/api/backfill_api.py +++ b/airflow_client/client/api/backfill_api.py @@ -19,6 +19,7 @@ from typing import List, Optional from typing_extensions import Annotated from airflow_client.client.models.backfill_collection_response import BackfillCollectionResponse +from airflow_client.client.models.backfill_dag_run_collection_response import BackfillDagRunCollectionResponse from airflow_client.client.models.backfill_post_body import BackfillPostBody from airflow_client.client.models.backfill_response import BackfillResponse from airflow_client.client.models.dry_run_backfill_collection_response import DryRunBackfillCollectionResponse @@ -266,7 +267,7 @@ def _cancel_backfill_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -283,7 +284,7 @@ def _cancel_backfill_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -546,7 +547,7 @@ def _create_backfill_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -563,7 +564,7 @@ def _create_backfill_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -572,7 +573,7 @@ def _create_backfill_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -582,7 +583,7 @@ def _create_backfill_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -839,7 +840,7 @@ def _create_backfill_dry_run_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -856,7 +857,7 @@ def _create_backfill_dry_run_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -865,7 +866,7 @@ def _create_backfill_dry_run_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -875,7 +876,7 @@ def _create_backfill_dry_run_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -1123,7 +1124,7 @@ def _get_backfill_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1140,7 +1141,7 @@ def _get_backfill_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1172,6 +1173,332 @@ def _get_backfill_serialize( + @validate_call + def list_backfill_dag_runs( + self, + backfill_id: Annotated[int, Field(strict=True, ge=0)], + limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, + offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, sort_ordinal`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BackfillDagRunCollectionResponse: + """List Backfill Dag Runs + + List Dag runs associated with a backfill, including skipped slots. + + :param backfill_id: (required) + :type backfill_id: int + :param limit: + :type limit: int + :param offset: + :type offset: int + :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, sort_ordinal` + :type order_by: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_backfill_dag_runs_serialize( + backfill_id=backfill_id, + limit=limit, + offset=offset, + order_by=order_by, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BackfillDagRunCollectionResponse", + '401': "HTTPExceptionResponse", + '403': "HTTPExceptionResponse", + '404': "HTTPExceptionResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_backfill_dag_runs_with_http_info( + self, + backfill_id: Annotated[int, Field(strict=True, ge=0)], + limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, + offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, sort_ordinal`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[BackfillDagRunCollectionResponse]: + """List Backfill Dag Runs + + List Dag runs associated with a backfill, including skipped slots. + + :param backfill_id: (required) + :type backfill_id: int + :param limit: + :type limit: int + :param offset: + :type offset: int + :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, sort_ordinal` + :type order_by: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_backfill_dag_runs_serialize( + backfill_id=backfill_id, + limit=limit, + offset=offset, + order_by=order_by, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BackfillDagRunCollectionResponse", + '401': "HTTPExceptionResponse", + '403': "HTTPExceptionResponse", + '404': "HTTPExceptionResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_backfill_dag_runs_without_preload_content( + self, + backfill_id: Annotated[int, Field(strict=True, ge=0)], + limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, + offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, sort_ordinal`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Backfill Dag Runs + + List Dag runs associated with a backfill, including skipped slots. + + :param backfill_id: (required) + :type backfill_id: int + :param limit: + :type limit: int + :param offset: + :type offset: int + :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, sort_ordinal` + :type order_by: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_backfill_dag_runs_serialize( + backfill_id=backfill_id, + limit=limit, + offset=offset, + order_by=order_by, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BackfillDagRunCollectionResponse", + '401': "HTTPExceptionResponse", + '403': "HTTPExceptionResponse", + '404': "HTTPExceptionResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_backfill_dag_runs_serialize( + self, + backfill_id, + limit, + offset, + order_by, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'order_by': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if backfill_id is not None: + _path_params['backfill_id'] = backfill_id + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if order_by is not None: + + _query_params.append(('order_by', order_by)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if not any(key.lower() == 'accept' for key in _header_params): + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2PasswordBearer', + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v2/backfills/{backfill_id}/dag_runs', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def list_backfills( self, @@ -1431,7 +1758,7 @@ def _list_backfills_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1462,7 +1789,7 @@ def _list_backfills_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1719,7 +2046,7 @@ def _pause_backfill_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1736,7 +2063,7 @@ def _pause_backfill_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1993,7 +2320,7 @@ def _unpause_backfill_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -2010,7 +2337,7 @@ def _unpause_backfill_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' diff --git a/airflow_client/client/api/config_api.py b/airflow_client/client/api/config_api.py index 2799892d..314c7962 100644 --- a/airflow_client/client/api/config_api.py +++ b/airflow_client/client/api/config_api.py @@ -275,7 +275,7 @@ def _get_config_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -290,13 +290,13 @@ def _get_config_serialize( # process the header parameters if accept is not None: - _header_params['accept'] = accept + self.api_client._set_header(_header_params, 'accept', accept) # process the form parameters # process the body parameter # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json', @@ -580,7 +580,7 @@ def _get_config_value_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -595,13 +595,13 @@ def _get_config_value_serialize( # process the query parameters # process the header parameters if accept is not None: - _header_params['accept'] = accept + self.api_client._set_header(_header_params, 'accept', accept) # process the form parameters # process the body parameter # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json', diff --git a/airflow_client/client/api/connection_api.py b/airflow_client/client/api/connection_api.py index 3b61ff80..6234eb5d 100644 --- a/airflow_client/client/api/connection_api.py +++ b/airflow_client/client/api/connection_api.py @@ -268,7 +268,7 @@ def _bulk_connections_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -285,7 +285,7 @@ def _bulk_connections_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -294,7 +294,7 @@ def _bulk_connections_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -304,7 +304,7 @@ def _bulk_connections_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -536,7 +536,7 @@ def _create_default_connections_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -551,7 +551,7 @@ def _create_default_connections_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -808,7 +808,7 @@ def _delete_connection_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -825,7 +825,7 @@ def _delete_connection_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1082,7 +1082,7 @@ def _enqueue_connection_test_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1099,7 +1099,7 @@ def _enqueue_connection_test_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1108,7 +1108,7 @@ def _enqueue_connection_test_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -1118,7 +1118,7 @@ def _enqueue_connection_test_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -1369,7 +1369,7 @@ def _get_connection_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1386,7 +1386,7 @@ def _get_connection_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1643,7 +1643,7 @@ def _get_connection_test_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1654,13 +1654,13 @@ def _get_connection_test_serialize( # process the query parameters # process the header parameters if airflow_connection_test_token is not None: - _header_params['Airflow-Connection-Test-Token'] = airflow_connection_test_token + self.api_client._set_header(_header_params, 'Airflow-Connection-Test-Token', airflow_connection_test_token) # process the form parameters # process the body parameter # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1970,7 +1970,7 @@ def _get_connections_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -2005,7 +2005,7 @@ def _get_connections_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -2292,7 +2292,7 @@ def _patch_connection_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -2315,7 +2315,7 @@ def _patch_connection_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -2324,7 +2324,7 @@ def _patch_connection_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -2334,7 +2334,7 @@ def _patch_connection_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -2585,7 +2585,7 @@ def _post_connection_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -2602,7 +2602,7 @@ def _post_connection_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -2611,7 +2611,7 @@ def _post_connection_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -2621,7 +2621,7 @@ def _post_connection_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -2702,6 +2702,7 @@ def test_connection( _response_types_map: Dict[str, Optional[str]] = { '200': "ConnectionTestResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '422': "HTTPValidationError", @@ -2772,6 +2773,7 @@ def test_connection_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "ConnectionTestResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '422': "HTTPValidationError", @@ -2842,6 +2844,7 @@ def test_connection_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "ConnectionTestResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '422': "HTTPValidationError", @@ -2869,7 +2872,7 @@ def _test_connection_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -2886,7 +2889,7 @@ def _test_connection_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -2895,7 +2898,7 @@ def _test_connection_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -2905,7 +2908,7 @@ def _test_connection_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ diff --git a/airflow_client/client/api/dag_api.py b/airflow_client/client/api/dag_api.py index 198235e3..e0d6436b 100644 --- a/airflow_client/client/api/dag_api.py +++ b/airflow_client/client/api/dag_api.py @@ -19,6 +19,8 @@ from pydantic import Field, StrictBool, StrictStr, field_validator from typing import Any, List, Optional from typing_extensions import Annotated +from airflow_client.client.models.bulk_body_bulk_dag_body import BulkBodyBulkDAGBody +from airflow_client.client.models.bulk_response import BulkResponse from airflow_client.client.models.dag_collection_response import DAGCollectionResponse from airflow_client.client.models.dag_details_response import DAGDetailsResponse from airflow_client.client.models.dag_patch_body import DAGPatchBody @@ -43,6 +45,290 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client + @validate_call + def bulk_dags( + self, + bulk_body_bulk_dag_body: BulkBodyBulkDAGBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BulkResponse: + """Bulk Dags + + Bulk pause, resume, or drain Dags by id. + + :param bulk_body_bulk_dag_body: (required) + :type bulk_body_bulk_dag_body: BulkBodyBulkDAGBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_dags_serialize( + bulk_body_bulk_dag_body=bulk_body_bulk_dag_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BulkResponse", + '401': "HTTPExceptionResponse", + '403': "HTTPExceptionResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def bulk_dags_with_http_info( + self, + bulk_body_bulk_dag_body: BulkBodyBulkDAGBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[BulkResponse]: + """Bulk Dags + + Bulk pause, resume, or drain Dags by id. + + :param bulk_body_bulk_dag_body: (required) + :type bulk_body_bulk_dag_body: BulkBodyBulkDAGBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_dags_serialize( + bulk_body_bulk_dag_body=bulk_body_bulk_dag_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BulkResponse", + '401': "HTTPExceptionResponse", + '403': "HTTPExceptionResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def bulk_dags_without_preload_content( + self, + bulk_body_bulk_dag_body: BulkBodyBulkDAGBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Bulk Dags + + Bulk pause, resume, or drain Dags by id. + + :param bulk_body_bulk_dag_body: (required) + :type bulk_body_bulk_dag_body: BulkBodyBulkDAGBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._bulk_dags_serialize( + bulk_body_bulk_dag_body=bulk_body_bulk_dag_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BulkResponse", + '401': "HTTPExceptionResponse", + '403': "HTTPExceptionResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _bulk_dags_serialize( + self, + bulk_body_bulk_dag_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if bulk_body_bulk_dag_body is not None: + _body_params = bulk_body_bulk_dag_body + + + # set the HTTP header `Accept` + if not any(key.lower() == 'accept' for key in _header_params): + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + self.api_client._set_header(_header_params, 'Content-Type', _content_type) + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2PasswordBearer', + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/api/v2/dags/bulk', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def delete_dag( self, @@ -274,7 +560,7 @@ def _delete_dag_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -291,7 +577,7 @@ def _delete_dag_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -381,6 +667,7 @@ def favorite_dag( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -452,6 +739,7 @@ def favorite_dag_with_http_info( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -523,6 +811,7 @@ def favorite_dag_without_preload_content( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -548,7 +837,7 @@ def _favorite_dag_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -565,7 +854,7 @@ def _favorite_dag_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -825,7 +1114,7 @@ def _get_dag_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -842,7 +1131,7 @@ def _get_dag_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1102,7 +1391,7 @@ def _get_dag_details_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1119,7 +1408,7 @@ def _get_dag_details_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1426,7 +1715,7 @@ def _get_dag_tags_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1461,7 +1750,7 @@ def _get_dag_tags_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1496,6 +1785,7 @@ def _get_dag_tags_serialize( @validate_call def get_dags( self, + is_scheduled: Annotated[Optional[StrictBool], Field(description="Filter Dags by whether their timetable can create scheduled runs.")] = None, limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, tags: Optional[List[StrictStr]] = None, @@ -1522,7 +1812,7 @@ def get_dags( dag_run_end_date_lte: Optional[datetime] = None, dag_run_end_date_lt: Optional[datetime] = None, dag_run_state: Optional[List[StrictStr]] = None, - order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `dag_id, dag_display_name, next_dagrun, state, start_date, last_run_state, last_run_start_date`")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `dag_id, dag_display_name, next_dagrun, last_run_state, last_run_start_date`")] = None, is_favorite: Optional[StrictBool] = None, timetable_type: Optional[List[StrictStr]] = None, _request_timeout: Union[ @@ -1542,6 +1832,8 @@ def get_dags( Get all Dags. + :param is_scheduled: Filter Dags by whether their timetable can create scheduled runs. + :type is_scheduled: bool :param limit: :type limit: int :param offset: @@ -1594,7 +1886,7 @@ def get_dags( :type dag_run_end_date_lt: datetime :param dag_run_state: :type dag_run_state: List[str] - :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `dag_id, dag_display_name, next_dagrun, state, start_date, last_run_state, last_run_start_date` + :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `dag_id, dag_display_name, next_dagrun, last_run_state, last_run_start_date` :type order_by: List[str] :param is_favorite: :type is_favorite: bool @@ -1623,6 +1915,7 @@ def get_dags( """ # noqa: E501 _param = self._get_dags_serialize( + is_scheduled=is_scheduled, limit=limit, offset=offset, tags=tags, @@ -1678,6 +1971,7 @@ def get_dags( @validate_call def get_dags_with_http_info( self, + is_scheduled: Annotated[Optional[StrictBool], Field(description="Filter Dags by whether their timetable can create scheduled runs.")] = None, limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, tags: Optional[List[StrictStr]] = None, @@ -1704,7 +1998,7 @@ def get_dags_with_http_info( dag_run_end_date_lte: Optional[datetime] = None, dag_run_end_date_lt: Optional[datetime] = None, dag_run_state: Optional[List[StrictStr]] = None, - order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `dag_id, dag_display_name, next_dagrun, state, start_date, last_run_state, last_run_start_date`")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `dag_id, dag_display_name, next_dagrun, last_run_state, last_run_start_date`")] = None, is_favorite: Optional[StrictBool] = None, timetable_type: Optional[List[StrictStr]] = None, _request_timeout: Union[ @@ -1724,6 +2018,8 @@ def get_dags_with_http_info( Get all Dags. + :param is_scheduled: Filter Dags by whether their timetable can create scheduled runs. + :type is_scheduled: bool :param limit: :type limit: int :param offset: @@ -1776,7 +2072,7 @@ def get_dags_with_http_info( :type dag_run_end_date_lt: datetime :param dag_run_state: :type dag_run_state: List[str] - :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `dag_id, dag_display_name, next_dagrun, state, start_date, last_run_state, last_run_start_date` + :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `dag_id, dag_display_name, next_dagrun, last_run_state, last_run_start_date` :type order_by: List[str] :param is_favorite: :type is_favorite: bool @@ -1805,6 +2101,7 @@ def get_dags_with_http_info( """ # noqa: E501 _param = self._get_dags_serialize( + is_scheduled=is_scheduled, limit=limit, offset=offset, tags=tags, @@ -1860,6 +2157,7 @@ def get_dags_with_http_info( @validate_call def get_dags_without_preload_content( self, + is_scheduled: Annotated[Optional[StrictBool], Field(description="Filter Dags by whether their timetable can create scheduled runs.")] = None, limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, tags: Optional[List[StrictStr]] = None, @@ -1886,7 +2184,7 @@ def get_dags_without_preload_content( dag_run_end_date_lte: Optional[datetime] = None, dag_run_end_date_lt: Optional[datetime] = None, dag_run_state: Optional[List[StrictStr]] = None, - order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `dag_id, dag_display_name, next_dagrun, state, start_date, last_run_state, last_run_start_date`")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `dag_id, dag_display_name, next_dagrun, last_run_state, last_run_start_date`")] = None, is_favorite: Optional[StrictBool] = None, timetable_type: Optional[List[StrictStr]] = None, _request_timeout: Union[ @@ -1906,6 +2204,8 @@ def get_dags_without_preload_content( Get all Dags. + :param is_scheduled: Filter Dags by whether their timetable can create scheduled runs. + :type is_scheduled: bool :param limit: :type limit: int :param offset: @@ -1958,7 +2258,7 @@ def get_dags_without_preload_content( :type dag_run_end_date_lt: datetime :param dag_run_state: :type dag_run_state: List[str] - :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `dag_id, dag_display_name, next_dagrun, state, start_date, last_run_state, last_run_start_date` + :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `dag_id, dag_display_name, next_dagrun, last_run_state, last_run_start_date` :type order_by: List[str] :param is_favorite: :type is_favorite: bool @@ -1987,6 +2287,7 @@ def get_dags_without_preload_content( """ # noqa: E501 _param = self._get_dags_serialize( + is_scheduled=is_scheduled, limit=limit, offset=offset, tags=tags, @@ -2037,6 +2338,7 @@ def get_dags_without_preload_content( def _get_dags_serialize( self, + is_scheduled, limit, offset, tags, @@ -2084,7 +2386,7 @@ def _get_dags_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -2093,6 +2395,10 @@ def _get_dags_serialize( # process the path parameters # process the query parameters + if is_scheduled is not None: + + _query_params.append(('is_scheduled', is_scheduled)) + if limit is not None: _query_params.append(('limit', limit)) @@ -2287,7 +2593,7 @@ def _get_dags_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -2574,7 +2880,7 @@ def _patch_dag_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -2597,7 +2903,7 @@ def _patch_dag_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -2606,7 +2912,7 @@ def _patch_dag_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -2616,7 +2922,7 @@ def _patch_dag_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -3003,7 +3309,7 @@ def _patch_dags_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -3060,7 +3366,7 @@ def _patch_dags_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -3069,7 +3375,7 @@ def _patch_dags_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -3079,7 +3385,7 @@ def _patch_dags_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -3333,7 +3639,7 @@ def _unfavorite_dag_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -3350,7 +3656,7 @@ def _unfavorite_dag_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' diff --git a/airflow_client/client/api/dag_bundle_api.py b/airflow_client/client/api/dag_bundle_api.py new file mode 100644 index 00000000..f9b3203d --- /dev/null +++ b/airflow_client/client/api/dag_bundle_api.py @@ -0,0 +1,930 @@ +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from airflow_client.client.models.dag_bundle_collection_response import DagBundleCollectionResponse +from airflow_client.client.models.dag_bundle_detail_response import DagBundleDetailResponse +from airflow_client.client.models.dag_bundle_file_collection_response import DagBundleFileCollectionResponse + +from airflow_client.client.api_client import ApiClient, RequestSerialized +from airflow_client.client.api_response import ApiResponse +from airflow_client.client.rest import RESTResponseType + + +class DagBundleApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_dag_bundle( + self, + bundle_name: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DagBundleDetailResponse: + """Get Dag Bundle + + Get a Dag bundle. + + :param bundle_name: (required) + :type bundle_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dag_bundle_serialize( + bundle_name=bundle_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DagBundleDetailResponse", + '401': "HTTPExceptionResponse", + '403': "HTTPExceptionResponse", + '404': "HTTPExceptionResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_dag_bundle_with_http_info( + self, + bundle_name: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DagBundleDetailResponse]: + """Get Dag Bundle + + Get a Dag bundle. + + :param bundle_name: (required) + :type bundle_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dag_bundle_serialize( + bundle_name=bundle_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DagBundleDetailResponse", + '401': "HTTPExceptionResponse", + '403': "HTTPExceptionResponse", + '404': "HTTPExceptionResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_dag_bundle_without_preload_content( + self, + bundle_name: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Dag Bundle + + Get a Dag bundle. + + :param bundle_name: (required) + :type bundle_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dag_bundle_serialize( + bundle_name=bundle_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DagBundleDetailResponse", + '401': "HTTPExceptionResponse", + '403': "HTTPExceptionResponse", + '404': "HTTPExceptionResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_dag_bundle_serialize( + self, + bundle_name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if bundle_name is not None: + _path_params['bundle_name'] = bundle_name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if not any(key.lower() == 'accept' for key in _header_params): + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2PasswordBearer', + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v2/dagBundles/{bundle_name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_dag_bundle_files( + self, + bundle_name: StrictStr, + limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, + offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DagBundleFileCollectionResponse: + """Get Dag Bundle Files + + List the files in a Dag bundle, ordered by path. A file is listed when the caller can read at least one Dag it defines. A file that recorded an import error without registering any Dag is listed too, on the same admin-by-default terms as ``GET /importErrors`` -- a file that fails before defining a Dag has no Dag to authorize on, and it is the case this page most needs to show. ``dag_count`` counts live Dags only. Dag rows are never deleted: a file that fails to import has every Dag in it marked stale, and so does a file dropped from the bundle. A file therefore stays listed on the strength of a live Dag *or* an import error, so a file that has just broken does not vanish from the page someone opened to find out why, while a file deleted long ago drops out instead of lingering forever. Parse times come from the Dags in the file rather than the file itself, which is the only record Airflow keeps: a file whose every Dag was removed keeps no parse time of its own. + + :param bundle_name: (required) + :type bundle_name: str + :param limit: + :type limit: int + :param offset: + :type offset: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dag_bundle_files_serialize( + bundle_name=bundle_name, + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DagBundleFileCollectionResponse", + '401': "HTTPExceptionResponse", + '403': "HTTPExceptionResponse", + '404': "HTTPExceptionResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_dag_bundle_files_with_http_info( + self, + bundle_name: StrictStr, + limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, + offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DagBundleFileCollectionResponse]: + """Get Dag Bundle Files + + List the files in a Dag bundle, ordered by path. A file is listed when the caller can read at least one Dag it defines. A file that recorded an import error without registering any Dag is listed too, on the same admin-by-default terms as ``GET /importErrors`` -- a file that fails before defining a Dag has no Dag to authorize on, and it is the case this page most needs to show. ``dag_count`` counts live Dags only. Dag rows are never deleted: a file that fails to import has every Dag in it marked stale, and so does a file dropped from the bundle. A file therefore stays listed on the strength of a live Dag *or* an import error, so a file that has just broken does not vanish from the page someone opened to find out why, while a file deleted long ago drops out instead of lingering forever. Parse times come from the Dags in the file rather than the file itself, which is the only record Airflow keeps: a file whose every Dag was removed keeps no parse time of its own. + + :param bundle_name: (required) + :type bundle_name: str + :param limit: + :type limit: int + :param offset: + :type offset: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dag_bundle_files_serialize( + bundle_name=bundle_name, + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DagBundleFileCollectionResponse", + '401': "HTTPExceptionResponse", + '403': "HTTPExceptionResponse", + '404': "HTTPExceptionResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_dag_bundle_files_without_preload_content( + self, + bundle_name: StrictStr, + limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, + offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Dag Bundle Files + + List the files in a Dag bundle, ordered by path. A file is listed when the caller can read at least one Dag it defines. A file that recorded an import error without registering any Dag is listed too, on the same admin-by-default terms as ``GET /importErrors`` -- a file that fails before defining a Dag has no Dag to authorize on, and it is the case this page most needs to show. ``dag_count`` counts live Dags only. Dag rows are never deleted: a file that fails to import has every Dag in it marked stale, and so does a file dropped from the bundle. A file therefore stays listed on the strength of a live Dag *or* an import error, so a file that has just broken does not vanish from the page someone opened to find out why, while a file deleted long ago drops out instead of lingering forever. Parse times come from the Dags in the file rather than the file itself, which is the only record Airflow keeps: a file whose every Dag was removed keeps no parse time of its own. + + :param bundle_name: (required) + :type bundle_name: str + :param limit: + :type limit: int + :param offset: + :type offset: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dag_bundle_files_serialize( + bundle_name=bundle_name, + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DagBundleFileCollectionResponse", + '401': "HTTPExceptionResponse", + '403': "HTTPExceptionResponse", + '404': "HTTPExceptionResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_dag_bundle_files_serialize( + self, + bundle_name, + limit, + offset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if bundle_name is not None: + _path_params['bundle_name'] = bundle_name + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if not any(key.lower() == 'accept' for key in _header_params): + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2PasswordBearer', + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v2/dagBundles/{bundle_name}/files', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_dag_bundles( + self, + limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, + offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `name, version, last_refreshed, active`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DagBundleCollectionResponse: + """Get Dag Bundles + + List the Dag bundles Airflow knows about. Reports the version of each bundle Airflow currently holds and when a Dag processor last refreshed it, so whoever deployed the code can tell whether it has been picked up yet. A bundle is visible to a user who can read at least one Dag recorded against it. A bundle holding no registered Dag at all has nothing to authorize against, so it is listed only for a user holding the admin-by-default ``AccessView.IMPORT_ERRORS_ALL`` for that bundle's team -- the same view, scoped the same way, that governs import errors for a file that never registered a Dag. + + :param limit: + :type limit: int + :param offset: + :type offset: int + :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `name, version, last_refreshed, active` + :type order_by: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dag_bundles_serialize( + limit=limit, + offset=offset, + order_by=order_by, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DagBundleCollectionResponse", + '401': "HTTPExceptionResponse", + '403': "HTTPExceptionResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_dag_bundles_with_http_info( + self, + limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, + offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `name, version, last_refreshed, active`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DagBundleCollectionResponse]: + """Get Dag Bundles + + List the Dag bundles Airflow knows about. Reports the version of each bundle Airflow currently holds and when a Dag processor last refreshed it, so whoever deployed the code can tell whether it has been picked up yet. A bundle is visible to a user who can read at least one Dag recorded against it. A bundle holding no registered Dag at all has nothing to authorize against, so it is listed only for a user holding the admin-by-default ``AccessView.IMPORT_ERRORS_ALL`` for that bundle's team -- the same view, scoped the same way, that governs import errors for a file that never registered a Dag. + + :param limit: + :type limit: int + :param offset: + :type offset: int + :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `name, version, last_refreshed, active` + :type order_by: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dag_bundles_serialize( + limit=limit, + offset=offset, + order_by=order_by, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DagBundleCollectionResponse", + '401': "HTTPExceptionResponse", + '403': "HTTPExceptionResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_dag_bundles_without_preload_content( + self, + limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, + offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `name, version, last_refreshed, active`")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Dag Bundles + + List the Dag bundles Airflow knows about. Reports the version of each bundle Airflow currently holds and when a Dag processor last refreshed it, so whoever deployed the code can tell whether it has been picked up yet. A bundle is visible to a user who can read at least one Dag recorded against it. A bundle holding no registered Dag at all has nothing to authorize against, so it is listed only for a user holding the admin-by-default ``AccessView.IMPORT_ERRORS_ALL`` for that bundle's team -- the same view, scoped the same way, that governs import errors for a file that never registered a Dag. + + :param limit: + :type limit: int + :param offset: + :type offset: int + :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `name, version, last_refreshed, active` + :type order_by: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dag_bundles_serialize( + limit=limit, + offset=offset, + order_by=order_by, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DagBundleCollectionResponse", + '401': "HTTPExceptionResponse", + '403': "HTTPExceptionResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_dag_bundles_serialize( + self, + limit, + offset, + order_by, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'order_by': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if order_by is not None: + + _query_params.append(('order_by', order_by)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if not any(key.lower() == 'accept' for key in _header_params): + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2PasswordBearer', + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v2/dagBundles', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/airflow_client/client/api/dag_parsing_api.py b/airflow_client/client/api/dag_parsing_api.py index 12bf3800..3c3d0494 100644 --- a/airflow_client/client/api/dag_parsing_api.py +++ b/airflow_client/client/api/dag_parsing_api.py @@ -261,7 +261,7 @@ def _reparse_dag_file_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -278,7 +278,7 @@ def _reparse_dag_file_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' diff --git a/airflow_client/client/api/dag_run_api.py b/airflow_client/client/api/dag_run_api.py index a470f0d4..b0d970fc 100644 --- a/airflow_client/client/api/dag_run_api.py +++ b/airflow_client/client/api/dag_run_api.py @@ -287,7 +287,7 @@ def _bulk_dag_runs_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -306,7 +306,7 @@ def _bulk_dag_runs_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -315,7 +315,7 @@ def _bulk_dag_runs_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -325,7 +325,7 @@ def _bulk_dag_runs_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -599,7 +599,7 @@ def _clear_dag_run_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -620,7 +620,7 @@ def _clear_dag_run_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -629,7 +629,7 @@ def _clear_dag_run_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -639,7 +639,7 @@ def _clear_dag_run_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -906,7 +906,7 @@ def _clear_dag_run_partitions_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -925,7 +925,7 @@ def _clear_dag_run_partitions_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -934,7 +934,7 @@ def _clear_dag_run_partitions_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -944,7 +944,7 @@ def _clear_dag_run_partitions_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -1211,7 +1211,7 @@ def _clear_dag_runs_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1230,7 +1230,7 @@ def _clear_dag_runs_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1239,7 +1239,7 @@ def _clear_dag_runs_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -1249,7 +1249,7 @@ def _clear_dag_runs_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -1519,7 +1519,7 @@ def _delete_dag_run_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1538,7 +1538,7 @@ def _delete_dag_run_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1805,7 +1805,7 @@ def _get_dag_run_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1824,7 +1824,7 @@ def _get_dag_run_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1894,6 +1894,9 @@ def get_dag_runs( state: Optional[List[StrictStr]] = None, dag_version: Optional[List[StrictInt]] = None, bundle_version: Optional[StrictStr] = None, + teams: Optional[List[StrictStr]] = None, + tags: Optional[List[StrictStr]] = None, + tags_match_mode: Optional[StrictStr] = None, order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, state, dag_id, run_id, logical_date, partition_date, run_after, start_date, end_date, updated_at, conf, duration, dag_run_id`")] = None, run_id_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `run_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, run_id_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, @@ -1991,6 +1994,12 @@ def get_dag_runs( :type dag_version: List[int] :param bundle_version: :type bundle_version: str + :param teams: + :type teams: List[str] + :param tags: + :type tags: List[str] + :param tags_match_mode: + :type tags_match_mode: str :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, state, dag_id, run_id, logical_date, partition_date, run_after, start_date, end_date, updated_at, conf, duration, dag_run_id` :type order_by: List[str] :param run_id_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `run_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". @@ -2069,6 +2078,9 @@ def get_dag_runs( state=state, dag_version=dag_version, bundle_version=bundle_version, + teams=teams, + tags=tags, + tags_match_mode=tags_match_mode, order_by=order_by, run_id_pattern=run_id_pattern, run_id_prefix_pattern=run_id_prefix_pattern, @@ -2142,6 +2154,9 @@ def get_dag_runs_with_http_info( state: Optional[List[StrictStr]] = None, dag_version: Optional[List[StrictInt]] = None, bundle_version: Optional[StrictStr] = None, + teams: Optional[List[StrictStr]] = None, + tags: Optional[List[StrictStr]] = None, + tags_match_mode: Optional[StrictStr] = None, order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, state, dag_id, run_id, logical_date, partition_date, run_after, start_date, end_date, updated_at, conf, duration, dag_run_id`")] = None, run_id_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `run_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, run_id_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, @@ -2239,6 +2254,12 @@ def get_dag_runs_with_http_info( :type dag_version: List[int] :param bundle_version: :type bundle_version: str + :param teams: + :type teams: List[str] + :param tags: + :type tags: List[str] + :param tags_match_mode: + :type tags_match_mode: str :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, state, dag_id, run_id, logical_date, partition_date, run_after, start_date, end_date, updated_at, conf, duration, dag_run_id` :type order_by: List[str] :param run_id_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `run_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". @@ -2317,6 +2338,9 @@ def get_dag_runs_with_http_info( state=state, dag_version=dag_version, bundle_version=bundle_version, + teams=teams, + tags=tags, + tags_match_mode=tags_match_mode, order_by=order_by, run_id_pattern=run_id_pattern, run_id_prefix_pattern=run_id_prefix_pattern, @@ -2390,6 +2414,9 @@ def get_dag_runs_without_preload_content( state: Optional[List[StrictStr]] = None, dag_version: Optional[List[StrictInt]] = None, bundle_version: Optional[StrictStr] = None, + teams: Optional[List[StrictStr]] = None, + tags: Optional[List[StrictStr]] = None, + tags_match_mode: Optional[StrictStr] = None, order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, state, dag_id, run_id, logical_date, partition_date, run_after, start_date, end_date, updated_at, conf, duration, dag_run_id`")] = None, run_id_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `run_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, run_id_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, @@ -2487,6 +2514,12 @@ def get_dag_runs_without_preload_content( :type dag_version: List[int] :param bundle_version: :type bundle_version: str + :param teams: + :type teams: List[str] + :param tags: + :type tags: List[str] + :param tags_match_mode: + :type tags_match_mode: str :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, state, dag_id, run_id, logical_date, partition_date, run_after, start_date, end_date, updated_at, conf, duration, dag_run_id` :type order_by: List[str] :param run_id_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `run_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". @@ -2565,6 +2598,9 @@ def get_dag_runs_without_preload_content( state=state, dag_version=dag_version, bundle_version=bundle_version, + teams=teams, + tags=tags, + tags_match_mode=tags_match_mode, order_by=order_by, run_id_pattern=run_id_pattern, run_id_prefix_pattern=run_id_prefix_pattern, @@ -2633,6 +2669,9 @@ def _get_dag_runs_serialize( state, dag_version, bundle_version, + teams, + tags, + tags_match_mode, order_by, run_id_pattern, run_id_prefix_pattern, @@ -2655,12 +2694,14 @@ def _get_dag_runs_serialize( 'run_type': 'multi', 'state': 'multi', 'dag_version': 'multi', + 'teams': 'multi', + 'tags': 'multi', 'order_by': 'multi', } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -3005,6 +3046,18 @@ def _get_dag_runs_serialize( _query_params.append(('bundle_version', bundle_version)) + if teams is not None: + + _query_params.append(('teams', teams)) + + if tags is not None: + + _query_params.append(('tags', tags)) + + if tags_match_mode is not None: + + _query_params.append(('tags_match_mode', tags_match_mode)) + if order_by is not None: _query_params.append(('order_by', order_by)) @@ -3051,7 +3104,7 @@ def _get_dag_runs_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -3321,7 +3374,7 @@ def _get_list_dag_runs_batch_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -3340,7 +3393,7 @@ def _get_list_dag_runs_batch_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -3349,7 +3402,7 @@ def _get_list_dag_runs_batch_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -3359,7 +3412,7 @@ def _get_list_dag_runs_batch_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -3623,7 +3676,7 @@ def _get_upstream_asset_events_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -3642,7 +3695,7 @@ def _get_upstream_asset_events_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -3942,7 +3995,7 @@ def _patch_dag_run_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -3967,7 +4020,7 @@ def _patch_dag_run_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -3976,7 +4029,7 @@ def _patch_dag_run_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -3986,7 +4039,7 @@ def _patch_dag_run_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -4256,7 +4309,7 @@ def _trigger_dag_run_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -4275,7 +4328,7 @@ def _trigger_dag_run_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -4284,7 +4337,7 @@ def _trigger_dag_run_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -4294,7 +4347,7 @@ def _trigger_dag_run_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -4390,6 +4443,7 @@ def wait_dag_run_until_finished( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -4473,6 +4527,7 @@ def wait_dag_run_until_finished_with_http_info( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -4556,6 +4611,7 @@ def wait_dag_run_until_finished_without_preload_content( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -4585,7 +4641,7 @@ def _wait_dag_run_until_finished_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -4612,7 +4668,7 @@ def _wait_dag_run_until_finished_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json', diff --git a/airflow_client/client/api/dag_source_api.py b/airflow_client/client/api/dag_source_api.py index 94907f44..52d3d6a2 100644 --- a/airflow_client/client/api/dag_source_api.py +++ b/airflow_client/client/api/dag_source_api.py @@ -294,7 +294,7 @@ def _get_dag_source_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -311,13 +311,13 @@ def _get_dag_source_serialize( # process the header parameters if accept is not None: - _header_params['accept'] = accept + self.api_client._set_header(_header_params, 'accept', accept) # process the form parameters # process the body parameter # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json', diff --git a/airflow_client/client/api/dag_stats_api.py b/airflow_client/client/api/dag_stats_api.py index 2477dfa1..22d78e0b 100644 --- a/airflow_client/client/api/dag_stats_api.py +++ b/airflow_client/client/api/dag_stats_api.py @@ -266,7 +266,7 @@ def _get_dag_stats_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -285,7 +285,7 @@ def _get_dag_stats_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' diff --git a/airflow_client/client/api/dag_version_api.py b/airflow_client/client/api/dag_version_api.py index 9cdf3e78..7534a885 100644 --- a/airflow_client/client/api/dag_version_api.py +++ b/airflow_client/client/api/dag_version_api.py @@ -19,6 +19,7 @@ from typing import List, Optional from typing_extensions import Annotated from airflow_client.client.models.dag_version_collection_response import DAGVersionCollectionResponse +from airflow_client.client.models.dag_version_diff_response import DagVersionDiffResponse from airflow_client.client.models.dag_version_response import DagVersionResponse from airflow_client.client.api_client import ApiClient, RequestSerialized @@ -277,7 +278,7 @@ def _get_dag_version_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -296,7 +297,7 @@ def _get_dag_version_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -328,6 +329,334 @@ def _get_dag_version_serialize( + @validate_call + def get_dag_version_diff( + self, + dag_id: StrictStr, + base_version_number: Annotated[int, Field(strict=True, gt=0, description="Version to compare from.")], + target_version_number: Annotated[int, Field(strict=True, gt=0, description="Version to compare to.")], + max_changes: Annotated[Optional[Annotated[int, Field(le=5000, strict=True, gt=0)]], Field(description="Largest number of records `changes` may hold. A repeat of a path already recorded does not count towards it, and `truncated` says whether the bound dropped anything.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DagVersionDiffResponse: + """Experimental: Compare what two stored versions of a Dag currently hold. + + 🚧 This is an experimental endpoint and may change or be removed without notice. Reports observed state — what the two stored versions currently hold — not why a version was created. Version access returns the changed structure with identifying path components masked; the raw values behind those changes, and the paths that name them, are disclosed only to a caller who may also read the Dag's code. + + :param dag_id: (required) + :type dag_id: str + :param base_version_number: Version to compare from. (required) + :type base_version_number: int + :param target_version_number: Version to compare to. (required) + :type target_version_number: int + :param max_changes: Largest number of records `changes` may hold. A repeat of a path already recorded does not count towards it, and `truncated` says whether the bound dropped anything. + :type max_changes: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dag_version_diff_serialize( + dag_id=dag_id, + base_version_number=base_version_number, + target_version_number=target_version_number, + max_changes=max_changes, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DagVersionDiffResponse", + '400': "HTTPExceptionResponse", + '401': "HTTPExceptionResponse", + '403': "HTTPExceptionResponse", + '404': "HTTPExceptionResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_dag_version_diff_with_http_info( + self, + dag_id: StrictStr, + base_version_number: Annotated[int, Field(strict=True, gt=0, description="Version to compare from.")], + target_version_number: Annotated[int, Field(strict=True, gt=0, description="Version to compare to.")], + max_changes: Annotated[Optional[Annotated[int, Field(le=5000, strict=True, gt=0)]], Field(description="Largest number of records `changes` may hold. A repeat of a path already recorded does not count towards it, and `truncated` says whether the bound dropped anything.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DagVersionDiffResponse]: + """Experimental: Compare what two stored versions of a Dag currently hold. + + 🚧 This is an experimental endpoint and may change or be removed without notice. Reports observed state — what the two stored versions currently hold — not why a version was created. Version access returns the changed structure with identifying path components masked; the raw values behind those changes, and the paths that name them, are disclosed only to a caller who may also read the Dag's code. + + :param dag_id: (required) + :type dag_id: str + :param base_version_number: Version to compare from. (required) + :type base_version_number: int + :param target_version_number: Version to compare to. (required) + :type target_version_number: int + :param max_changes: Largest number of records `changes` may hold. A repeat of a path already recorded does not count towards it, and `truncated` says whether the bound dropped anything. + :type max_changes: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dag_version_diff_serialize( + dag_id=dag_id, + base_version_number=base_version_number, + target_version_number=target_version_number, + max_changes=max_changes, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DagVersionDiffResponse", + '400': "HTTPExceptionResponse", + '401': "HTTPExceptionResponse", + '403': "HTTPExceptionResponse", + '404': "HTTPExceptionResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_dag_version_diff_without_preload_content( + self, + dag_id: StrictStr, + base_version_number: Annotated[int, Field(strict=True, gt=0, description="Version to compare from.")], + target_version_number: Annotated[int, Field(strict=True, gt=0, description="Version to compare to.")], + max_changes: Annotated[Optional[Annotated[int, Field(le=5000, strict=True, gt=0)]], Field(description="Largest number of records `changes` may hold. A repeat of a path already recorded does not count towards it, and `truncated` says whether the bound dropped anything.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Experimental: Compare what two stored versions of a Dag currently hold. + + 🚧 This is an experimental endpoint and may change or be removed without notice. Reports observed state — what the two stored versions currently hold — not why a version was created. Version access returns the changed structure with identifying path components masked; the raw values behind those changes, and the paths that name them, are disclosed only to a caller who may also read the Dag's code. + + :param dag_id: (required) + :type dag_id: str + :param base_version_number: Version to compare from. (required) + :type base_version_number: int + :param target_version_number: Version to compare to. (required) + :type target_version_number: int + :param max_changes: Largest number of records `changes` may hold. A repeat of a path already recorded does not count towards it, and `truncated` says whether the bound dropped anything. + :type max_changes: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dag_version_diff_serialize( + dag_id=dag_id, + base_version_number=base_version_number, + target_version_number=target_version_number, + max_changes=max_changes, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DagVersionDiffResponse", + '400': "HTTPExceptionResponse", + '401': "HTTPExceptionResponse", + '403': "HTTPExceptionResponse", + '404': "HTTPExceptionResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_dag_version_diff_serialize( + self, + dag_id, + base_version_number, + target_version_number, + max_changes, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if dag_id is not None: + _path_params['dag_id'] = dag_id + # process the query parameters + if base_version_number is not None: + + _query_params.append(('base_version_number', base_version_number)) + + if target_version_number is not None: + + _query_params.append(('target_version_number', target_version_number)) + + if max_changes is not None: + + _query_params.append(('max_changes', max_changes)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if not any(key.lower() == 'accept' for key in _header_params): + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2PasswordBearer', + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v2/dags/{dag_id}/dagVersions/diff', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def get_dag_versions( self, @@ -632,7 +961,7 @@ def _get_dag_versions_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -673,7 +1002,7 @@ def _get_dag_versions_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' diff --git a/airflow_client/client/api/dag_warning_api.py b/airflow_client/client/api/dag_warning_api.py index 4a92080c..75fcba16 100644 --- a/airflow_client/client/api/dag_warning_api.py +++ b/airflow_client/client/api/dag_warning_api.py @@ -66,7 +66,7 @@ def list_dag_warnings( :param dag_id: :type dag_id: str :param warning_type: - :type warning_type: DagWarningType + :type warning_type: WarningType :param limit: :type limit: int :param offset: @@ -152,7 +152,7 @@ def list_dag_warnings_with_http_info( :param dag_id: :type dag_id: str :param warning_type: - :type warning_type: DagWarningType + :type warning_type: WarningType :param limit: :type limit: int :param offset: @@ -238,7 +238,7 @@ def list_dag_warnings_without_preload_content( :param dag_id: :type dag_id: str :param warning_type: - :type warning_type: DagWarningType + :type warning_type: WarningType :param limit: :type limit: int :param offset: @@ -313,7 +313,7 @@ def _list_dag_warnings_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -328,7 +328,7 @@ def _list_dag_warnings_serialize( if warning_type is not None: - _query_params.append(('warning_type', warning_type.value)) + _query_params.extend(self.api_client.explode_query_object('warning_type', warning_type)) if limit is not None: @@ -348,7 +348,7 @@ def _list_dag_warnings_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' diff --git a/airflow_client/client/api/event_log_api.py b/airflow_client/client/api/event_log_api.py index 33ef0bb5..74f6a111 100644 --- a/airflow_client/client/api/event_log_api.py +++ b/airflow_client/client/api/event_log_api.py @@ -19,6 +19,7 @@ from pydantic import Field, StrictInt, StrictStr from typing import List, Optional from typing_extensions import Annotated +from uuid import UUID from airflow_client.client.models.event_log_collection_response import EventLogCollectionResponse from airflow_client.client.models.event_log_response import EventLogResponse @@ -262,7 +263,7 @@ def _get_event_log_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -279,7 +280,7 @@ def _get_event_log_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -314,11 +315,14 @@ def _get_event_log_serialize( @validate_call def get_event_logs( self, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, - order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, dttm, dag_id, task_id, run_id, event, logical_date, owner, extra, when, event_log_id`")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, dttm, dag_id, task_id, run_id, event, logical_date, owner, owner_display_name, extra, when, event_log_id`")] = None, dag_id: Optional[StrictStr] = None, task_id: Optional[StrictStr] = None, + task_instance_id: Optional[UUID] = None, run_id: Optional[StrictStr] = None, map_index: Optional[StrictInt] = None, try_number: Optional[StrictInt] = None, @@ -332,12 +336,15 @@ def get_event_logs( task_id_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `task_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, run_id_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `run_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, owner_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `owner_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, + owner_display_name_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `owner_display_name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, event_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `event_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, dag_id_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, task_id_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, run_id_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, owner_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, + owner_display_name_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, event_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, + teams: Optional[List[StrictStr]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -355,16 +362,22 @@ def get_event_logs( Get all Event Logs. + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param limit: :type limit: int :param offset: :type offset: int - :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, dttm, dag_id, task_id, run_id, event, logical_date, owner, extra, when, event_log_id` + :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, dttm, dag_id, task_id, run_id, event, logical_date, owner, owner_display_name, extra, when, event_log_id` :type order_by: List[str] :param dag_id: :type dag_id: str :param task_id: :type task_id: str + :param task_instance_id: + :type task_instance_id: UUID :param run_id: :type run_id: str :param map_index: @@ -391,6 +404,8 @@ def get_event_logs( :type run_id_pattern: str :param owner_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `owner_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". :type owner_pattern: str + :param owner_display_name_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `owner_display_name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". + :type owner_display_name_pattern: str :param event_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `event_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". :type event_pattern: str :param dag_id_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". @@ -401,8 +416,12 @@ def get_event_logs( :type run_id_prefix_pattern: str :param owner_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". :type owner_prefix_pattern: str + :param owner_display_name_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". + :type owner_display_name_prefix_pattern: str :param event_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". :type event_prefix_pattern: str + :param teams: + :type teams: List[str] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -426,11 +445,14 @@ def get_event_logs( """ # noqa: E501 _param = self._get_event_logs_serialize( + region_id=region_id, + region_index=region_index, limit=limit, offset=offset, order_by=order_by, dag_id=dag_id, task_id=task_id, + task_instance_id=task_instance_id, run_id=run_id, map_index=map_index, try_number=try_number, @@ -444,12 +466,15 @@ def get_event_logs( task_id_pattern=task_id_pattern, run_id_pattern=run_id_pattern, owner_pattern=owner_pattern, + owner_display_name_pattern=owner_display_name_pattern, event_pattern=event_pattern, dag_id_prefix_pattern=dag_id_prefix_pattern, task_id_prefix_pattern=task_id_prefix_pattern, run_id_prefix_pattern=run_id_prefix_pattern, owner_prefix_pattern=owner_prefix_pattern, + owner_display_name_prefix_pattern=owner_display_name_prefix_pattern, event_prefix_pattern=event_prefix_pattern, + teams=teams, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -458,6 +483,7 @@ def get_event_logs( _response_types_map: Dict[str, Optional[str]] = { '200': "EventLogCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '422': "HTTPValidationError", @@ -476,11 +502,14 @@ def get_event_logs( @validate_call def get_event_logs_with_http_info( self, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, - order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, dttm, dag_id, task_id, run_id, event, logical_date, owner, extra, when, event_log_id`")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, dttm, dag_id, task_id, run_id, event, logical_date, owner, owner_display_name, extra, when, event_log_id`")] = None, dag_id: Optional[StrictStr] = None, task_id: Optional[StrictStr] = None, + task_instance_id: Optional[UUID] = None, run_id: Optional[StrictStr] = None, map_index: Optional[StrictInt] = None, try_number: Optional[StrictInt] = None, @@ -494,12 +523,15 @@ def get_event_logs_with_http_info( task_id_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `task_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, run_id_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `run_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, owner_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `owner_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, + owner_display_name_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `owner_display_name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, event_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `event_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, dag_id_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, task_id_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, run_id_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, owner_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, + owner_display_name_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, event_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, + teams: Optional[List[StrictStr]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -517,16 +549,22 @@ def get_event_logs_with_http_info( Get all Event Logs. + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param limit: :type limit: int :param offset: :type offset: int - :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, dttm, dag_id, task_id, run_id, event, logical_date, owner, extra, when, event_log_id` + :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, dttm, dag_id, task_id, run_id, event, logical_date, owner, owner_display_name, extra, when, event_log_id` :type order_by: List[str] :param dag_id: :type dag_id: str :param task_id: :type task_id: str + :param task_instance_id: + :type task_instance_id: UUID :param run_id: :type run_id: str :param map_index: @@ -553,6 +591,8 @@ def get_event_logs_with_http_info( :type run_id_pattern: str :param owner_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `owner_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". :type owner_pattern: str + :param owner_display_name_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `owner_display_name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". + :type owner_display_name_pattern: str :param event_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `event_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". :type event_pattern: str :param dag_id_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". @@ -563,8 +603,12 @@ def get_event_logs_with_http_info( :type run_id_prefix_pattern: str :param owner_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". :type owner_prefix_pattern: str + :param owner_display_name_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". + :type owner_display_name_prefix_pattern: str :param event_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". :type event_prefix_pattern: str + :param teams: + :type teams: List[str] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -588,11 +632,14 @@ def get_event_logs_with_http_info( """ # noqa: E501 _param = self._get_event_logs_serialize( + region_id=region_id, + region_index=region_index, limit=limit, offset=offset, order_by=order_by, dag_id=dag_id, task_id=task_id, + task_instance_id=task_instance_id, run_id=run_id, map_index=map_index, try_number=try_number, @@ -606,12 +653,15 @@ def get_event_logs_with_http_info( task_id_pattern=task_id_pattern, run_id_pattern=run_id_pattern, owner_pattern=owner_pattern, + owner_display_name_pattern=owner_display_name_pattern, event_pattern=event_pattern, dag_id_prefix_pattern=dag_id_prefix_pattern, task_id_prefix_pattern=task_id_prefix_pattern, run_id_prefix_pattern=run_id_prefix_pattern, owner_prefix_pattern=owner_prefix_pattern, + owner_display_name_prefix_pattern=owner_display_name_prefix_pattern, event_prefix_pattern=event_prefix_pattern, + teams=teams, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -620,6 +670,7 @@ def get_event_logs_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "EventLogCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '422': "HTTPValidationError", @@ -638,11 +689,14 @@ def get_event_logs_with_http_info( @validate_call def get_event_logs_without_preload_content( self, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, - order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, dttm, dag_id, task_id, run_id, event, logical_date, owner, extra, when, event_log_id`")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, dttm, dag_id, task_id, run_id, event, logical_date, owner, owner_display_name, extra, when, event_log_id`")] = None, dag_id: Optional[StrictStr] = None, task_id: Optional[StrictStr] = None, + task_instance_id: Optional[UUID] = None, run_id: Optional[StrictStr] = None, map_index: Optional[StrictInt] = None, try_number: Optional[StrictInt] = None, @@ -656,12 +710,15 @@ def get_event_logs_without_preload_content( task_id_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `task_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, run_id_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `run_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, owner_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `owner_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, + owner_display_name_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `owner_display_name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, event_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `event_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, dag_id_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, task_id_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, run_id_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, owner_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, + owner_display_name_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, event_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, + teams: Optional[List[StrictStr]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -679,16 +736,22 @@ def get_event_logs_without_preload_content( Get all Event Logs. + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param limit: :type limit: int :param offset: :type offset: int - :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, dttm, dag_id, task_id, run_id, event, logical_date, owner, extra, when, event_log_id` + :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, dttm, dag_id, task_id, run_id, event, logical_date, owner, owner_display_name, extra, when, event_log_id` :type order_by: List[str] :param dag_id: :type dag_id: str :param task_id: :type task_id: str + :param task_instance_id: + :type task_instance_id: UUID :param run_id: :type run_id: str :param map_index: @@ -715,6 +778,8 @@ def get_event_logs_without_preload_content( :type run_id_pattern: str :param owner_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `owner_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". :type owner_pattern: str + :param owner_display_name_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `owner_display_name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". + :type owner_display_name_pattern: str :param event_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `event_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". :type event_pattern: str :param dag_id_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". @@ -725,8 +790,12 @@ def get_event_logs_without_preload_content( :type run_id_prefix_pattern: str :param owner_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". :type owner_prefix_pattern: str + :param owner_display_name_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". + :type owner_display_name_prefix_pattern: str :param event_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". :type event_prefix_pattern: str + :param teams: + :type teams: List[str] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -750,11 +819,14 @@ def get_event_logs_without_preload_content( """ # noqa: E501 _param = self._get_event_logs_serialize( + region_id=region_id, + region_index=region_index, limit=limit, offset=offset, order_by=order_by, dag_id=dag_id, task_id=task_id, + task_instance_id=task_instance_id, run_id=run_id, map_index=map_index, try_number=try_number, @@ -768,12 +840,15 @@ def get_event_logs_without_preload_content( task_id_pattern=task_id_pattern, run_id_pattern=run_id_pattern, owner_pattern=owner_pattern, + owner_display_name_pattern=owner_display_name_pattern, event_pattern=event_pattern, dag_id_prefix_pattern=dag_id_prefix_pattern, task_id_prefix_pattern=task_id_prefix_pattern, run_id_prefix_pattern=run_id_prefix_pattern, owner_prefix_pattern=owner_prefix_pattern, + owner_display_name_prefix_pattern=owner_display_name_prefix_pattern, event_prefix_pattern=event_prefix_pattern, + teams=teams, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -782,6 +857,7 @@ def get_event_logs_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "EventLogCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '422': "HTTPValidationError", @@ -795,11 +871,14 @@ def get_event_logs_without_preload_content( def _get_event_logs_serialize( self, + region_id, + region_index, limit, offset, order_by, dag_id, task_id, + task_instance_id, run_id, map_index, try_number, @@ -813,12 +892,15 @@ def _get_event_logs_serialize( task_id_pattern, run_id_pattern, owner_pattern, + owner_display_name_pattern, event_pattern, dag_id_prefix_pattern, task_id_prefix_pattern, run_id_prefix_pattern, owner_prefix_pattern, + owner_display_name_prefix_pattern, event_prefix_pattern, + teams, _request_auth, _content_type, _headers, @@ -831,11 +913,12 @@ def _get_event_logs_serialize( 'order_by': 'multi', 'excluded_events': 'multi', 'included_events': 'multi', + 'teams': 'multi', } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -844,6 +927,14 @@ def _get_event_logs_serialize( # process the path parameters # process the query parameters + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + if limit is not None: _query_params.append(('limit', limit)) @@ -864,6 +955,10 @@ def _get_event_logs_serialize( _query_params.append(('task_id', task_id)) + if task_instance_id is not None: + + _query_params.append(('task_instance_id', task_instance_id)) + if run_id is not None: _query_params.append(('run_id', run_id)) @@ -934,6 +1029,10 @@ def _get_event_logs_serialize( _query_params.append(('owner_pattern', owner_pattern)) + if owner_display_name_pattern is not None: + + _query_params.append(('owner_display_name_pattern', owner_display_name_pattern)) + if event_pattern is not None: _query_params.append(('event_pattern', event_pattern)) @@ -954,17 +1053,25 @@ def _get_event_logs_serialize( _query_params.append(('owner_prefix_pattern', owner_prefix_pattern)) + if owner_display_name_prefix_pattern is not None: + + _query_params.append(('owner_display_name_prefix_pattern', owner_display_name_prefix_pattern)) + if event_prefix_pattern is not None: _query_params.append(('event_prefix_pattern', event_prefix_pattern)) + if teams is not None: + + _query_params.append(('teams', teams)) + # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' diff --git a/airflow_client/client/api/experimental_api.py b/airflow_client/client/api/experimental_api.py index a1b3f1cc..42bdb482 100644 --- a/airflow_client/client/api/experimental_api.py +++ b/airflow_client/client/api/experimental_api.py @@ -18,6 +18,7 @@ from pydantic import Field, StrictStr from typing import Any, List, Optional, Union from typing_extensions import Annotated +from airflow_client.client.models.dag_version_diff_response import DagVersionDiffResponse from airflow_client.client.api_client import ApiClient, RequestSerialized from airflow_client.client.api_response import ApiResponse @@ -37,6 +38,334 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client + @validate_call + def get_dag_version_diff( + self, + dag_id: StrictStr, + base_version_number: Annotated[int, Field(strict=True, gt=0, description="Version to compare from.")], + target_version_number: Annotated[int, Field(strict=True, gt=0, description="Version to compare to.")], + max_changes: Annotated[Optional[Annotated[int, Field(le=5000, strict=True, gt=0)]], Field(description="Largest number of records `changes` may hold. A repeat of a path already recorded does not count towards it, and `truncated` says whether the bound dropped anything.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DagVersionDiffResponse: + """Experimental: Compare what two stored versions of a Dag currently hold. + + 🚧 This is an experimental endpoint and may change or be removed without notice. Reports observed state — what the two stored versions currently hold — not why a version was created. Version access returns the changed structure with identifying path components masked; the raw values behind those changes, and the paths that name them, are disclosed only to a caller who may also read the Dag's code. + + :param dag_id: (required) + :type dag_id: str + :param base_version_number: Version to compare from. (required) + :type base_version_number: int + :param target_version_number: Version to compare to. (required) + :type target_version_number: int + :param max_changes: Largest number of records `changes` may hold. A repeat of a path already recorded does not count towards it, and `truncated` says whether the bound dropped anything. + :type max_changes: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dag_version_diff_serialize( + dag_id=dag_id, + base_version_number=base_version_number, + target_version_number=target_version_number, + max_changes=max_changes, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DagVersionDiffResponse", + '400': "HTTPExceptionResponse", + '401': "HTTPExceptionResponse", + '403': "HTTPExceptionResponse", + '404': "HTTPExceptionResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_dag_version_diff_with_http_info( + self, + dag_id: StrictStr, + base_version_number: Annotated[int, Field(strict=True, gt=0, description="Version to compare from.")], + target_version_number: Annotated[int, Field(strict=True, gt=0, description="Version to compare to.")], + max_changes: Annotated[Optional[Annotated[int, Field(le=5000, strict=True, gt=0)]], Field(description="Largest number of records `changes` may hold. A repeat of a path already recorded does not count towards it, and `truncated` says whether the bound dropped anything.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DagVersionDiffResponse]: + """Experimental: Compare what two stored versions of a Dag currently hold. + + 🚧 This is an experimental endpoint and may change or be removed without notice. Reports observed state — what the two stored versions currently hold — not why a version was created. Version access returns the changed structure with identifying path components masked; the raw values behind those changes, and the paths that name them, are disclosed only to a caller who may also read the Dag's code. + + :param dag_id: (required) + :type dag_id: str + :param base_version_number: Version to compare from. (required) + :type base_version_number: int + :param target_version_number: Version to compare to. (required) + :type target_version_number: int + :param max_changes: Largest number of records `changes` may hold. A repeat of a path already recorded does not count towards it, and `truncated` says whether the bound dropped anything. + :type max_changes: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dag_version_diff_serialize( + dag_id=dag_id, + base_version_number=base_version_number, + target_version_number=target_version_number, + max_changes=max_changes, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DagVersionDiffResponse", + '400': "HTTPExceptionResponse", + '401': "HTTPExceptionResponse", + '403': "HTTPExceptionResponse", + '404': "HTTPExceptionResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_dag_version_diff_without_preload_content( + self, + dag_id: StrictStr, + base_version_number: Annotated[int, Field(strict=True, gt=0, description="Version to compare from.")], + target_version_number: Annotated[int, Field(strict=True, gt=0, description="Version to compare to.")], + max_changes: Annotated[Optional[Annotated[int, Field(le=5000, strict=True, gt=0)]], Field(description="Largest number of records `changes` may hold. A repeat of a path already recorded does not count towards it, and `truncated` says whether the bound dropped anything.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Experimental: Compare what two stored versions of a Dag currently hold. + + 🚧 This is an experimental endpoint and may change or be removed without notice. Reports observed state — what the two stored versions currently hold — not why a version was created. Version access returns the changed structure with identifying path components masked; the raw values behind those changes, and the paths that name them, are disclosed only to a caller who may also read the Dag's code. + + :param dag_id: (required) + :type dag_id: str + :param base_version_number: Version to compare from. (required) + :type base_version_number: int + :param target_version_number: Version to compare to. (required) + :type target_version_number: int + :param max_changes: Largest number of records `changes` may hold. A repeat of a path already recorded does not count towards it, and `truncated` says whether the bound dropped anything. + :type max_changes: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dag_version_diff_serialize( + dag_id=dag_id, + base_version_number=base_version_number, + target_version_number=target_version_number, + max_changes=max_changes, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DagVersionDiffResponse", + '400': "HTTPExceptionResponse", + '401': "HTTPExceptionResponse", + '403': "HTTPExceptionResponse", + '404': "HTTPExceptionResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_dag_version_diff_serialize( + self, + dag_id, + base_version_number, + target_version_number, + max_changes, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if dag_id is not None: + _path_params['dag_id'] = dag_id + # process the query parameters + if base_version_number is not None: + + _query_params.append(('base_version_number', base_version_number)) + + if target_version_number is not None: + + _query_params.append(('target_version_number', target_version_number)) + + if max_changes is not None: + + _query_params.append(('max_changes', max_changes)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if not any(key.lower() == 'accept' for key in _header_params): + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'OAuth2PasswordBearer', + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v2/dags/{dag_id}/dagVersions/diff', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def wait_dag_run_until_finished( self, @@ -107,6 +436,7 @@ def wait_dag_run_until_finished( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -190,6 +520,7 @@ def wait_dag_run_until_finished_with_http_info( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -273,6 +604,7 @@ def wait_dag_run_until_finished_without_preload_content( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -302,7 +634,7 @@ def _wait_dag_run_until_finished_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -329,7 +661,7 @@ def _wait_dag_run_until_finished_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json', diff --git a/airflow_client/client/api/extra_links_api.py b/airflow_client/client/api/extra_links_api.py index 3ebdfc29..77835ef9 100644 --- a/airflow_client/client/api/extra_links_api.py +++ b/airflow_client/client/api/extra_links_api.py @@ -15,8 +15,10 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictInt, StrictStr +from pydantic import Field, StrictInt, StrictStr from typing import Optional +from typing_extensions import Annotated +from uuid import UUID from airflow_client.client.models.extra_link_collection_response import ExtraLinkCollectionResponse from airflow_client.client.api_client import ApiClient, RequestSerialized @@ -44,6 +46,8 @@ def get_extra_links( dag_run_id: StrictStr, task_id: StrictStr, map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, try_number: Optional[StrictInt] = None, _request_timeout: Union[ None, @@ -70,6 +74,10 @@ def get_extra_links( :type task_id: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param try_number: :type try_number: int :param _request_timeout: timeout setting for this request. If one @@ -99,6 +107,8 @@ def get_extra_links( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, try_number=try_number, _request_auth=_request_auth, _content_type=_content_type, @@ -108,9 +118,11 @@ def get_extra_links( _response_types_map: Dict[str, Optional[str]] = { '200': "ExtraLinkCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -131,6 +143,8 @@ def get_extra_links_with_http_info( dag_run_id: StrictStr, task_id: StrictStr, map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, try_number: Optional[StrictInt] = None, _request_timeout: Union[ None, @@ -157,6 +171,10 @@ def get_extra_links_with_http_info( :type task_id: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param try_number: :type try_number: int :param _request_timeout: timeout setting for this request. If one @@ -186,6 +204,8 @@ def get_extra_links_with_http_info( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, try_number=try_number, _request_auth=_request_auth, _content_type=_content_type, @@ -195,9 +215,11 @@ def get_extra_links_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "ExtraLinkCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -218,6 +240,8 @@ def get_extra_links_without_preload_content( dag_run_id: StrictStr, task_id: StrictStr, map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, try_number: Optional[StrictInt] = None, _request_timeout: Union[ None, @@ -244,6 +268,10 @@ def get_extra_links_without_preload_content( :type task_id: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param try_number: :type try_number: int :param _request_timeout: timeout setting for this request. If one @@ -273,6 +301,8 @@ def get_extra_links_without_preload_content( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, try_number=try_number, _request_auth=_request_auth, _content_type=_content_type, @@ -282,9 +312,11 @@ def get_extra_links_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "ExtraLinkCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -300,6 +332,8 @@ def _get_extra_links_serialize( dag_run_id, task_id, map_index, + region_id, + region_index, try_number, _request_auth, _content_type, @@ -314,7 +348,7 @@ def _get_extra_links_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -333,6 +367,14 @@ def _get_extra_links_serialize( _query_params.append(('map_index', map_index)) + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + if try_number is not None: _query_params.append(('try_number', try_number)) @@ -343,7 +385,7 @@ def _get_extra_links_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' diff --git a/airflow_client/client/api/import_error_api.py b/airflow_client/client/api/import_error_api.py index e18f0b73..7b24d5a6 100644 --- a/airflow_client/client/api/import_error_api.py +++ b/airflow_client/client/api/import_error_api.py @@ -264,7 +264,7 @@ def _get_import_error_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -281,7 +281,7 @@ def _get_import_error_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -318,7 +318,7 @@ def get_import_errors( self, limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, - order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, timestamp, filename, bundle_name, stacktrace, import_error_id`")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, timestamp, filename, source_reference, bundle_name, stacktrace, import_error_id`")] = None, filename_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `filename_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, filename_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, filename: Annotated[Optional[StrictStr], Field(description="Exact filename match. Returns only the import error for this specific file path.")] = None, @@ -344,7 +344,7 @@ def get_import_errors( :type limit: int :param offset: :type offset: int - :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, timestamp, filename, bundle_name, stacktrace, import_error_id` + :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, timestamp, filename, source_reference, bundle_name, stacktrace, import_error_id` :type order_by: List[str] :param filename_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `filename_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". :type filename_pattern: str @@ -412,7 +412,7 @@ def get_import_errors_with_http_info( self, limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, - order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, timestamp, filename, bundle_name, stacktrace, import_error_id`")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, timestamp, filename, source_reference, bundle_name, stacktrace, import_error_id`")] = None, filename_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `filename_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, filename_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, filename: Annotated[Optional[StrictStr], Field(description="Exact filename match. Returns only the import error for this specific file path.")] = None, @@ -438,7 +438,7 @@ def get_import_errors_with_http_info( :type limit: int :param offset: :type offset: int - :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, timestamp, filename, bundle_name, stacktrace, import_error_id` + :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, timestamp, filename, source_reference, bundle_name, stacktrace, import_error_id` :type order_by: List[str] :param filename_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `filename_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". :type filename_pattern: str @@ -506,7 +506,7 @@ def get_import_errors_without_preload_content( self, limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, - order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, timestamp, filename, bundle_name, stacktrace, import_error_id`")] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, timestamp, filename, source_reference, bundle_name, stacktrace, import_error_id`")] = None, filename_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `filename_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, filename_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, filename: Annotated[Optional[StrictStr], Field(description="Exact filename match. Returns only the import error for this specific file path.")] = None, @@ -532,7 +532,7 @@ def get_import_errors_without_preload_content( :type limit: int :param offset: :type offset: int - :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, timestamp, filename, bundle_name, stacktrace, import_error_id` + :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, timestamp, filename, source_reference, bundle_name, stacktrace, import_error_id` :type order_by: List[str] :param filename_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `filename_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". :type filename_pattern: str @@ -614,7 +614,7 @@ def _get_import_errors_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -657,7 +657,7 @@ def _get_import_errors_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' diff --git a/airflow_client/client/api/job_api.py b/airflow_client/client/api/job_api.py index 39871da9..5b61d89f 100644 --- a/airflow_client/client/api/job_api.py +++ b/airflow_client/client/api/job_api.py @@ -42,7 +42,6 @@ def __init__(self, api_client=None) -> None: @validate_call def get_jobs( self, - is_alive: Optional[StrictBool] = None, start_date_gte: Optional[datetime] = None, start_date_gt: Optional[datetime] = None, start_date_lte: Optional[datetime] = None, @@ -55,9 +54,12 @@ def get_jobs( offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, dag_id, state, job_type, start_date, end_date, latest_heartbeat, executor_class, hostname, unixname`")] = None, job_state: Optional[StrictStr] = None, + dag_id: Optional[StrictStr] = None, job_type: Optional[StrictStr] = None, hostname: Optional[StrictStr] = None, executor_class: Optional[StrictStr] = None, + teams: Optional[List[StrictStr]] = None, + is_alive: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -75,8 +77,6 @@ def get_jobs( Get all jobs. - :param is_alive: - :type is_alive: bool :param start_date_gte: :type start_date_gte: datetime :param start_date_gt: @@ -101,12 +101,18 @@ def get_jobs( :type order_by: List[str] :param job_state: :type job_state: str + :param dag_id: + :type dag_id: str :param job_type: :type job_type: str :param hostname: :type hostname: str :param executor_class: :type executor_class: str + :param teams: + :type teams: List[str] + :param is_alive: + :type is_alive: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -130,7 +136,6 @@ def get_jobs( """ # noqa: E501 _param = self._get_jobs_serialize( - is_alive=is_alive, start_date_gte=start_date_gte, start_date_gt=start_date_gt, start_date_lte=start_date_lte, @@ -143,9 +148,12 @@ def get_jobs( offset=offset, order_by=order_by, job_state=job_state, + dag_id=dag_id, job_type=job_type, hostname=hostname, executor_class=executor_class, + teams=teams, + is_alive=is_alive, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -173,7 +181,6 @@ def get_jobs( @validate_call def get_jobs_with_http_info( self, - is_alive: Optional[StrictBool] = None, start_date_gte: Optional[datetime] = None, start_date_gt: Optional[datetime] = None, start_date_lte: Optional[datetime] = None, @@ -186,9 +193,12 @@ def get_jobs_with_http_info( offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, dag_id, state, job_type, start_date, end_date, latest_heartbeat, executor_class, hostname, unixname`")] = None, job_state: Optional[StrictStr] = None, + dag_id: Optional[StrictStr] = None, job_type: Optional[StrictStr] = None, hostname: Optional[StrictStr] = None, executor_class: Optional[StrictStr] = None, + teams: Optional[List[StrictStr]] = None, + is_alive: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -206,8 +216,6 @@ def get_jobs_with_http_info( Get all jobs. - :param is_alive: - :type is_alive: bool :param start_date_gte: :type start_date_gte: datetime :param start_date_gt: @@ -232,12 +240,18 @@ def get_jobs_with_http_info( :type order_by: List[str] :param job_state: :type job_state: str + :param dag_id: + :type dag_id: str :param job_type: :type job_type: str :param hostname: :type hostname: str :param executor_class: :type executor_class: str + :param teams: + :type teams: List[str] + :param is_alive: + :type is_alive: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -261,7 +275,6 @@ def get_jobs_with_http_info( """ # noqa: E501 _param = self._get_jobs_serialize( - is_alive=is_alive, start_date_gte=start_date_gte, start_date_gt=start_date_gt, start_date_lte=start_date_lte, @@ -274,9 +287,12 @@ def get_jobs_with_http_info( offset=offset, order_by=order_by, job_state=job_state, + dag_id=dag_id, job_type=job_type, hostname=hostname, executor_class=executor_class, + teams=teams, + is_alive=is_alive, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -304,7 +320,6 @@ def get_jobs_with_http_info( @validate_call def get_jobs_without_preload_content( self, - is_alive: Optional[StrictBool] = None, start_date_gte: Optional[datetime] = None, start_date_gt: Optional[datetime] = None, start_date_lte: Optional[datetime] = None, @@ -317,9 +332,12 @@ def get_jobs_without_preload_content( offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, dag_id, state, job_type, start_date, end_date, latest_heartbeat, executor_class, hostname, unixname`")] = None, job_state: Optional[StrictStr] = None, + dag_id: Optional[StrictStr] = None, job_type: Optional[StrictStr] = None, hostname: Optional[StrictStr] = None, executor_class: Optional[StrictStr] = None, + teams: Optional[List[StrictStr]] = None, + is_alive: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -337,8 +355,6 @@ def get_jobs_without_preload_content( Get all jobs. - :param is_alive: - :type is_alive: bool :param start_date_gte: :type start_date_gte: datetime :param start_date_gt: @@ -363,12 +379,18 @@ def get_jobs_without_preload_content( :type order_by: List[str] :param job_state: :type job_state: str + :param dag_id: + :type dag_id: str :param job_type: :type job_type: str :param hostname: :type hostname: str :param executor_class: :type executor_class: str + :param teams: + :type teams: List[str] + :param is_alive: + :type is_alive: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -392,7 +414,6 @@ def get_jobs_without_preload_content( """ # noqa: E501 _param = self._get_jobs_serialize( - is_alive=is_alive, start_date_gte=start_date_gte, start_date_gt=start_date_gt, start_date_lte=start_date_lte, @@ -405,9 +426,12 @@ def get_jobs_without_preload_content( offset=offset, order_by=order_by, job_state=job_state, + dag_id=dag_id, job_type=job_type, hostname=hostname, executor_class=executor_class, + teams=teams, + is_alive=is_alive, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -430,7 +454,6 @@ def get_jobs_without_preload_content( def _get_jobs_serialize( self, - is_alive, start_date_gte, start_date_gt, start_date_lte, @@ -443,9 +466,12 @@ def _get_jobs_serialize( offset, order_by, job_state, + dag_id, job_type, hostname, executor_class, + teams, + is_alive, _request_auth, _content_type, _headers, @@ -456,11 +482,12 @@ def _get_jobs_serialize( _collection_formats: Dict[str, str] = { 'order_by': 'multi', + 'teams': 'multi', } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -469,10 +496,6 @@ def _get_jobs_serialize( # process the path parameters # process the query parameters - if is_alive is not None: - - _query_params.append(('is_alive', is_alive)) - if start_date_gte is not None: if isinstance(start_date_gte, datetime): _query_params.append( @@ -593,6 +616,10 @@ def _get_jobs_serialize( _query_params.append(('job_state', job_state)) + if dag_id is not None: + + _query_params.append(('dag_id', dag_id)) + if job_type is not None: _query_params.append(('job_type', job_type)) @@ -605,13 +632,21 @@ def _get_jobs_serialize( _query_params.append(('executor_class', executor_class)) + if teams is not None: + + _query_params.append(('teams', teams)) + + if is_alive is not None: + + _query_params.append(('is_alive', is_alive)) + # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' diff --git a/airflow_client/client/api/login_api.py b/airflow_client/client/api/login_api.py index 2c316a20..56558d58 100644 --- a/airflow_client/client/api/login_api.py +++ b/airflow_client/client/api/login_api.py @@ -258,7 +258,7 @@ def _login_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -277,7 +277,7 @@ def _login_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -510,7 +510,7 @@ def _logout_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -525,7 +525,7 @@ def _logout_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' diff --git a/airflow_client/client/api/monitor_api.py b/airflow_client/client/api/monitor_api.py index 03a87192..85ba6aaa 100644 --- a/airflow_client/client/api/monitor_api.py +++ b/airflow_client/client/api/monitor_api.py @@ -232,7 +232,7 @@ def _get_health_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -247,7 +247,7 @@ def _get_health_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' diff --git a/airflow_client/client/api/plugin_api.py b/airflow_client/client/api/plugin_api.py index 3b25f4d9..7de4c247 100644 --- a/airflow_client/client/api/plugin_api.py +++ b/airflow_client/client/api/plugin_api.py @@ -271,7 +271,7 @@ def _get_plugins_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -294,7 +294,7 @@ def _get_plugins_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -529,7 +529,7 @@ def _import_errors_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -544,7 +544,7 @@ def _import_errors_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' diff --git a/airflow_client/client/api/pool_api.py b/airflow_client/client/api/pool_api.py index 33e5f081..4d0305be 100644 --- a/airflow_client/client/api/pool_api.py +++ b/airflow_client/client/api/pool_api.py @@ -265,7 +265,7 @@ def _bulk_pools_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -282,7 +282,7 @@ def _bulk_pools_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -291,7 +291,7 @@ def _bulk_pools_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -301,7 +301,7 @@ def _bulk_pools_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -555,7 +555,7 @@ def _delete_pool_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -572,7 +572,7 @@ def _delete_pool_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -829,7 +829,7 @@ def _get_pool_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -846,7 +846,7 @@ def _get_pool_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1153,7 +1153,7 @@ def _get_pools_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1188,7 +1188,7 @@ def _get_pools_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1475,7 +1475,7 @@ def _patch_pool_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1498,7 +1498,7 @@ def _patch_pool_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1507,7 +1507,7 @@ def _patch_pool_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -1517,7 +1517,7 @@ def _patch_pool_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -1768,7 +1768,7 @@ def _post_pool_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1785,7 +1785,7 @@ def _post_pool_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1794,7 +1794,7 @@ def _post_pool_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -1804,7 +1804,7 @@ def _post_pool_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ diff --git a/airflow_client/client/api/provider_api.py b/airflow_client/client/api/provider_api.py index 42c8de56..08d8e584 100644 --- a/airflow_client/client/api/provider_api.py +++ b/airflow_client/client/api/provider_api.py @@ -273,7 +273,7 @@ def _get_providers_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -296,7 +296,7 @@ def _get_providers_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' diff --git a/airflow_client/client/api/task_api.py b/airflow_client/client/api/task_api.py index 2386e67d..32cfd728 100644 --- a/airflow_client/client/api/task_api.py +++ b/airflow_client/client/api/task_api.py @@ -15,7 +15,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import StrictInt, StrictStr from typing import Any, Optional from airflow_client.client.models.task_collection_response import TaskCollectionResponse from airflow_client.client.models.task_response import TaskResponse @@ -43,6 +43,7 @@ def get_task( self, dag_id: StrictStr, task_id: Any, + version_number: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -58,12 +59,14 @@ def get_task( ) -> TaskResponse: """Get Task - Get simplified representation of a task. + Get simplified representation of a task. Pass ``version_number`` (e.g. a task instance's ``dag_version.version_number``) to get the task as defined in that Dag version. Without it the latest version is used. Returns 404 if that version of the Dag does not exist. :param dag_id: (required) :type dag_id: str :param task_id: (required) :type task_id: object + :param version_number: + :type version_number: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -89,6 +92,7 @@ def get_task( _param = self._get_task_serialize( dag_id=dag_id, task_id=task_id, + version_number=version_number, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -119,6 +123,7 @@ def get_task_with_http_info( self, dag_id: StrictStr, task_id: Any, + version_number: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -134,12 +139,14 @@ def get_task_with_http_info( ) -> ApiResponse[TaskResponse]: """Get Task - Get simplified representation of a task. + Get simplified representation of a task. Pass ``version_number`` (e.g. a task instance's ``dag_version.version_number``) to get the task as defined in that Dag version. Without it the latest version is used. Returns 404 if that version of the Dag does not exist. :param dag_id: (required) :type dag_id: str :param task_id: (required) :type task_id: object + :param version_number: + :type version_number: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -165,6 +172,7 @@ def get_task_with_http_info( _param = self._get_task_serialize( dag_id=dag_id, task_id=task_id, + version_number=version_number, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -195,6 +203,7 @@ def get_task_without_preload_content( self, dag_id: StrictStr, task_id: Any, + version_number: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -210,12 +219,14 @@ def get_task_without_preload_content( ) -> RESTResponseType: """Get Task - Get simplified representation of a task. + Get simplified representation of a task. Pass ``version_number`` (e.g. a task instance's ``dag_version.version_number``) to get the task as defined in that Dag version. Without it the latest version is used. Returns 404 if that version of the Dag does not exist. :param dag_id: (required) :type dag_id: str :param task_id: (required) :type task_id: object + :param version_number: + :type version_number: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -241,6 +252,7 @@ def get_task_without_preload_content( _param = self._get_task_serialize( dag_id=dag_id, task_id=task_id, + version_number=version_number, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -266,6 +278,7 @@ def _get_task_serialize( self, dag_id, task_id, + version_number, _request_auth, _content_type, _headers, @@ -279,7 +292,7 @@ def _get_task_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -292,13 +305,17 @@ def _get_task_serialize( if task_id is not None: _path_params['task_id'] = task_id # process the query parameters + if version_number is not None: + + _query_params.append(('version_number', version_number)) + # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -571,7 +588,7 @@ def _get_tasks_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -592,7 +609,7 @@ def _get_tasks_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' diff --git a/airflow_client/client/api/task_instance_api.py b/airflow_client/client/api/task_instance_api.py index 6684aee7..6e2f4224 100644 --- a/airflow_client/client/api/task_instance_api.py +++ b/airflow_client/client/api/task_instance_api.py @@ -19,6 +19,7 @@ from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, List, Optional, Union from typing_extensions import Annotated +from uuid import UUID from airflow_client.client.models.bulk_body_bulk_task_instance_body import BulkBodyBulkTaskInstanceBody from airflow_client.client.models.bulk_response import BulkResponse from airflow_client.client.models.clear_task_instances_body import ClearTaskInstancesBody @@ -304,7 +305,7 @@ def _bulk_task_instances_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -325,7 +326,7 @@ def _bulk_task_instances_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -334,7 +335,7 @@ def _bulk_task_instances_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -344,7 +345,7 @@ def _bulk_task_instances_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -377,6 +378,8 @@ def delete_task_instance( dag_run_id: StrictStr, task_id: StrictStr, map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -402,6 +405,10 @@ def delete_task_instance( :type task_id: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -429,6 +436,8 @@ def delete_task_instance( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -437,9 +446,11 @@ def delete_task_instance( _response_types_map: Dict[str, Optional[str]] = { '200': "object", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -460,6 +471,8 @@ def delete_task_instance_with_http_info( dag_run_id: StrictStr, task_id: StrictStr, map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -485,6 +498,10 @@ def delete_task_instance_with_http_info( :type task_id: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -512,6 +529,8 @@ def delete_task_instance_with_http_info( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -520,9 +539,11 @@ def delete_task_instance_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "object", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -543,6 +564,8 @@ def delete_task_instance_without_preload_content( dag_run_id: StrictStr, task_id: StrictStr, map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -568,6 +591,10 @@ def delete_task_instance_without_preload_content( :type task_id: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -595,6 +622,8 @@ def delete_task_instance_without_preload_content( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -603,9 +632,11 @@ def delete_task_instance_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "object", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -621,6 +652,8 @@ def _delete_task_instance_serialize( dag_run_id, task_id, map_index, + region_id, + region_index, _request_auth, _content_type, _headers, @@ -634,7 +667,7 @@ def _delete_task_instance_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -653,13 +686,21 @@ def _delete_task_instance_serialize( _query_params.append(('map_index', map_index)) + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -699,6 +740,8 @@ def get_external_log_url( task_id: StrictStr, try_number: Annotated[int, Field(strict=True, gt=0)], map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -726,6 +769,10 @@ def get_external_log_url( :type try_number: int :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -754,6 +801,8 @@ def get_external_log_url( task_id=task_id, try_number=try_number, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -766,6 +815,7 @@ def get_external_log_url( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -787,6 +837,8 @@ def get_external_log_url_with_http_info( task_id: StrictStr, try_number: Annotated[int, Field(strict=True, gt=0)], map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -814,6 +866,10 @@ def get_external_log_url_with_http_info( :type try_number: int :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -842,6 +898,8 @@ def get_external_log_url_with_http_info( task_id=task_id, try_number=try_number, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -854,6 +912,7 @@ def get_external_log_url_with_http_info( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -875,6 +934,8 @@ def get_external_log_url_without_preload_content( task_id: StrictStr, try_number: Annotated[int, Field(strict=True, gt=0)], map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -902,6 +963,10 @@ def get_external_log_url_without_preload_content( :type try_number: int :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -930,6 +995,8 @@ def get_external_log_url_without_preload_content( task_id=task_id, try_number=try_number, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -942,6 +1009,7 @@ def get_external_log_url_without_preload_content( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -958,6 +1026,8 @@ def _get_external_log_url_serialize( task_id, try_number, map_index, + region_id, + region_index, _request_auth, _content_type, _headers, @@ -971,7 +1041,7 @@ def _get_external_log_url_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -992,13 +1062,21 @@ def _get_external_log_url_serialize( _query_params.append(('map_index', map_index)) + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1037,6 +1115,8 @@ def get_extra_links( dag_run_id: StrictStr, task_id: StrictStr, map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, try_number: Optional[StrictInt] = None, _request_timeout: Union[ None, @@ -1063,6 +1143,10 @@ def get_extra_links( :type task_id: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param try_number: :type try_number: int :param _request_timeout: timeout setting for this request. If one @@ -1092,6 +1176,8 @@ def get_extra_links( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, try_number=try_number, _request_auth=_request_auth, _content_type=_content_type, @@ -1101,9 +1187,11 @@ def get_extra_links( _response_types_map: Dict[str, Optional[str]] = { '200': "ExtraLinkCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1124,6 +1212,8 @@ def get_extra_links_with_http_info( dag_run_id: StrictStr, task_id: StrictStr, map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, try_number: Optional[StrictInt] = None, _request_timeout: Union[ None, @@ -1150,6 +1240,10 @@ def get_extra_links_with_http_info( :type task_id: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param try_number: :type try_number: int :param _request_timeout: timeout setting for this request. If one @@ -1179,6 +1273,8 @@ def get_extra_links_with_http_info( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, try_number=try_number, _request_auth=_request_auth, _content_type=_content_type, @@ -1188,9 +1284,11 @@ def get_extra_links_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "ExtraLinkCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1211,6 +1309,8 @@ def get_extra_links_without_preload_content( dag_run_id: StrictStr, task_id: StrictStr, map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, try_number: Optional[StrictInt] = None, _request_timeout: Union[ None, @@ -1237,6 +1337,10 @@ def get_extra_links_without_preload_content( :type task_id: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param try_number: :type try_number: int :param _request_timeout: timeout setting for this request. If one @@ -1266,6 +1370,8 @@ def get_extra_links_without_preload_content( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, try_number=try_number, _request_auth=_request_auth, _content_type=_content_type, @@ -1275,9 +1381,11 @@ def get_extra_links_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "ExtraLinkCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1293,6 +1401,8 @@ def _get_extra_links_serialize( dag_run_id, task_id, map_index, + region_id, + region_index, try_number, _request_auth, _content_type, @@ -1307,7 +1417,7 @@ def _get_extra_links_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1326,6 +1436,14 @@ def _get_extra_links_serialize( _query_params.append(('map_index', map_index)) + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + if try_number is not None: _query_params.append(('try_number', try_number)) @@ -1336,7 +1454,7 @@ def _get_extra_links_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1375,6 +1493,8 @@ def get_hitl_detail( dag_run_id: StrictStr, task_id: StrictStr, map_index: StrictInt, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1400,6 +1520,10 @@ def get_hitl_detail( :type task_id: str :param map_index: (required) :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1427,6 +1551,8 @@ def get_hitl_detail( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1435,9 +1561,11 @@ def get_hitl_detail( _response_types_map: Dict[str, Optional[str]] = { '200': "HITLDetail", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1458,6 +1586,8 @@ def get_hitl_detail_with_http_info( dag_run_id: StrictStr, task_id: StrictStr, map_index: StrictInt, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1483,6 +1613,10 @@ def get_hitl_detail_with_http_info( :type task_id: str :param map_index: (required) :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1510,6 +1644,8 @@ def get_hitl_detail_with_http_info( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1518,9 +1654,11 @@ def get_hitl_detail_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "HITLDetail", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1541,6 +1679,8 @@ def get_hitl_detail_without_preload_content( dag_run_id: StrictStr, task_id: StrictStr, map_index: StrictInt, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1566,6 +1706,10 @@ def get_hitl_detail_without_preload_content( :type task_id: str :param map_index: (required) :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1593,6 +1737,8 @@ def get_hitl_detail_without_preload_content( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1601,9 +1747,11 @@ def get_hitl_detail_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "HITLDetail", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1619,6 +1767,8 @@ def _get_hitl_detail_serialize( dag_run_id, task_id, map_index, + region_id, + region_index, _request_auth, _content_type, _headers, @@ -1632,7 +1782,7 @@ def _get_hitl_detail_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1649,13 +1799,21 @@ def _get_hitl_detail_serialize( if map_index is not None: _path_params['map_index'] = map_index # process the query parameters + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1695,6 +1853,8 @@ def get_hitl_detail_try_detail( task_id: StrictStr, map_index: StrictInt, try_number: StrictInt, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1722,6 +1882,10 @@ def get_hitl_detail_try_detail( :type map_index: int :param try_number: (required) :type try_number: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1750,6 +1914,8 @@ def get_hitl_detail_try_detail( task_id=task_id, map_index=map_index, try_number=try_number, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1758,9 +1924,11 @@ def get_hitl_detail_try_detail( _response_types_map: Dict[str, Optional[str]] = { '200': "HITLDetailHistory", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1782,6 +1950,8 @@ def get_hitl_detail_try_detail_with_http_info( task_id: StrictStr, map_index: StrictInt, try_number: StrictInt, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1809,6 +1979,10 @@ def get_hitl_detail_try_detail_with_http_info( :type map_index: int :param try_number: (required) :type try_number: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1837,6 +2011,8 @@ def get_hitl_detail_try_detail_with_http_info( task_id=task_id, map_index=map_index, try_number=try_number, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1845,9 +2021,11 @@ def get_hitl_detail_try_detail_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "HITLDetailHistory", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1869,6 +2047,8 @@ def get_hitl_detail_try_detail_without_preload_content( task_id: StrictStr, map_index: StrictInt, try_number: StrictInt, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1896,6 +2076,10 @@ def get_hitl_detail_try_detail_without_preload_content( :type map_index: int :param try_number: (required) :type try_number: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1924,6 +2108,8 @@ def get_hitl_detail_try_detail_without_preload_content( task_id=task_id, map_index=map_index, try_number=try_number, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1932,9 +2118,11 @@ def get_hitl_detail_try_detail_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "HITLDetailHistory", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1951,6 +2139,8 @@ def _get_hitl_detail_try_detail_serialize( task_id, map_index, try_number, + region_id, + region_index, _request_auth, _content_type, _headers, @@ -1964,7 +2154,7 @@ def _get_hitl_detail_try_detail_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1983,13 +2173,21 @@ def _get_hitl_detail_try_detail_serialize( if try_number is not None: _path_params['try_number'] = try_number # process the query parameters + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -2026,6 +2224,8 @@ def get_hitl_details( self, dag_id: StrictStr, dag_run_id: StrictStr, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `ti_id, subject, responded_at, created_at, responded_by_user_id, responded_by_user_name, dag_id, run_id, task_display_name, run_after, rendered_map_index, task_instance_operator, task_instance_state`")] = None, @@ -2036,6 +2236,7 @@ def get_hitl_details( task_id_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, map_index: Optional[StrictInt] = None, state: Optional[List[StrictStr]] = None, + teams: Optional[List[StrictStr]] = None, response_received: Optional[StrictBool] = None, responded_by_user_id: Optional[List[StrictStr]] = None, responded_by_user_name: Optional[List[StrictStr]] = None, @@ -2066,6 +2267,10 @@ def get_hitl_details( :type dag_id: str :param dag_run_id: (required) :type dag_run_id: str + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param limit: :type limit: int :param offset: @@ -2086,6 +2291,8 @@ def get_hitl_details( :type map_index: int :param state: :type state: List[str] + :param teams: + :type teams: List[str] :param response_received: :type response_received: bool :param responded_by_user_id: @@ -2129,6 +2336,8 @@ def get_hitl_details( _param = self._get_hitl_details_serialize( dag_id=dag_id, dag_run_id=dag_run_id, + region_id=region_id, + region_index=region_index, limit=limit, offset=offset, order_by=order_by, @@ -2139,6 +2348,7 @@ def get_hitl_details( task_id_prefix_pattern=task_id_prefix_pattern, map_index=map_index, state=state, + teams=teams, response_received=response_received, responded_by_user_id=responded_by_user_id, responded_by_user_name=responded_by_user_name, @@ -2156,6 +2366,7 @@ def get_hitl_details( _response_types_map: Dict[str, Optional[str]] = { '200': "HITLDetailCollection", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '422': "HTTPValidationError", @@ -2176,6 +2387,8 @@ def get_hitl_details_with_http_info( self, dag_id: StrictStr, dag_run_id: StrictStr, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `ti_id, subject, responded_at, created_at, responded_by_user_id, responded_by_user_name, dag_id, run_id, task_display_name, run_after, rendered_map_index, task_instance_operator, task_instance_state`")] = None, @@ -2186,6 +2399,7 @@ def get_hitl_details_with_http_info( task_id_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, map_index: Optional[StrictInt] = None, state: Optional[List[StrictStr]] = None, + teams: Optional[List[StrictStr]] = None, response_received: Optional[StrictBool] = None, responded_by_user_id: Optional[List[StrictStr]] = None, responded_by_user_name: Optional[List[StrictStr]] = None, @@ -2216,6 +2430,10 @@ def get_hitl_details_with_http_info( :type dag_id: str :param dag_run_id: (required) :type dag_run_id: str + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param limit: :type limit: int :param offset: @@ -2236,6 +2454,8 @@ def get_hitl_details_with_http_info( :type map_index: int :param state: :type state: List[str] + :param teams: + :type teams: List[str] :param response_received: :type response_received: bool :param responded_by_user_id: @@ -2279,6 +2499,8 @@ def get_hitl_details_with_http_info( _param = self._get_hitl_details_serialize( dag_id=dag_id, dag_run_id=dag_run_id, + region_id=region_id, + region_index=region_index, limit=limit, offset=offset, order_by=order_by, @@ -2289,6 +2511,7 @@ def get_hitl_details_with_http_info( task_id_prefix_pattern=task_id_prefix_pattern, map_index=map_index, state=state, + teams=teams, response_received=response_received, responded_by_user_id=responded_by_user_id, responded_by_user_name=responded_by_user_name, @@ -2306,6 +2529,7 @@ def get_hitl_details_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "HITLDetailCollection", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '422': "HTTPValidationError", @@ -2326,6 +2550,8 @@ def get_hitl_details_without_preload_content( self, dag_id: StrictStr, dag_run_id: StrictStr, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `ti_id, subject, responded_at, created_at, responded_by_user_id, responded_by_user_name, dag_id, run_id, task_display_name, run_after, rendered_map_index, task_instance_operator, task_instance_state`")] = None, @@ -2336,6 +2562,7 @@ def get_hitl_details_without_preload_content( task_id_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, map_index: Optional[StrictInt] = None, state: Optional[List[StrictStr]] = None, + teams: Optional[List[StrictStr]] = None, response_received: Optional[StrictBool] = None, responded_by_user_id: Optional[List[StrictStr]] = None, responded_by_user_name: Optional[List[StrictStr]] = None, @@ -2366,6 +2593,10 @@ def get_hitl_details_without_preload_content( :type dag_id: str :param dag_run_id: (required) :type dag_run_id: str + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param limit: :type limit: int :param offset: @@ -2386,6 +2617,8 @@ def get_hitl_details_without_preload_content( :type map_index: int :param state: :type state: List[str] + :param teams: + :type teams: List[str] :param response_received: :type response_received: bool :param responded_by_user_id: @@ -2429,6 +2662,8 @@ def get_hitl_details_without_preload_content( _param = self._get_hitl_details_serialize( dag_id=dag_id, dag_run_id=dag_run_id, + region_id=region_id, + region_index=region_index, limit=limit, offset=offset, order_by=order_by, @@ -2439,6 +2674,7 @@ def get_hitl_details_without_preload_content( task_id_prefix_pattern=task_id_prefix_pattern, map_index=map_index, state=state, + teams=teams, response_received=response_received, responded_by_user_id=responded_by_user_id, responded_by_user_name=responded_by_user_name, @@ -2456,6 +2692,7 @@ def get_hitl_details_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "HITLDetailCollection", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '422': "HTTPValidationError", @@ -2471,6 +2708,8 @@ def _get_hitl_details_serialize( self, dag_id, dag_run_id, + region_id, + region_index, limit, offset, order_by, @@ -2481,6 +2720,7 @@ def _get_hitl_details_serialize( task_id_prefix_pattern, map_index, state, + teams, response_received, responded_by_user_id, responded_by_user_name, @@ -2501,13 +2741,14 @@ def _get_hitl_details_serialize( _collection_formats: Dict[str, str] = { 'order_by': 'multi', 'state': 'multi', + 'teams': 'multi', 'responded_by_user_id': 'multi', 'responded_by_user_name': 'multi', } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -2520,6 +2761,14 @@ def _get_hitl_details_serialize( if dag_run_id is not None: _path_params['dag_run_id'] = dag_run_id # process the query parameters + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + if limit is not None: _query_params.append(('limit', limit)) @@ -2560,6 +2809,10 @@ def _get_hitl_details_serialize( _query_params.append(('state', state)) + if teams is not None: + + _query_params.append(('teams', teams)) + if response_received is not None: _query_params.append(('response_received', response_received)) @@ -2638,7 +2891,7 @@ def _get_hitl_details_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -2678,8 +2931,10 @@ def get_log( task_id: StrictStr, try_number: Annotated[int, Field(strict=True, ge=0)], full_content: Optional[StrictBool] = None, - map_index: Optional[StrictInt] = None, token: Optional[StrictStr] = None, + map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, accept: Optional[StrictStr] = None, _request_timeout: Union[ None, @@ -2708,10 +2963,14 @@ def get_log( :type try_number: int :param full_content: :type full_content: bool - :param map_index: - :type map_index: int :param token: :type token: str + :param map_index: + :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param accept: :type accept: str :param _request_timeout: timeout setting for this request. If one @@ -2742,8 +3001,10 @@ def get_log( task_id=task_id, try_number=try_number, full_content=full_content, - map_index=map_index, token=token, + map_index=map_index, + region_id=region_id, + region_index=region_index, accept=accept, _request_auth=_request_auth, _content_type=_content_type, @@ -2753,9 +3014,11 @@ def get_log( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskInstancesLogResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -2777,8 +3040,10 @@ def get_log_with_http_info( task_id: StrictStr, try_number: Annotated[int, Field(strict=True, ge=0)], full_content: Optional[StrictBool] = None, - map_index: Optional[StrictInt] = None, token: Optional[StrictStr] = None, + map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, accept: Optional[StrictStr] = None, _request_timeout: Union[ None, @@ -2807,10 +3072,14 @@ def get_log_with_http_info( :type try_number: int :param full_content: :type full_content: bool - :param map_index: - :type map_index: int :param token: :type token: str + :param map_index: + :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param accept: :type accept: str :param _request_timeout: timeout setting for this request. If one @@ -2841,8 +3110,10 @@ def get_log_with_http_info( task_id=task_id, try_number=try_number, full_content=full_content, - map_index=map_index, token=token, + map_index=map_index, + region_id=region_id, + region_index=region_index, accept=accept, _request_auth=_request_auth, _content_type=_content_type, @@ -2852,9 +3123,11 @@ def get_log_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskInstancesLogResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -2876,8 +3149,10 @@ def get_log_without_preload_content( task_id: StrictStr, try_number: Annotated[int, Field(strict=True, ge=0)], full_content: Optional[StrictBool] = None, - map_index: Optional[StrictInt] = None, token: Optional[StrictStr] = None, + map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, accept: Optional[StrictStr] = None, _request_timeout: Union[ None, @@ -2906,10 +3181,14 @@ def get_log_without_preload_content( :type try_number: int :param full_content: :type full_content: bool - :param map_index: - :type map_index: int :param token: :type token: str + :param map_index: + :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param accept: :type accept: str :param _request_timeout: timeout setting for this request. If one @@ -2940,8 +3219,10 @@ def get_log_without_preload_content( task_id=task_id, try_number=try_number, full_content=full_content, - map_index=map_index, token=token, + map_index=map_index, + region_id=region_id, + region_index=region_index, accept=accept, _request_auth=_request_auth, _content_type=_content_type, @@ -2951,9 +3232,11 @@ def get_log_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskInstancesLogResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -2970,8 +3253,10 @@ def _get_log_serialize( task_id, try_number, full_content, - map_index, token, + map_index, + region_id, + region_index, accept, _request_auth, _content_type, @@ -2986,7 +3271,7 @@ def _get_log_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -3007,23 +3292,31 @@ def _get_log_serialize( _query_params.append(('full_content', full_content)) + if token is not None: + + _query_params.append(('token', token)) + if map_index is not None: _query_params.append(('map_index', map_index)) - if token is not None: + if region_id is not None: - _query_params.append(('token', token)) + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) # process the header parameters if accept is not None: - _header_params['accept'] = accept + self.api_client._set_header(_header_params, 'accept', accept) # process the form parameters # process the body parameter # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json', @@ -3063,6 +3356,8 @@ def get_mapped_task_instance( dag_run_id: StrictStr, task_id: StrictStr, map_index: StrictInt, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3088,6 +3383,10 @@ def get_mapped_task_instance( :type task_id: str :param map_index: (required) :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3115,6 +3414,8 @@ def get_mapped_task_instance( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3123,9 +3424,11 @@ def get_mapped_task_instance( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskInstanceResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -3146,6 +3449,8 @@ def get_mapped_task_instance_with_http_info( dag_run_id: StrictStr, task_id: StrictStr, map_index: StrictInt, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3171,6 +3476,10 @@ def get_mapped_task_instance_with_http_info( :type task_id: str :param map_index: (required) :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3198,6 +3507,8 @@ def get_mapped_task_instance_with_http_info( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3206,9 +3517,11 @@ def get_mapped_task_instance_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskInstanceResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -3229,6 +3542,8 @@ def get_mapped_task_instance_without_preload_content( dag_run_id: StrictStr, task_id: StrictStr, map_index: StrictInt, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3254,6 +3569,10 @@ def get_mapped_task_instance_without_preload_content( :type task_id: str :param map_index: (required) :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3281,6 +3600,8 @@ def get_mapped_task_instance_without_preload_content( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3289,9 +3610,11 @@ def get_mapped_task_instance_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskInstanceResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -3307,6 +3630,8 @@ def _get_mapped_task_instance_serialize( dag_run_id, task_id, map_index, + region_id, + region_index, _request_auth, _content_type, _headers, @@ -3320,7 +3645,7 @@ def _get_mapped_task_instance_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -3337,13 +3662,21 @@ def _get_mapped_task_instance_serialize( if map_index is not None: _path_params['map_index'] = map_index # process the query parameters + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -3382,6 +3715,8 @@ def get_mapped_task_instance_tries( dag_run_id: StrictStr, task_id: StrictStr, map_index: StrictInt, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3397,6 +3732,7 @@ def get_mapped_task_instance_tries( ) -> TaskInstanceHistoryCollectionResponse: """Get Mapped Task Instance Tries + Get list of task instances history for a mapped task instance. Tries recorded before the task had regions are not included once it has them. :param dag_id: (required) :type dag_id: str @@ -3406,6 +3742,10 @@ def get_mapped_task_instance_tries( :type task_id: str :param map_index: (required) :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3433,6 +3773,8 @@ def get_mapped_task_instance_tries( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3441,9 +3783,11 @@ def get_mapped_task_instance_tries( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskInstanceHistoryCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -3464,6 +3808,8 @@ def get_mapped_task_instance_tries_with_http_info( dag_run_id: StrictStr, task_id: StrictStr, map_index: StrictInt, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3479,6 +3825,7 @@ def get_mapped_task_instance_tries_with_http_info( ) -> ApiResponse[TaskInstanceHistoryCollectionResponse]: """Get Mapped Task Instance Tries + Get list of task instances history for a mapped task instance. Tries recorded before the task had regions are not included once it has them. :param dag_id: (required) :type dag_id: str @@ -3488,6 +3835,10 @@ def get_mapped_task_instance_tries_with_http_info( :type task_id: str :param map_index: (required) :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3515,6 +3866,8 @@ def get_mapped_task_instance_tries_with_http_info( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3523,9 +3876,11 @@ def get_mapped_task_instance_tries_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskInstanceHistoryCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -3546,6 +3901,8 @@ def get_mapped_task_instance_tries_without_preload_content( dag_run_id: StrictStr, task_id: StrictStr, map_index: StrictInt, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3561,6 +3918,7 @@ def get_mapped_task_instance_tries_without_preload_content( ) -> RESTResponseType: """Get Mapped Task Instance Tries + Get list of task instances history for a mapped task instance. Tries recorded before the task had regions are not included once it has them. :param dag_id: (required) :type dag_id: str @@ -3570,6 +3928,10 @@ def get_mapped_task_instance_tries_without_preload_content( :type task_id: str :param map_index: (required) :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3597,6 +3959,8 @@ def get_mapped_task_instance_tries_without_preload_content( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3605,9 +3969,11 @@ def get_mapped_task_instance_tries_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskInstanceHistoryCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -3623,6 +3989,8 @@ def _get_mapped_task_instance_tries_serialize( dag_run_id, task_id, map_index, + region_id, + region_index, _request_auth, _content_type, _headers, @@ -3636,7 +4004,7 @@ def _get_mapped_task_instance_tries_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -3653,13 +4021,21 @@ def _get_mapped_task_instance_tries_serialize( if map_index is not None: _path_params['map_index'] = map_index # process the query parameters + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -3699,6 +4075,8 @@ def get_mapped_task_instance_try_details( task_id: StrictStr, task_try_number: StrictInt, map_index: StrictInt, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3725,6 +4103,10 @@ def get_mapped_task_instance_try_details( :type task_try_number: int :param map_index: (required) :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3753,6 +4135,8 @@ def get_mapped_task_instance_try_details( task_id=task_id, task_try_number=task_try_number, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3761,9 +4145,11 @@ def get_mapped_task_instance_try_details( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskInstanceHistoryResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -3785,6 +4171,8 @@ def get_mapped_task_instance_try_details_with_http_info( task_id: StrictStr, task_try_number: StrictInt, map_index: StrictInt, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3811,6 +4199,10 @@ def get_mapped_task_instance_try_details_with_http_info( :type task_try_number: int :param map_index: (required) :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3839,6 +4231,8 @@ def get_mapped_task_instance_try_details_with_http_info( task_id=task_id, task_try_number=task_try_number, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3847,9 +4241,11 @@ def get_mapped_task_instance_try_details_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskInstanceHistoryResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -3871,6 +4267,8 @@ def get_mapped_task_instance_try_details_without_preload_content( task_id: StrictStr, task_try_number: StrictInt, map_index: StrictInt, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3897,6 +4295,10 @@ def get_mapped_task_instance_try_details_without_preload_content( :type task_try_number: int :param map_index: (required) :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3925,6 +4327,8 @@ def get_mapped_task_instance_try_details_without_preload_content( task_id=task_id, task_try_number=task_try_number, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3933,9 +4337,11 @@ def get_mapped_task_instance_try_details_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskInstanceHistoryResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -3952,6 +4358,8 @@ def _get_mapped_task_instance_try_details_serialize( task_id, task_try_number, map_index, + region_id, + region_index, _request_auth, _content_type, _headers, @@ -3965,7 +4373,7 @@ def _get_mapped_task_instance_try_details_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -3984,13 +4392,21 @@ def _get_mapped_task_instance_try_details_serialize( if map_index is not None: _path_params['map_index'] = map_index # process the query parameters + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -4028,6 +4444,8 @@ def get_mapped_task_instances( dag_id: StrictStr, dag_run_id: StrictStr, task_id: StrictStr, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, run_after_gte: Optional[datetime] = None, run_after_gt: Optional[datetime] = None, run_after_lte: Optional[datetime] = None, @@ -4094,6 +4512,10 @@ def get_mapped_task_instances( :type dag_run_id: str :param task_id: (required) :type task_id: str + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param run_after_gte: :type run_after_gte: datetime :param run_after_gt: @@ -4206,6 +4628,8 @@ def get_mapped_task_instances( dag_id=dag_id, dag_run_id=dag_run_id, task_id=task_id, + region_id=region_id, + region_index=region_index, run_after_gte=run_after_gte, run_after_gt=run_after_gt, run_after_lte=run_after_lte, @@ -4257,6 +4681,7 @@ def get_mapped_task_instances( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskInstanceCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", @@ -4279,6 +4704,8 @@ def get_mapped_task_instances_with_http_info( dag_id: StrictStr, dag_run_id: StrictStr, task_id: StrictStr, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, run_after_gte: Optional[datetime] = None, run_after_gt: Optional[datetime] = None, run_after_lte: Optional[datetime] = None, @@ -4345,6 +4772,10 @@ def get_mapped_task_instances_with_http_info( :type dag_run_id: str :param task_id: (required) :type task_id: str + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param run_after_gte: :type run_after_gte: datetime :param run_after_gt: @@ -4457,6 +4888,8 @@ def get_mapped_task_instances_with_http_info( dag_id=dag_id, dag_run_id=dag_run_id, task_id=task_id, + region_id=region_id, + region_index=region_index, run_after_gte=run_after_gte, run_after_gt=run_after_gt, run_after_lte=run_after_lte, @@ -4508,6 +4941,7 @@ def get_mapped_task_instances_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskInstanceCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", @@ -4530,6 +4964,8 @@ def get_mapped_task_instances_without_preload_content( dag_id: StrictStr, dag_run_id: StrictStr, task_id: StrictStr, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, run_after_gte: Optional[datetime] = None, run_after_gt: Optional[datetime] = None, run_after_lte: Optional[datetime] = None, @@ -4596,6 +5032,10 @@ def get_mapped_task_instances_without_preload_content( :type dag_run_id: str :param task_id: (required) :type task_id: str + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param run_after_gte: :type run_after_gte: datetime :param run_after_gt: @@ -4708,6 +5148,8 @@ def get_mapped_task_instances_without_preload_content( dag_id=dag_id, dag_run_id=dag_run_id, task_id=task_id, + region_id=region_id, + region_index=region_index, run_after_gte=run_after_gte, run_after_gt=run_after_gt, run_after_lte=run_after_lte, @@ -4759,6 +5201,7 @@ def get_mapped_task_instances_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskInstanceCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", @@ -4776,6 +5219,8 @@ def _get_mapped_task_instances_serialize( dag_id, dag_run_id, task_id, + region_id, + region_index, run_after_gte, run_after_gt, run_after_lte, @@ -4841,7 +5286,7 @@ def _get_mapped_task_instances_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -4856,6 +5301,14 @@ def _get_mapped_task_instances_serialize( if task_id is not None: _path_params['task_id'] = task_id # process the query parameters + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + if run_after_gte is not None: if isinstance(run_after_gte, datetime): _query_params.append( @@ -5214,7 +5667,7 @@ def _get_mapped_task_instances_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -5252,6 +5705,8 @@ def get_task_instance( dag_id: StrictStr, dag_run_id: StrictStr, task_id: StrictStr, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5275,6 +5730,10 @@ def get_task_instance( :type dag_run_id: str :param task_id: (required) :type task_id: str + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5301,6 +5760,8 @@ def get_task_instance( dag_id=dag_id, dag_run_id=dag_run_id, task_id=task_id, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5309,9 +5770,11 @@ def get_task_instance( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskInstanceResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -5331,6 +5794,8 @@ def get_task_instance_with_http_info( dag_id: StrictStr, dag_run_id: StrictStr, task_id: StrictStr, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5354,6 +5819,10 @@ def get_task_instance_with_http_info( :type dag_run_id: str :param task_id: (required) :type task_id: str + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5380,6 +5849,8 @@ def get_task_instance_with_http_info( dag_id=dag_id, dag_run_id=dag_run_id, task_id=task_id, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5388,9 +5859,11 @@ def get_task_instance_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskInstanceResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -5410,6 +5883,8 @@ def get_task_instance_without_preload_content( dag_id: StrictStr, dag_run_id: StrictStr, task_id: StrictStr, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5433,6 +5908,10 @@ def get_task_instance_without_preload_content( :type dag_run_id: str :param task_id: (required) :type task_id: str + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5459,6 +5938,8 @@ def get_task_instance_without_preload_content( dag_id=dag_id, dag_run_id=dag_run_id, task_id=task_id, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5467,9 +5948,11 @@ def get_task_instance_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskInstanceResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -5484,6 +5967,8 @@ def _get_task_instance_serialize( dag_id, dag_run_id, task_id, + region_id, + region_index, _request_auth, _content_type, _headers, @@ -5497,7 +5982,7 @@ def _get_task_instance_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -5512,13 +5997,21 @@ def _get_task_instance_serialize( if task_id is not None: _path_params['task_id'] = task_id # process the query parameters + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -5557,6 +6050,8 @@ def get_task_instance_dependencies( dag_run_id: StrictStr, task_id: StrictStr, map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5582,6 +6077,10 @@ def get_task_instance_dependencies( :type task_id: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5609,6 +6108,8 @@ def get_task_instance_dependencies( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5617,9 +6118,11 @@ def get_task_instance_dependencies( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskDependencyCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -5640,6 +6143,8 @@ def get_task_instance_dependencies_with_http_info( dag_run_id: StrictStr, task_id: StrictStr, map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5665,6 +6170,10 @@ def get_task_instance_dependencies_with_http_info( :type task_id: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5692,6 +6201,8 @@ def get_task_instance_dependencies_with_http_info( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5700,9 +6211,11 @@ def get_task_instance_dependencies_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskDependencyCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -5723,6 +6236,8 @@ def get_task_instance_dependencies_without_preload_content( dag_run_id: StrictStr, task_id: StrictStr, map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5748,6 +6263,10 @@ def get_task_instance_dependencies_without_preload_content( :type task_id: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5775,6 +6294,8 @@ def get_task_instance_dependencies_without_preload_content( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5783,9 +6304,11 @@ def get_task_instance_dependencies_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskDependencyCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -5801,6 +6324,8 @@ def _get_task_instance_dependencies_serialize( dag_run_id, task_id, map_index, + region_id, + region_index, _request_auth, _content_type, _headers, @@ -5814,7 +6339,7 @@ def _get_task_instance_dependencies_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -5833,13 +6358,21 @@ def _get_task_instance_dependencies_serialize( _query_params.append(('map_index', map_index)) + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -5878,6 +6411,8 @@ def get_task_instance_dependencies_by_map_index( dag_run_id: StrictStr, task_id: StrictStr, map_index: StrictInt, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5903,6 +6438,10 @@ def get_task_instance_dependencies_by_map_index( :type task_id: str :param map_index: (required) :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5930,6 +6469,8 @@ def get_task_instance_dependencies_by_map_index( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5938,9 +6479,11 @@ def get_task_instance_dependencies_by_map_index( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskDependencyCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -5961,6 +6504,8 @@ def get_task_instance_dependencies_by_map_index_with_http_info( dag_run_id: StrictStr, task_id: StrictStr, map_index: StrictInt, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5986,6 +6531,10 @@ def get_task_instance_dependencies_by_map_index_with_http_info( :type task_id: str :param map_index: (required) :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6013,6 +6562,8 @@ def get_task_instance_dependencies_by_map_index_with_http_info( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6021,9 +6572,11 @@ def get_task_instance_dependencies_by_map_index_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskDependencyCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -6044,6 +6597,8 @@ def get_task_instance_dependencies_by_map_index_without_preload_content( dag_run_id: StrictStr, task_id: StrictStr, map_index: StrictInt, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6069,6 +6624,10 @@ def get_task_instance_dependencies_by_map_index_without_preload_content( :type task_id: str :param map_index: (required) :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6096,6 +6655,8 @@ def get_task_instance_dependencies_by_map_index_without_preload_content( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6104,9 +6665,11 @@ def get_task_instance_dependencies_by_map_index_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskDependencyCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -6122,6 +6685,8 @@ def _get_task_instance_dependencies_by_map_index_serialize( dag_run_id, task_id, map_index, + region_id, + region_index, _request_auth, _content_type, _headers, @@ -6135,7 +6700,7 @@ def _get_task_instance_dependencies_by_map_index_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -6152,13 +6717,21 @@ def _get_task_instance_dependencies_by_map_index_serialize( if map_index is not None: _path_params['map_index'] = map_index # process the query parameters + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -6197,6 +6770,8 @@ def get_task_instance_tries( dag_run_id: StrictStr, task_id: StrictStr, map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6212,7 +6787,7 @@ def get_task_instance_tries( ) -> TaskInstanceHistoryCollectionResponse: """Get Task Instance Tries - Get list of task instances history. + Get list of task instances history. Tries recorded before the task had regions are not included once it has them. :param dag_id: (required) :type dag_id: str @@ -6222,6 +6797,10 @@ def get_task_instance_tries( :type task_id: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6249,6 +6828,8 @@ def get_task_instance_tries( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6257,9 +6838,11 @@ def get_task_instance_tries( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskInstanceHistoryCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -6280,6 +6863,8 @@ def get_task_instance_tries_with_http_info( dag_run_id: StrictStr, task_id: StrictStr, map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6295,7 +6880,7 @@ def get_task_instance_tries_with_http_info( ) -> ApiResponse[TaskInstanceHistoryCollectionResponse]: """Get Task Instance Tries - Get list of task instances history. + Get list of task instances history. Tries recorded before the task had regions are not included once it has them. :param dag_id: (required) :type dag_id: str @@ -6305,6 +6890,10 @@ def get_task_instance_tries_with_http_info( :type task_id: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6332,6 +6921,8 @@ def get_task_instance_tries_with_http_info( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6340,9 +6931,11 @@ def get_task_instance_tries_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskInstanceHistoryCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -6363,6 +6956,8 @@ def get_task_instance_tries_without_preload_content( dag_run_id: StrictStr, task_id: StrictStr, map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6378,7 +6973,7 @@ def get_task_instance_tries_without_preload_content( ) -> RESTResponseType: """Get Task Instance Tries - Get list of task instances history. + Get list of task instances history. Tries recorded before the task had regions are not included once it has them. :param dag_id: (required) :type dag_id: str @@ -6388,6 +6983,10 @@ def get_task_instance_tries_without_preload_content( :type task_id: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6415,6 +7014,8 @@ def get_task_instance_tries_without_preload_content( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6423,9 +7024,11 @@ def get_task_instance_tries_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskInstanceHistoryCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -6441,6 +7044,8 @@ def _get_task_instance_tries_serialize( dag_run_id, task_id, map_index, + region_id, + region_index, _request_auth, _content_type, _headers, @@ -6454,7 +7059,7 @@ def _get_task_instance_tries_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -6473,13 +7078,21 @@ def _get_task_instance_tries_serialize( _query_params.append(('map_index', map_index)) + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -6519,6 +7132,8 @@ def get_task_instance_try_details( task_id: StrictStr, task_try_number: StrictInt, map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6546,6 +7161,10 @@ def get_task_instance_try_details( :type task_try_number: int :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6574,6 +7193,8 @@ def get_task_instance_try_details( task_id=task_id, task_try_number=task_try_number, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6582,9 +7203,11 @@ def get_task_instance_try_details( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskInstanceHistoryResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -6606,6 +7229,8 @@ def get_task_instance_try_details_with_http_info( task_id: StrictStr, task_try_number: StrictInt, map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6633,6 +7258,10 @@ def get_task_instance_try_details_with_http_info( :type task_try_number: int :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6661,6 +7290,8 @@ def get_task_instance_try_details_with_http_info( task_id=task_id, task_try_number=task_try_number, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6669,9 +7300,11 @@ def get_task_instance_try_details_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskInstanceHistoryResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -6693,6 +7326,8 @@ def get_task_instance_try_details_without_preload_content( task_id: StrictStr, task_try_number: StrictInt, map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6720,6 +7355,10 @@ def get_task_instance_try_details_without_preload_content( :type task_try_number: int :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6748,6 +7387,8 @@ def get_task_instance_try_details_without_preload_content( task_id=task_id, task_try_number=task_try_number, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6756,9 +7397,11 @@ def get_task_instance_try_details_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskInstanceHistoryResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -6775,6 +7418,8 @@ def _get_task_instance_try_details_serialize( task_id, task_try_number, map_index, + region_id, + region_index, _request_auth, _content_type, _headers, @@ -6788,7 +7433,7 @@ def _get_task_instance_try_details_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -6809,13 +7454,21 @@ def _get_task_instance_try_details_serialize( _query_params.append(('map_index', map_index)) + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -6852,6 +7505,10 @@ def get_task_instances( self, dag_id: StrictStr, dag_run_id: StrictStr, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + loop_id: Annotated[Optional[StrictStr], Field(description="Task group id of a loop; matches every instance it produced.")] = None, + iteration: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Narrow ``loop_id`` to a single pass of that loop. Iterations count from one.")] = None, cursor: Annotated[Optional[StrictStr], Field(description="Cursor for keyset-based pagination. Pass an empty string for the first page, then use ``next_cursor`` from the response. When ``cursor`` is provided, ``offset`` is ignored.")] = None, task_id: Optional[StrictStr] = None, run_after_gte: Optional[datetime] = None, @@ -6894,6 +7551,7 @@ def get_task_instances( queue_name_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, executor: Optional[List[StrictStr]] = None, version_number: Optional[List[StrictInt]] = None, + teams: Optional[List[StrictStr]] = None, try_number: Optional[List[StrictInt]] = None, operator: Optional[List[StrictStr]] = None, operator_name_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `operator_name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, @@ -6925,6 +7583,14 @@ def get_task_instances( :type dag_id: str :param dag_run_id: (required) :type dag_run_id: str + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int + :param loop_id: Task group id of a loop; matches every instance it produced. + :type loop_id: str + :param iteration: Narrow ``loop_id`` to a single pass of that loop. Iterations count from one. + :type iteration: int :param cursor: Cursor for keyset-based pagination. Pass an empty string for the first page, then use ``next_cursor`` from the response. When ``cursor`` is provided, ``offset`` is ignored. :type cursor: str :param task_id: @@ -7009,6 +7675,8 @@ def get_task_instances( :type executor: List[str] :param version_number: :type version_number: List[int] + :param teams: + :type teams: List[str] :param try_number: :type try_number: List[int] :param operator: @@ -7054,6 +7722,10 @@ def get_task_instances( _param = self._get_task_instances_serialize( dag_id=dag_id, dag_run_id=dag_run_id, + region_id=region_id, + region_index=region_index, + loop_id=loop_id, + iteration=iteration, cursor=cursor, task_id=task_id, run_after_gte=run_after_gte, @@ -7096,6 +7768,7 @@ def get_task_instances( queue_name_prefix_pattern=queue_name_prefix_pattern, executor=executor, version_number=version_number, + teams=teams, try_number=try_number, operator=operator, operator_name_pattern=operator_name_pattern, @@ -7136,6 +7809,10 @@ def get_task_instances_with_http_info( self, dag_id: StrictStr, dag_run_id: StrictStr, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + loop_id: Annotated[Optional[StrictStr], Field(description="Task group id of a loop; matches every instance it produced.")] = None, + iteration: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Narrow ``loop_id`` to a single pass of that loop. Iterations count from one.")] = None, cursor: Annotated[Optional[StrictStr], Field(description="Cursor for keyset-based pagination. Pass an empty string for the first page, then use ``next_cursor`` from the response. When ``cursor`` is provided, ``offset`` is ignored.")] = None, task_id: Optional[StrictStr] = None, run_after_gte: Optional[datetime] = None, @@ -7178,6 +7855,7 @@ def get_task_instances_with_http_info( queue_name_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, executor: Optional[List[StrictStr]] = None, version_number: Optional[List[StrictInt]] = None, + teams: Optional[List[StrictStr]] = None, try_number: Optional[List[StrictInt]] = None, operator: Optional[List[StrictStr]] = None, operator_name_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `operator_name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, @@ -7209,6 +7887,14 @@ def get_task_instances_with_http_info( :type dag_id: str :param dag_run_id: (required) :type dag_run_id: str + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int + :param loop_id: Task group id of a loop; matches every instance it produced. + :type loop_id: str + :param iteration: Narrow ``loop_id`` to a single pass of that loop. Iterations count from one. + :type iteration: int :param cursor: Cursor for keyset-based pagination. Pass an empty string for the first page, then use ``next_cursor`` from the response. When ``cursor`` is provided, ``offset`` is ignored. :type cursor: str :param task_id: @@ -7293,6 +7979,8 @@ def get_task_instances_with_http_info( :type executor: List[str] :param version_number: :type version_number: List[int] + :param teams: + :type teams: List[str] :param try_number: :type try_number: List[int] :param operator: @@ -7338,6 +8026,10 @@ def get_task_instances_with_http_info( _param = self._get_task_instances_serialize( dag_id=dag_id, dag_run_id=dag_run_id, + region_id=region_id, + region_index=region_index, + loop_id=loop_id, + iteration=iteration, cursor=cursor, task_id=task_id, run_after_gte=run_after_gte, @@ -7380,6 +8072,7 @@ def get_task_instances_with_http_info( queue_name_prefix_pattern=queue_name_prefix_pattern, executor=executor, version_number=version_number, + teams=teams, try_number=try_number, operator=operator, operator_name_pattern=operator_name_pattern, @@ -7420,6 +8113,10 @@ def get_task_instances_without_preload_content( self, dag_id: StrictStr, dag_run_id: StrictStr, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + loop_id: Annotated[Optional[StrictStr], Field(description="Task group id of a loop; matches every instance it produced.")] = None, + iteration: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Narrow ``loop_id`` to a single pass of that loop. Iterations count from one.")] = None, cursor: Annotated[Optional[StrictStr], Field(description="Cursor for keyset-based pagination. Pass an empty string for the first page, then use ``next_cursor`` from the response. When ``cursor`` is provided, ``offset`` is ignored.")] = None, task_id: Optional[StrictStr] = None, run_after_gte: Optional[datetime] = None, @@ -7462,6 +8159,7 @@ def get_task_instances_without_preload_content( queue_name_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, executor: Optional[List[StrictStr]] = None, version_number: Optional[List[StrictInt]] = None, + teams: Optional[List[StrictStr]] = None, try_number: Optional[List[StrictInt]] = None, operator: Optional[List[StrictStr]] = None, operator_name_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `operator_name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, @@ -7493,6 +8191,14 @@ def get_task_instances_without_preload_content( :type dag_id: str :param dag_run_id: (required) :type dag_run_id: str + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int + :param loop_id: Task group id of a loop; matches every instance it produced. + :type loop_id: str + :param iteration: Narrow ``loop_id`` to a single pass of that loop. Iterations count from one. + :type iteration: int :param cursor: Cursor for keyset-based pagination. Pass an empty string for the first page, then use ``next_cursor`` from the response. When ``cursor`` is provided, ``offset`` is ignored. :type cursor: str :param task_id: @@ -7577,6 +8283,8 @@ def get_task_instances_without_preload_content( :type executor: List[str] :param version_number: :type version_number: List[int] + :param teams: + :type teams: List[str] :param try_number: :type try_number: List[int] :param operator: @@ -7622,6 +8330,10 @@ def get_task_instances_without_preload_content( _param = self._get_task_instances_serialize( dag_id=dag_id, dag_run_id=dag_run_id, + region_id=region_id, + region_index=region_index, + loop_id=loop_id, + iteration=iteration, cursor=cursor, task_id=task_id, run_after_gte=run_after_gte, @@ -7664,6 +8376,7 @@ def get_task_instances_without_preload_content( queue_name_prefix_pattern=queue_name_prefix_pattern, executor=executor, version_number=version_number, + teams=teams, try_number=try_number, operator=operator, operator_name_pattern=operator_name_pattern, @@ -7699,6 +8412,10 @@ def _get_task_instances_serialize( self, dag_id, dag_run_id, + region_id, + region_index, + loop_id, + iteration, cursor, task_id, run_after_gte, @@ -7741,6 +8458,7 @@ def _get_task_instances_serialize( queue_name_prefix_pattern, executor, version_number, + teams, try_number, operator, operator_name_pattern, @@ -7765,6 +8483,7 @@ def _get_task_instances_serialize( 'queue': 'multi', 'executor': 'multi', 'version_number': 'multi', + 'teams': 'multi', 'try_number': 'multi', 'operator': 'multi', 'map_index': 'multi', @@ -7773,7 +8492,7 @@ def _get_task_instances_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -7786,6 +8505,22 @@ def _get_task_instances_serialize( if dag_run_id is not None: _path_params['dag_run_id'] = dag_run_id # process the query parameters + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + + if loop_id is not None: + + _query_params.append(('loop_id', loop_id)) + + if iteration is not None: + + _query_params.append(('iteration', iteration)) + if cursor is not None: _query_params.append(('cursor', cursor)) @@ -8134,6 +8869,10 @@ def _get_task_instances_serialize( _query_params.append(('version_number', version_number)) + if teams is not None: + + _query_params.append(('teams', teams)) + if try_number is not None: _query_params.append(('try_number', try_number)) @@ -8180,7 +8919,7 @@ def _get_task_instances_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -8463,7 +9202,7 @@ def _get_task_instances_batch_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -8484,7 +9223,7 @@ def _get_task_instances_batch_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -8493,7 +9232,7 @@ def _get_task_instances_batch_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -8503,7 +9242,7 @@ def _get_task_instances_batch_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -8537,6 +9276,8 @@ def patch_task_group_instances( group_id: StrictStr, patch_task_instance_body: PatchTaskInstanceBody, update_mask: Optional[List[StrictStr]] = None, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8564,6 +9305,10 @@ def patch_task_group_instances( :type patch_task_instance_body: PatchTaskInstanceBody :param update_mask: :type update_mask: List[str] + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8592,6 +9337,8 @@ def patch_task_group_instances( group_id=group_id, patch_task_instance_body=patch_task_instance_body, update_mask=update_mask, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8626,6 +9373,8 @@ def patch_task_group_instances_with_http_info( group_id: StrictStr, patch_task_instance_body: PatchTaskInstanceBody, update_mask: Optional[List[StrictStr]] = None, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8653,6 +9402,10 @@ def patch_task_group_instances_with_http_info( :type patch_task_instance_body: PatchTaskInstanceBody :param update_mask: :type update_mask: List[str] + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8681,6 +9434,8 @@ def patch_task_group_instances_with_http_info( group_id=group_id, patch_task_instance_body=patch_task_instance_body, update_mask=update_mask, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8715,6 +9470,8 @@ def patch_task_group_instances_without_preload_content( group_id: StrictStr, patch_task_instance_body: PatchTaskInstanceBody, update_mask: Optional[List[StrictStr]] = None, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8742,6 +9499,10 @@ def patch_task_group_instances_without_preload_content( :type patch_task_instance_body: PatchTaskInstanceBody :param update_mask: :type update_mask: List[str] + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8770,6 +9531,8 @@ def patch_task_group_instances_without_preload_content( group_id=group_id, patch_task_instance_body=patch_task_instance_body, update_mask=update_mask, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8799,6 +9562,8 @@ def _patch_task_group_instances_serialize( group_id, patch_task_instance_body, update_mask, + region_id, + region_index, _request_auth, _content_type, _headers, @@ -8813,7 +9578,7 @@ def _patch_task_group_instances_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -8832,6 +9597,14 @@ def _patch_task_group_instances_serialize( _query_params.append(('update_mask', update_mask)) + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + # process the header parameters # process the form parameters # process the body parameter @@ -8840,7 +9613,7 @@ def _patch_task_group_instances_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -8849,7 +9622,7 @@ def _patch_task_group_instances_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -8859,7 +9632,7 @@ def _patch_task_group_instances_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -8892,6 +9665,8 @@ def patch_task_group_instances_dry_run( dag_run_id: StrictStr, group_id: StrictStr, patch_task_instance_body: PatchTaskInstanceBody, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8917,6 +9692,10 @@ def patch_task_group_instances_dry_run( :type group_id: str :param patch_task_instance_body: (required) :type patch_task_instance_body: PatchTaskInstanceBody + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8944,6 +9723,8 @@ def patch_task_group_instances_dry_run( dag_run_id=dag_run_id, group_id=group_id, patch_task_instance_body=patch_task_instance_body, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8956,6 +9737,7 @@ def patch_task_group_instances_dry_run( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -8976,6 +9758,8 @@ def patch_task_group_instances_dry_run_with_http_info( dag_run_id: StrictStr, group_id: StrictStr, patch_task_instance_body: PatchTaskInstanceBody, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -9001,6 +9785,10 @@ def patch_task_group_instances_dry_run_with_http_info( :type group_id: str :param patch_task_instance_body: (required) :type patch_task_instance_body: PatchTaskInstanceBody + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -9028,6 +9816,8 @@ def patch_task_group_instances_dry_run_with_http_info( dag_run_id=dag_run_id, group_id=group_id, patch_task_instance_body=patch_task_instance_body, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -9040,6 +9830,7 @@ def patch_task_group_instances_dry_run_with_http_info( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -9060,6 +9851,8 @@ def patch_task_group_instances_dry_run_without_preload_content( dag_run_id: StrictStr, group_id: StrictStr, patch_task_instance_body: PatchTaskInstanceBody, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -9085,6 +9878,10 @@ def patch_task_group_instances_dry_run_without_preload_content( :type group_id: str :param patch_task_instance_body: (required) :type patch_task_instance_body: PatchTaskInstanceBody + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -9112,6 +9909,8 @@ def patch_task_group_instances_dry_run_without_preload_content( dag_run_id=dag_run_id, group_id=group_id, patch_task_instance_body=patch_task_instance_body, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -9124,6 +9923,7 @@ def patch_task_group_instances_dry_run_without_preload_content( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -9139,6 +9939,8 @@ def _patch_task_group_instances_dry_run_serialize( dag_run_id, group_id, patch_task_instance_body, + region_id, + region_index, _request_auth, _content_type, _headers, @@ -9152,7 +9954,7 @@ def _patch_task_group_instances_dry_run_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -9167,6 +9969,14 @@ def _patch_task_group_instances_dry_run_serialize( if group_id is not None: _path_params['group_id'] = group_id # process the query parameters + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + # process the header parameters # process the form parameters # process the body parameter @@ -9175,7 +9985,7 @@ def _patch_task_group_instances_dry_run_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -9184,7 +9994,7 @@ def _patch_task_group_instances_dry_run_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -9194,7 +10004,7 @@ def _patch_task_group_instances_dry_run_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -9229,6 +10039,8 @@ def patch_task_instance( patch_task_instance_body: PatchTaskInstanceBody, map_index: Optional[StrictInt] = None, update_mask: Optional[List[StrictStr]] = None, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -9258,6 +10070,10 @@ def patch_task_instance( :type map_index: int :param update_mask: :type update_mask: List[str] + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -9287,6 +10103,8 @@ def patch_task_instance( patch_task_instance_body=patch_task_instance_body, map_index=map_index, update_mask=update_mask, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -9322,6 +10140,8 @@ def patch_task_instance_with_http_info( patch_task_instance_body: PatchTaskInstanceBody, map_index: Optional[StrictInt] = None, update_mask: Optional[List[StrictStr]] = None, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -9351,6 +10171,10 @@ def patch_task_instance_with_http_info( :type map_index: int :param update_mask: :type update_mask: List[str] + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -9380,6 +10204,8 @@ def patch_task_instance_with_http_info( patch_task_instance_body=patch_task_instance_body, map_index=map_index, update_mask=update_mask, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -9415,6 +10241,8 @@ def patch_task_instance_without_preload_content( patch_task_instance_body: PatchTaskInstanceBody, map_index: Optional[StrictInt] = None, update_mask: Optional[List[StrictStr]] = None, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -9444,6 +10272,10 @@ def patch_task_instance_without_preload_content( :type map_index: int :param update_mask: :type update_mask: List[str] + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -9473,6 +10305,8 @@ def patch_task_instance_without_preload_content( patch_task_instance_body=patch_task_instance_body, map_index=map_index, update_mask=update_mask, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -9503,6 +10337,8 @@ def _patch_task_instance_serialize( patch_task_instance_body, map_index, update_mask, + region_id, + region_index, _request_auth, _content_type, _headers, @@ -9517,7 +10353,7 @@ def _patch_task_instance_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -9540,6 +10376,14 @@ def _patch_task_instance_serialize( _query_params.append(('update_mask', update_mask)) + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + # process the header parameters # process the form parameters # process the body parameter @@ -9548,7 +10392,7 @@ def _patch_task_instance_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -9557,7 +10401,7 @@ def _patch_task_instance_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -9567,7 +10411,7 @@ def _patch_task_instance_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -9602,6 +10446,8 @@ def patch_task_instance_by_map_index( map_index: StrictInt, patch_task_instance_body: PatchTaskInstanceBody, update_mask: Optional[List[StrictStr]] = None, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -9631,6 +10477,10 @@ def patch_task_instance_by_map_index( :type patch_task_instance_body: PatchTaskInstanceBody :param update_mask: :type update_mask: List[str] + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -9660,6 +10510,8 @@ def patch_task_instance_by_map_index( map_index=map_index, patch_task_instance_body=patch_task_instance_body, update_mask=update_mask, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -9695,6 +10547,8 @@ def patch_task_instance_by_map_index_with_http_info( map_index: StrictInt, patch_task_instance_body: PatchTaskInstanceBody, update_mask: Optional[List[StrictStr]] = None, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -9724,6 +10578,10 @@ def patch_task_instance_by_map_index_with_http_info( :type patch_task_instance_body: PatchTaskInstanceBody :param update_mask: :type update_mask: List[str] + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -9753,6 +10611,8 @@ def patch_task_instance_by_map_index_with_http_info( map_index=map_index, patch_task_instance_body=patch_task_instance_body, update_mask=update_mask, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -9788,6 +10648,8 @@ def patch_task_instance_by_map_index_without_preload_content( map_index: StrictInt, patch_task_instance_body: PatchTaskInstanceBody, update_mask: Optional[List[StrictStr]] = None, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -9817,6 +10679,10 @@ def patch_task_instance_by_map_index_without_preload_content( :type patch_task_instance_body: PatchTaskInstanceBody :param update_mask: :type update_mask: List[str] + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -9846,6 +10712,8 @@ def patch_task_instance_by_map_index_without_preload_content( map_index=map_index, patch_task_instance_body=patch_task_instance_body, update_mask=update_mask, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -9876,6 +10744,8 @@ def _patch_task_instance_by_map_index_serialize( map_index, patch_task_instance_body, update_mask, + region_id, + region_index, _request_auth, _content_type, _headers, @@ -9890,7 +10760,7 @@ def _patch_task_instance_by_map_index_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -9911,6 +10781,14 @@ def _patch_task_instance_by_map_index_serialize( _query_params.append(('update_mask', update_mask)) + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + # process the header parameters # process the form parameters # process the body parameter @@ -9919,7 +10797,7 @@ def _patch_task_instance_by_map_index_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -9928,7 +10806,7 @@ def _patch_task_instance_by_map_index_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -9938,7 +10816,7 @@ def _patch_task_instance_by_map_index_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -9973,6 +10851,8 @@ def patch_task_instance_dry_run( patch_task_instance_body: PatchTaskInstanceBody, map_index: Optional[StrictInt] = None, update_mask: Optional[List[StrictStr]] = None, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -10002,6 +10882,10 @@ def patch_task_instance_dry_run( :type map_index: int :param update_mask: :type update_mask: List[str] + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10031,6 +10915,8 @@ def patch_task_instance_dry_run( patch_task_instance_body=patch_task_instance_body, map_index=map_index, update_mask=update_mask, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10043,6 +10929,7 @@ def patch_task_instance_dry_run( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -10065,6 +10952,8 @@ def patch_task_instance_dry_run_with_http_info( patch_task_instance_body: PatchTaskInstanceBody, map_index: Optional[StrictInt] = None, update_mask: Optional[List[StrictStr]] = None, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -10094,6 +10983,10 @@ def patch_task_instance_dry_run_with_http_info( :type map_index: int :param update_mask: :type update_mask: List[str] + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10123,6 +11016,8 @@ def patch_task_instance_dry_run_with_http_info( patch_task_instance_body=patch_task_instance_body, map_index=map_index, update_mask=update_mask, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10135,6 +11030,7 @@ def patch_task_instance_dry_run_with_http_info( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -10157,6 +11053,8 @@ def patch_task_instance_dry_run_without_preload_content( patch_task_instance_body: PatchTaskInstanceBody, map_index: Optional[StrictInt] = None, update_mask: Optional[List[StrictStr]] = None, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -10186,6 +11084,10 @@ def patch_task_instance_dry_run_without_preload_content( :type map_index: int :param update_mask: :type update_mask: List[str] + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10215,6 +11117,8 @@ def patch_task_instance_dry_run_without_preload_content( patch_task_instance_body=patch_task_instance_body, map_index=map_index, update_mask=update_mask, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10227,6 +11131,7 @@ def patch_task_instance_dry_run_without_preload_content( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -10244,6 +11149,8 @@ def _patch_task_instance_dry_run_serialize( patch_task_instance_body, map_index, update_mask, + region_id, + region_index, _request_auth, _content_type, _headers, @@ -10258,7 +11165,7 @@ def _patch_task_instance_dry_run_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -10281,6 +11188,14 @@ def _patch_task_instance_dry_run_serialize( _query_params.append(('update_mask', update_mask)) + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + # process the header parameters # process the form parameters # process the body parameter @@ -10289,7 +11204,7 @@ def _patch_task_instance_dry_run_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -10298,7 +11213,7 @@ def _patch_task_instance_dry_run_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -10308,7 +11223,7 @@ def _patch_task_instance_dry_run_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -10343,6 +11258,8 @@ def patch_task_instance_dry_run_by_map_index( map_index: StrictInt, patch_task_instance_body: PatchTaskInstanceBody, update_mask: Optional[List[StrictStr]] = None, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -10372,6 +11289,10 @@ def patch_task_instance_dry_run_by_map_index( :type patch_task_instance_body: PatchTaskInstanceBody :param update_mask: :type update_mask: List[str] + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10401,6 +11322,8 @@ def patch_task_instance_dry_run_by_map_index( map_index=map_index, patch_task_instance_body=patch_task_instance_body, update_mask=update_mask, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10413,6 +11336,7 @@ def patch_task_instance_dry_run_by_map_index( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -10435,6 +11359,8 @@ def patch_task_instance_dry_run_by_map_index_with_http_info( map_index: StrictInt, patch_task_instance_body: PatchTaskInstanceBody, update_mask: Optional[List[StrictStr]] = None, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -10464,6 +11390,10 @@ def patch_task_instance_dry_run_by_map_index_with_http_info( :type patch_task_instance_body: PatchTaskInstanceBody :param update_mask: :type update_mask: List[str] + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10493,6 +11423,8 @@ def patch_task_instance_dry_run_by_map_index_with_http_info( map_index=map_index, patch_task_instance_body=patch_task_instance_body, update_mask=update_mask, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10505,6 +11437,7 @@ def patch_task_instance_dry_run_by_map_index_with_http_info( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -10527,6 +11460,8 @@ def patch_task_instance_dry_run_by_map_index_without_preload_content( map_index: StrictInt, patch_task_instance_body: PatchTaskInstanceBody, update_mask: Optional[List[StrictStr]] = None, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -10556,6 +11491,10 @@ def patch_task_instance_dry_run_by_map_index_without_preload_content( :type patch_task_instance_body: PatchTaskInstanceBody :param update_mask: :type update_mask: List[str] + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10585,6 +11524,8 @@ def patch_task_instance_dry_run_by_map_index_without_preload_content( map_index=map_index, patch_task_instance_body=patch_task_instance_body, update_mask=update_mask, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10597,6 +11538,7 @@ def patch_task_instance_dry_run_by_map_index_without_preload_content( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -10614,6 +11556,8 @@ def _patch_task_instance_dry_run_by_map_index_serialize( map_index, patch_task_instance_body, update_mask, + region_id, + region_index, _request_auth, _content_type, _headers, @@ -10628,7 +11572,7 @@ def _patch_task_instance_dry_run_by_map_index_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -10649,6 +11593,14 @@ def _patch_task_instance_dry_run_by_map_index_serialize( _query_params.append(('update_mask', update_mask)) + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + # process the header parameters # process the form parameters # process the body parameter @@ -10657,7 +11609,7 @@ def _patch_task_instance_dry_run_by_map_index_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -10666,7 +11618,7 @@ def _patch_task_instance_dry_run_by_map_index_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -10676,7 +11628,7 @@ def _patch_task_instance_dry_run_by_map_index_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -10946,7 +11898,7 @@ def _post_clear_task_instances_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -10965,7 +11917,7 @@ def _post_clear_task_instances_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -10974,7 +11926,7 @@ def _post_clear_task_instances_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -10984,7 +11936,7 @@ def _post_clear_task_instances_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -11018,6 +11970,8 @@ def update_hitl_detail( task_id: StrictStr, map_index: StrictInt, update_hitl_detail_payload: UpdateHITLDetailPayload, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11045,6 +11999,10 @@ def update_hitl_detail( :type map_index: int :param update_hitl_detail_payload: (required) :type update_hitl_detail_payload: UpdateHITLDetailPayload + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -11073,6 +12031,8 @@ def update_hitl_detail( task_id=task_id, map_index=map_index, update_hitl_detail_payload=update_hitl_detail_payload, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11107,6 +12067,8 @@ def update_hitl_detail_with_http_info( task_id: StrictStr, map_index: StrictInt, update_hitl_detail_payload: UpdateHITLDetailPayload, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11134,6 +12096,10 @@ def update_hitl_detail_with_http_info( :type map_index: int :param update_hitl_detail_payload: (required) :type update_hitl_detail_payload: UpdateHITLDetailPayload + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -11162,6 +12128,8 @@ def update_hitl_detail_with_http_info( task_id=task_id, map_index=map_index, update_hitl_detail_payload=update_hitl_detail_payload, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11196,6 +12164,8 @@ def update_hitl_detail_without_preload_content( task_id: StrictStr, map_index: StrictInt, update_hitl_detail_payload: UpdateHITLDetailPayload, + region_id: Optional[UUID] = None, + region_index: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11223,6 +12193,10 @@ def update_hitl_detail_without_preload_content( :type map_index: int :param update_hitl_detail_payload: (required) :type update_hitl_detail_payload: UpdateHITLDetailPayload + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -11251,6 +12225,8 @@ def update_hitl_detail_without_preload_content( task_id=task_id, map_index=map_index, update_hitl_detail_payload=update_hitl_detail_payload, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11280,6 +12256,8 @@ def _update_hitl_detail_serialize( task_id, map_index, update_hitl_detail_payload, + region_id, + region_index, _request_auth, _content_type, _headers, @@ -11293,7 +12271,7 @@ def _update_hitl_detail_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -11310,6 +12288,14 @@ def _update_hitl_detail_serialize( if map_index is not None: _path_params['map_index'] = map_index # process the query parameters + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + # process the header parameters # process the form parameters # process the body parameter @@ -11318,7 +12304,7 @@ def _update_hitl_detail_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -11327,7 +12313,7 @@ def _update_hitl_detail_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -11337,7 +12323,7 @@ def _update_hitl_detail_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ diff --git a/airflow_client/client/api/task_state_store_api.py b/airflow_client/client/api/task_state_store_api.py index 263de7d3..c040c4a1 100644 --- a/airflow_client/client/api/task_state_store_api.py +++ b/airflow_client/client/api/task_state_store_api.py @@ -15,9 +15,10 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictStr +from pydantic import Field, StrictBool, StrictInt, StrictStr from typing import Any, Optional from typing_extensions import Annotated +from uuid import UUID from airflow_client.client.models.task_state_store_body import TaskStateStoreBody from airflow_client.client.models.task_state_store_collection_response import TaskStateStoreCollectionResponse from airflow_client.client.models.task_state_store_patch_body import TaskStateStorePatchBody @@ -47,8 +48,10 @@ def clear_task_state_store( dag_id: StrictStr, dag_run_id: StrictStr, task_id: StrictStr, - all_map_indices: Optional[StrictBool] = None, map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + all_map_indices: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -72,10 +75,14 @@ def clear_task_state_store( :type dag_run_id: str :param task_id: (required) :type task_id: str - :param all_map_indices: - :type all_map_indices: bool :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int + :param all_map_indices: + :type all_map_indices: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -102,8 +109,10 @@ def clear_task_state_store( dag_id=dag_id, dag_run_id=dag_run_id, task_id=task_id, - all_map_indices=all_map_indices, map_index=map_index, + region_id=region_id, + region_index=region_index, + all_map_indices=all_map_indices, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -112,9 +121,11 @@ def clear_task_state_store( _response_types_map: Dict[str, Optional[str]] = { '204': None, + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -134,8 +145,10 @@ def clear_task_state_store_with_http_info( dag_id: StrictStr, dag_run_id: StrictStr, task_id: StrictStr, - all_map_indices: Optional[StrictBool] = None, map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + all_map_indices: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -159,10 +172,14 @@ def clear_task_state_store_with_http_info( :type dag_run_id: str :param task_id: (required) :type task_id: str - :param all_map_indices: - :type all_map_indices: bool :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int + :param all_map_indices: + :type all_map_indices: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -189,8 +206,10 @@ def clear_task_state_store_with_http_info( dag_id=dag_id, dag_run_id=dag_run_id, task_id=task_id, - all_map_indices=all_map_indices, map_index=map_index, + region_id=region_id, + region_index=region_index, + all_map_indices=all_map_indices, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -199,9 +218,11 @@ def clear_task_state_store_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '204': None, + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -221,8 +242,10 @@ def clear_task_state_store_without_preload_content( dag_id: StrictStr, dag_run_id: StrictStr, task_id: StrictStr, - all_map_indices: Optional[StrictBool] = None, map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + all_map_indices: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -246,10 +269,14 @@ def clear_task_state_store_without_preload_content( :type dag_run_id: str :param task_id: (required) :type task_id: str - :param all_map_indices: - :type all_map_indices: bool :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int + :param all_map_indices: + :type all_map_indices: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -276,8 +303,10 @@ def clear_task_state_store_without_preload_content( dag_id=dag_id, dag_run_id=dag_run_id, task_id=task_id, - all_map_indices=all_map_indices, map_index=map_index, + region_id=region_id, + region_index=region_index, + all_map_indices=all_map_indices, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -286,9 +315,11 @@ def clear_task_state_store_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '204': None, + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -303,8 +334,10 @@ def _clear_task_state_store_serialize( dag_id, dag_run_id, task_id, - all_map_indices, map_index, + region_id, + region_index, + all_map_indices, _request_auth, _content_type, _headers, @@ -318,7 +351,7 @@ def _clear_task_state_store_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -333,21 +366,29 @@ def _clear_task_state_store_serialize( if task_id is not None: _path_params['task_id'] = task_id # process the query parameters - if all_map_indices is not None: - - _query_params.append(('all_map_indices', all_map_indices)) - if map_index is not None: _query_params.append(('map_index', map_index)) + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + + if all_map_indices is not None: + + _query_params.append(('all_map_indices', all_map_indices)) + # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -386,7 +427,9 @@ def delete_task_state_store( dag_id: StrictStr, dag_run_id: StrictStr, task_id: StrictStr, - map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -414,6 +457,10 @@ def delete_task_state_store( :type task_id: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -442,6 +489,8 @@ def delete_task_state_store( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -450,9 +499,11 @@ def delete_task_state_store( _response_types_map: Dict[str, Optional[str]] = { '204': None, + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -473,7 +524,9 @@ def delete_task_state_store_with_http_info( dag_id: StrictStr, dag_run_id: StrictStr, task_id: StrictStr, - map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -501,6 +554,10 @@ def delete_task_state_store_with_http_info( :type task_id: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -529,6 +586,8 @@ def delete_task_state_store_with_http_info( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -537,9 +596,11 @@ def delete_task_state_store_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '204': None, + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -560,7 +621,9 @@ def delete_task_state_store_without_preload_content( dag_id: StrictStr, dag_run_id: StrictStr, task_id: StrictStr, - map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -588,6 +651,10 @@ def delete_task_state_store_without_preload_content( :type task_id: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -616,6 +683,8 @@ def delete_task_state_store_without_preload_content( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -624,9 +693,11 @@ def delete_task_state_store_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '204': None, + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -643,6 +714,8 @@ def _delete_task_state_store_serialize( dag_run_id, task_id, map_index, + region_id, + region_index, _request_auth, _content_type, _headers, @@ -656,7 +729,7 @@ def _delete_task_state_store_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -677,13 +750,21 @@ def _delete_task_state_store_serialize( _query_params.append(('map_index', map_index)) + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -722,7 +803,9 @@ def get_task_state_store( dag_id: StrictStr, dag_run_id: StrictStr, task_id: StrictStr, - map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -750,6 +833,10 @@ def get_task_state_store( :type task_id: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -778,6 +865,8 @@ def get_task_state_store( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -786,9 +875,11 @@ def get_task_state_store( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskStateStoreResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -809,7 +900,9 @@ def get_task_state_store_with_http_info( dag_id: StrictStr, dag_run_id: StrictStr, task_id: StrictStr, - map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -837,6 +930,10 @@ def get_task_state_store_with_http_info( :type task_id: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -865,6 +962,8 @@ def get_task_state_store_with_http_info( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -873,9 +972,11 @@ def get_task_state_store_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskStateStoreResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -896,7 +997,9 @@ def get_task_state_store_without_preload_content( dag_id: StrictStr, dag_run_id: StrictStr, task_id: StrictStr, - map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -924,6 +1027,10 @@ def get_task_state_store_without_preload_content( :type task_id: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -952,6 +1059,8 @@ def get_task_state_store_without_preload_content( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -960,9 +1069,11 @@ def get_task_state_store_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskStateStoreResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -979,6 +1090,8 @@ def _get_task_state_store_serialize( dag_run_id, task_id, map_index, + region_id, + region_index, _request_auth, _content_type, _headers, @@ -992,7 +1105,7 @@ def _get_task_state_store_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1013,13 +1126,21 @@ def _get_task_state_store_serialize( _query_params.append(('map_index', map_index)) + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1057,7 +1178,9 @@ def list_task_state_store( dag_id: StrictStr, dag_run_id: StrictStr, task_id: StrictStr, - map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, _request_timeout: Union[ @@ -1085,6 +1208,10 @@ def list_task_state_store( :type task_id: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param limit: :type limit: int :param offset: @@ -1116,6 +1243,8 @@ def list_task_state_store( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, limit=limit, offset=offset, _request_auth=_request_auth, @@ -1126,8 +1255,11 @@ def list_task_state_store( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskStateStoreCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", + '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1147,7 +1279,9 @@ def list_task_state_store_with_http_info( dag_id: StrictStr, dag_run_id: StrictStr, task_id: StrictStr, - map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, _request_timeout: Union[ @@ -1175,6 +1309,10 @@ def list_task_state_store_with_http_info( :type task_id: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param limit: :type limit: int :param offset: @@ -1206,6 +1344,8 @@ def list_task_state_store_with_http_info( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, limit=limit, offset=offset, _request_auth=_request_auth, @@ -1216,8 +1356,11 @@ def list_task_state_store_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskStateStoreCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", + '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1237,7 +1380,9 @@ def list_task_state_store_without_preload_content( dag_id: StrictStr, dag_run_id: StrictStr, task_id: StrictStr, - map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, _request_timeout: Union[ @@ -1265,6 +1410,10 @@ def list_task_state_store_without_preload_content( :type task_id: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param limit: :type limit: int :param offset: @@ -1296,6 +1445,8 @@ def list_task_state_store_without_preload_content( dag_run_id=dag_run_id, task_id=task_id, map_index=map_index, + region_id=region_id, + region_index=region_index, limit=limit, offset=offset, _request_auth=_request_auth, @@ -1306,8 +1457,11 @@ def list_task_state_store_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "TaskStateStoreCollectionResponse", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", + '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1323,6 +1477,8 @@ def _list_task_state_store_serialize( dag_run_id, task_id, map_index, + region_id, + region_index, limit, offset, _request_auth, @@ -1338,7 +1494,7 @@ def _list_task_state_store_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1357,6 +1513,14 @@ def _list_task_state_store_serialize( _query_params.append(('map_index', map_index)) + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + if limit is not None: _query_params.append(('limit', limit)) @@ -1371,7 +1535,7 @@ def _list_task_state_store_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1411,7 +1575,9 @@ def patch_task_state_store( dag_run_id: StrictStr, task_id: StrictStr, task_state_store_patch_body: TaskStateStorePatchBody, - map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1441,6 +1607,10 @@ def patch_task_state_store( :type task_state_store_patch_body: TaskStateStorePatchBody :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1470,6 +1640,8 @@ def patch_task_state_store( task_id=task_id, task_state_store_patch_body=task_state_store_patch_body, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1478,9 +1650,11 @@ def patch_task_state_store( _response_types_map: Dict[str, Optional[str]] = { '200': "object", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1502,7 +1676,9 @@ def patch_task_state_store_with_http_info( dag_run_id: StrictStr, task_id: StrictStr, task_state_store_patch_body: TaskStateStorePatchBody, - map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1532,6 +1708,10 @@ def patch_task_state_store_with_http_info( :type task_state_store_patch_body: TaskStateStorePatchBody :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1561,6 +1741,8 @@ def patch_task_state_store_with_http_info( task_id=task_id, task_state_store_patch_body=task_state_store_patch_body, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1569,9 +1751,11 @@ def patch_task_state_store_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "object", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1593,7 +1777,9 @@ def patch_task_state_store_without_preload_content( dag_run_id: StrictStr, task_id: StrictStr, task_state_store_patch_body: TaskStateStorePatchBody, - map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1623,6 +1809,10 @@ def patch_task_state_store_without_preload_content( :type task_state_store_patch_body: TaskStateStorePatchBody :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1652,6 +1842,8 @@ def patch_task_state_store_without_preload_content( task_id=task_id, task_state_store_patch_body=task_state_store_patch_body, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1660,9 +1852,11 @@ def patch_task_state_store_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "object", + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1680,6 +1874,8 @@ def _patch_task_state_store_serialize( task_id, task_state_store_patch_body, map_index, + region_id, + region_index, _request_auth, _content_type, _headers, @@ -1693,7 +1889,7 @@ def _patch_task_state_store_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1714,6 +1910,14 @@ def _patch_task_state_store_serialize( _query_params.append(('map_index', map_index)) + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + # process the header parameters # process the form parameters # process the body parameter @@ -1722,7 +1926,7 @@ def _patch_task_state_store_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1731,7 +1935,7 @@ def _patch_task_state_store_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -1741,7 +1945,7 @@ def _patch_task_state_store_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -1775,7 +1979,9 @@ def set_task_state_store( dag_run_id: StrictStr, task_id: StrictStr, task_state_store_body: TaskStateStoreBody, - map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1805,6 +2011,10 @@ def set_task_state_store( :type task_state_store_body: TaskStateStoreBody :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1834,6 +2044,8 @@ def set_task_state_store( task_id=task_id, task_state_store_body=task_state_store_body, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1842,9 +2054,11 @@ def set_task_state_store( _response_types_map: Dict[str, Optional[str]] = { '204': None, + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1866,7 +2080,9 @@ def set_task_state_store_with_http_info( dag_run_id: StrictStr, task_id: StrictStr, task_state_store_body: TaskStateStoreBody, - map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1896,6 +2112,10 @@ def set_task_state_store_with_http_info( :type task_state_store_body: TaskStateStoreBody :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1925,6 +2145,8 @@ def set_task_state_store_with_http_info( task_id=task_id, task_state_store_body=task_state_store_body, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1933,9 +2155,11 @@ def set_task_state_store_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '204': None, + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1957,7 +2181,9 @@ def set_task_state_store_without_preload_content( dag_run_id: StrictStr, task_id: StrictStr, task_state_store_body: TaskStateStoreBody, - map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1987,6 +2213,10 @@ def set_task_state_store_without_preload_content( :type task_state_store_body: TaskStateStoreBody :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2016,6 +2246,8 @@ def set_task_state_store_without_preload_content( task_id=task_id, task_state_store_body=task_state_store_body, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2024,9 +2256,11 @@ def set_task_state_store_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '204': None, + '400': "HTTPExceptionResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -2044,6 +2278,8 @@ def _set_task_state_store_serialize( task_id, task_state_store_body, map_index, + region_id, + region_index, _request_auth, _content_type, _headers, @@ -2057,7 +2293,7 @@ def _set_task_state_store_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -2078,6 +2314,14 @@ def _set_task_state_store_serialize( _query_params.append(('map_index', map_index)) + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + # process the header parameters # process the form parameters # process the body parameter @@ -2086,7 +2330,7 @@ def _set_task_state_store_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -2095,7 +2339,7 @@ def _set_task_state_store_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -2105,7 +2349,7 @@ def _set_task_state_store_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ diff --git a/airflow_client/client/api/variable_api.py b/airflow_client/client/api/variable_api.py index 549dc713..5070cda3 100644 --- a/airflow_client/client/api/variable_api.py +++ b/airflow_client/client/api/variable_api.py @@ -264,7 +264,7 @@ def _bulk_variables_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -281,7 +281,7 @@ def _bulk_variables_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -290,7 +290,7 @@ def _bulk_variables_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -300,7 +300,7 @@ def _bulk_variables_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -551,7 +551,7 @@ def _delete_variable_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -568,7 +568,7 @@ def _delete_variable_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -825,7 +825,7 @@ def _get_variable_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -842,7 +842,7 @@ def _get_variable_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1149,7 +1149,7 @@ def _get_variables_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1184,7 +1184,7 @@ def _get_variables_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1471,7 +1471,7 @@ def _patch_variable_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1494,7 +1494,7 @@ def _patch_variable_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1503,7 +1503,7 @@ def _patch_variable_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -1513,7 +1513,7 @@ def _patch_variable_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -1596,6 +1596,7 @@ def post_variable( '201': "VariableResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", + '404': "HTTPExceptionResponse", '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } @@ -1667,6 +1668,7 @@ def post_variable_with_http_info( '201': "VariableResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", + '404': "HTTPExceptionResponse", '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } @@ -1738,6 +1740,7 @@ def post_variable_without_preload_content( '201': "VariableResponse", '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", + '404': "HTTPExceptionResponse", '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } @@ -1764,7 +1767,7 @@ def _post_variable_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1781,7 +1784,7 @@ def _post_variable_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1790,7 +1793,7 @@ def _post_variable_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -1800,7 +1803,7 @@ def _post_variable_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ diff --git a/airflow_client/client/api/version_api.py b/airflow_client/client/api/version_api.py index ce29ed61..acd8f00c 100644 --- a/airflow_client/client/api/version_api.py +++ b/airflow_client/client/api/version_api.py @@ -235,7 +235,7 @@ def _get_version_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -250,7 +250,7 @@ def _get_version_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' diff --git a/airflow_client/client/api/x_com_api.py b/airflow_client/client/api/x_com_api.py index 8d92d48b..8bc2d12e 100644 --- a/airflow_client/client/api/x_com_api.py +++ b/airflow_client/client/api/x_com_api.py @@ -19,6 +19,7 @@ from pydantic import Field, StrictBool, StrictInt, StrictStr from typing import List, Optional from typing_extensions import Annotated +from uuid import UUID from airflow_client.client.models.response_get_xcom_entry import ResponseGetXcomEntry from airflow_client.client.models.x_com_collection_response import XComCollectionResponse from airflow_client.client.models.x_com_create_body import XComCreateBody @@ -313,7 +314,7 @@ def _create_xcom_entry_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -336,7 +337,7 @@ def _create_xcom_entry_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -345,7 +346,7 @@ def _create_xcom_entry_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -355,7 +356,7 @@ def _create_xcom_entry_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ @@ -388,7 +389,9 @@ def delete_xcom_entry( task_id: StrictStr, dag_run_id: StrictStr, xcom_key: StrictStr, - map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -416,6 +419,10 @@ def delete_xcom_entry( :type xcom_key: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -444,6 +451,8 @@ def delete_xcom_entry( dag_run_id=dag_run_id, xcom_key=xcom_key, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -456,6 +465,7 @@ def delete_xcom_entry( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -476,7 +486,9 @@ def delete_xcom_entry_with_http_info( task_id: StrictStr, dag_run_id: StrictStr, xcom_key: StrictStr, - map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -504,6 +516,10 @@ def delete_xcom_entry_with_http_info( :type xcom_key: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -532,6 +548,8 @@ def delete_xcom_entry_with_http_info( dag_run_id=dag_run_id, xcom_key=xcom_key, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -544,6 +562,7 @@ def delete_xcom_entry_with_http_info( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -564,7 +583,9 @@ def delete_xcom_entry_without_preload_content( task_id: StrictStr, dag_run_id: StrictStr, xcom_key: StrictStr, - map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -592,6 +613,10 @@ def delete_xcom_entry_without_preload_content( :type xcom_key: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -620,6 +645,8 @@ def delete_xcom_entry_without_preload_content( dag_run_id=dag_run_id, xcom_key=xcom_key, map_index=map_index, + region_id=region_id, + region_index=region_index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -632,6 +659,7 @@ def delete_xcom_entry_without_preload_content( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -648,6 +676,8 @@ def _delete_xcom_entry_serialize( dag_run_id, xcom_key, map_index, + region_id, + region_index, _request_auth, _content_type, _headers, @@ -661,7 +691,7 @@ def _delete_xcom_entry_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -682,13 +712,21 @@ def _delete_xcom_entry_serialize( _query_params.append(('map_index', map_index)) + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -728,6 +766,9 @@ def get_xcom_entries( task_id: StrictStr, xcom_key: Optional[StrictStr] = None, map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + exclude_internal_keys: Annotated[Optional[StrictBool], Field(description="Leave out XComs whose keys Airflow reserves for itself, such as loop decision reasons.")] = None, limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, xcom_key_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `xcom_key_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, @@ -747,7 +788,8 @@ def get_xcom_entries( run_after_gt: Optional[datetime] = None, run_after_lte: Optional[datetime] = None, run_after_lt: Optional[datetime] = None, - order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `key, dag_id, run_id, task_id, map_index, timestamp, run_after`")] = None, + teams: Optional[List[StrictStr]] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `key, dag_id, run_id, task_id, map_index, region_id, region_index, timestamp, run_after`")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -775,6 +817,12 @@ def get_xcom_entries( :type xcom_key: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int + :param exclude_internal_keys: Leave out XComs whose keys Airflow reserves for itself, such as loop decision reasons. + :type exclude_internal_keys: bool :param limit: :type limit: int :param offset: @@ -813,7 +861,9 @@ def get_xcom_entries( :type run_after_lte: datetime :param run_after_lt: :type run_after_lt: datetime - :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `key, dag_id, run_id, task_id, map_index, timestamp, run_after` + :param teams: + :type teams: List[str] + :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `key, dag_id, run_id, task_id, map_index, region_id, region_index, timestamp, run_after` :type order_by: List[str] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -843,6 +893,9 @@ def get_xcom_entries( task_id=task_id, xcom_key=xcom_key, map_index=map_index, + region_id=region_id, + region_index=region_index, + exclude_internal_keys=exclude_internal_keys, limit=limit, offset=offset, xcom_key_pattern=xcom_key_pattern, @@ -862,6 +915,7 @@ def get_xcom_entries( run_after_gt=run_after_gt, run_after_lte=run_after_lte, run_after_lt=run_after_lt, + teams=teams, order_by=order_by, _request_auth=_request_auth, _content_type=_content_type, @@ -896,6 +950,9 @@ def get_xcom_entries_with_http_info( task_id: StrictStr, xcom_key: Optional[StrictStr] = None, map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + exclude_internal_keys: Annotated[Optional[StrictBool], Field(description="Leave out XComs whose keys Airflow reserves for itself, such as loop decision reasons.")] = None, limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, xcom_key_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `xcom_key_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, @@ -915,7 +972,8 @@ def get_xcom_entries_with_http_info( run_after_gt: Optional[datetime] = None, run_after_lte: Optional[datetime] = None, run_after_lt: Optional[datetime] = None, - order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `key, dag_id, run_id, task_id, map_index, timestamp, run_after`")] = None, + teams: Optional[List[StrictStr]] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `key, dag_id, run_id, task_id, map_index, region_id, region_index, timestamp, run_after`")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -943,6 +1001,12 @@ def get_xcom_entries_with_http_info( :type xcom_key: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int + :param exclude_internal_keys: Leave out XComs whose keys Airflow reserves for itself, such as loop decision reasons. + :type exclude_internal_keys: bool :param limit: :type limit: int :param offset: @@ -981,7 +1045,9 @@ def get_xcom_entries_with_http_info( :type run_after_lte: datetime :param run_after_lt: :type run_after_lt: datetime - :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `key, dag_id, run_id, task_id, map_index, timestamp, run_after` + :param teams: + :type teams: List[str] + :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `key, dag_id, run_id, task_id, map_index, region_id, region_index, timestamp, run_after` :type order_by: List[str] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1011,6 +1077,9 @@ def get_xcom_entries_with_http_info( task_id=task_id, xcom_key=xcom_key, map_index=map_index, + region_id=region_id, + region_index=region_index, + exclude_internal_keys=exclude_internal_keys, limit=limit, offset=offset, xcom_key_pattern=xcom_key_pattern, @@ -1030,6 +1099,7 @@ def get_xcom_entries_with_http_info( run_after_gt=run_after_gt, run_after_lte=run_after_lte, run_after_lt=run_after_lt, + teams=teams, order_by=order_by, _request_auth=_request_auth, _content_type=_content_type, @@ -1064,6 +1134,9 @@ def get_xcom_entries_without_preload_content( task_id: StrictStr, xcom_key: Optional[StrictStr] = None, map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + exclude_internal_keys: Annotated[Optional[StrictBool], Field(description="Leave out XComs whose keys Airflow reserves for itself, such as loop decision reasons.")] = None, limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, xcom_key_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `xcom_key_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, @@ -1083,7 +1156,8 @@ def get_xcom_entries_without_preload_content( run_after_gt: Optional[datetime] = None, run_after_lte: Optional[datetime] = None, run_after_lt: Optional[datetime] = None, - order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `key, dag_id, run_id, task_id, map_index, timestamp, run_after`")] = None, + teams: Optional[List[StrictStr]] = None, + order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `key, dag_id, run_id, task_id, map_index, region_id, region_index, timestamp, run_after`")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1111,6 +1185,12 @@ def get_xcom_entries_without_preload_content( :type xcom_key: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int + :param exclude_internal_keys: Leave out XComs whose keys Airflow reserves for itself, such as loop decision reasons. + :type exclude_internal_keys: bool :param limit: :type limit: int :param offset: @@ -1149,7 +1229,9 @@ def get_xcom_entries_without_preload_content( :type run_after_lte: datetime :param run_after_lt: :type run_after_lt: datetime - :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `key, dag_id, run_id, task_id, map_index, timestamp, run_after` + :param teams: + :type teams: List[str] + :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `key, dag_id, run_id, task_id, map_index, region_id, region_index, timestamp, run_after` :type order_by: List[str] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1179,6 +1261,9 @@ def get_xcom_entries_without_preload_content( task_id=task_id, xcom_key=xcom_key, map_index=map_index, + region_id=region_id, + region_index=region_index, + exclude_internal_keys=exclude_internal_keys, limit=limit, offset=offset, xcom_key_pattern=xcom_key_pattern, @@ -1198,6 +1283,7 @@ def get_xcom_entries_without_preload_content( run_after_gt=run_after_gt, run_after_lte=run_after_lte, run_after_lt=run_after_lt, + teams=teams, order_by=order_by, _request_auth=_request_auth, _content_type=_content_type, @@ -1227,6 +1313,9 @@ def _get_xcom_entries_serialize( task_id, xcom_key, map_index, + region_id, + region_index, + exclude_internal_keys, limit, offset, xcom_key_pattern, @@ -1246,6 +1335,7 @@ def _get_xcom_entries_serialize( run_after_gt, run_after_lte, run_after_lt, + teams, order_by, _request_auth, _content_type, @@ -1256,12 +1346,13 @@ def _get_xcom_entries_serialize( _host = None _collection_formats: Dict[str, str] = { + 'teams': 'multi', 'order_by': 'multi', } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1284,6 +1375,18 @@ def _get_xcom_entries_serialize( _query_params.append(('map_index', map_index)) + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + + if exclude_internal_keys is not None: + + _query_params.append(('exclude_internal_keys', exclude_internal_keys)) + if limit is not None: _query_params.append(('limit', limit)) @@ -1432,6 +1535,10 @@ def _get_xcom_entries_serialize( else: _query_params.append(('run_after_lt', run_after_lt)) + if teams is not None: + + _query_params.append(('teams', teams)) + if order_by is not None: _query_params.append(('order_by', order_by)) @@ -1442,7 +1549,7 @@ def _get_xcom_entries_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1481,7 +1588,9 @@ def get_xcom_entry( task_id: StrictStr, dag_run_id: StrictStr, xcom_key: StrictStr, - map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, deserialize: Optional[StrictBool] = None, stringify: Optional[StrictBool] = None, _request_timeout: Union[ @@ -1511,6 +1620,10 @@ def get_xcom_entry( :type xcom_key: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param deserialize: :type deserialize: bool :param stringify: @@ -1543,6 +1656,8 @@ def get_xcom_entry( dag_run_id=dag_run_id, xcom_key=xcom_key, map_index=map_index, + region_id=region_id, + region_index=region_index, deserialize=deserialize, stringify=stringify, _request_auth=_request_auth, @@ -1557,6 +1672,7 @@ def get_xcom_entry( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1577,7 +1693,9 @@ def get_xcom_entry_with_http_info( task_id: StrictStr, dag_run_id: StrictStr, xcom_key: StrictStr, - map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, deserialize: Optional[StrictBool] = None, stringify: Optional[StrictBool] = None, _request_timeout: Union[ @@ -1607,6 +1725,10 @@ def get_xcom_entry_with_http_info( :type xcom_key: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param deserialize: :type deserialize: bool :param stringify: @@ -1639,6 +1761,8 @@ def get_xcom_entry_with_http_info( dag_run_id=dag_run_id, xcom_key=xcom_key, map_index=map_index, + region_id=region_id, + region_index=region_index, deserialize=deserialize, stringify=stringify, _request_auth=_request_auth, @@ -1653,6 +1777,7 @@ def get_xcom_entry_with_http_info( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1673,7 +1798,9 @@ def get_xcom_entry_without_preload_content( task_id: StrictStr, dag_run_id: StrictStr, xcom_key: StrictStr, - map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, + map_index: Optional[StrictInt] = None, + region_id: Optional[UUID] = None, + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, deserialize: Optional[StrictBool] = None, stringify: Optional[StrictBool] = None, _request_timeout: Union[ @@ -1703,6 +1830,10 @@ def get_xcom_entry_without_preload_content( :type xcom_key: str :param map_index: :type map_index: int + :param region_id: + :type region_id: UUID + :param region_index: + :type region_index: int :param deserialize: :type deserialize: bool :param stringify: @@ -1735,6 +1866,8 @@ def get_xcom_entry_without_preload_content( dag_run_id=dag_run_id, xcom_key=xcom_key, map_index=map_index, + region_id=region_id, + region_index=region_index, deserialize=deserialize, stringify=stringify, _request_auth=_request_auth, @@ -1749,6 +1882,7 @@ def get_xcom_entry_without_preload_content( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -1765,6 +1899,8 @@ def _get_xcom_entry_serialize( dag_run_id, xcom_key, map_index, + region_id, + region_index, deserialize, stringify, _request_auth, @@ -1780,7 +1916,7 @@ def _get_xcom_entry_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -1801,6 +1937,14 @@ def _get_xcom_entry_serialize( _query_params.append(('map_index', map_index)) + if region_id is not None: + + _query_params.append(('region_id', region_id)) + + if region_index is not None: + + _query_params.append(('region_index', region_index)) + if deserialize is not None: _query_params.append(('deserialize', deserialize)) @@ -1815,7 +1959,7 @@ def _get_xcom_entry_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -1922,6 +2066,7 @@ def update_xcom_entry( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -2010,6 +2155,7 @@ def update_xcom_entry_with_http_info( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -2098,6 +2244,7 @@ def update_xcom_entry_without_preload_content( '401': "HTTPExceptionResponse", '403': "HTTPExceptionResponse", '404': "HTTPExceptionResponse", + '409': "HTTPExceptionResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -2127,7 +2274,7 @@ def _update_xcom_entry_serialize( _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} + _header_params: Dict[str, Any] = self.api_client._merge_headers(_headers) _form_params: List[Tuple[str, str]] = [] _files: Dict[ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] @@ -2152,7 +2299,7 @@ def _update_xcom_entry_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: + if not any(key.lower() == 'accept' for key in _header_params): _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/json' @@ -2161,7 +2308,7 @@ def _update_xcom_entry_serialize( # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + self.api_client._set_header(_header_params, 'Content-Type', _content_type) else: _default_content_type = ( self.api_client.select_header_content_type( @@ -2171,7 +2318,7 @@ def _update_xcom_entry_serialize( ) ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + self.api_client._set_header(_header_params, 'Content-Type', _default_content_type) # authentication setting _auth_settings: List[str] = [ diff --git a/airflow_client/client/api_client.py b/airflow_client/client/api_client.py index 856b49af..1f300b25 100644 --- a/airflow_client/client/api_client.py +++ b/airflow_client/client/api_client.py @@ -23,7 +23,7 @@ import uuid from urllib.parse import quote -from typing import Tuple, Optional, List, Dict, Union +from typing import Any, Tuple, Optional, List, Dict, Union from pydantic import SecretStr from airflow_client.client.configuration import Configuration @@ -91,7 +91,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/3.3.2/python' + self.user_agent = 'OpenAPI-Generator/3.4.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): @@ -103,16 +103,36 @@ def __exit__(self, exc_type, exc_value, traceback): @property def user_agent(self): """User agent for this API client""" - return self.default_headers['User-Agent'] + for name, value in reversed(self.default_headers.items()): + if name.lower() == 'user-agent': + return value + raise KeyError('User-Agent') @user_agent.setter def user_agent(self, value): - self.default_headers['User-Agent'] = value + self._set_header(self.default_headers, 'User-Agent', value) def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value + self._set_header(self.default_headers, header_name, header_value) + @staticmethod + def _set_header(headers: Dict[str, Any], name: str, value: Any) -> None: + """Replace a header case-insensitively, retaining the winning spelling.""" + for key in list(headers): + if key.lower() == name.lower(): + del headers[key] + headers[name] = value + + @classmethod + def _merge_headers(cls, *sources: Optional[Dict[str, Any]]) -> Dict[str, Any]: + """Copy headers; later sources and later entries in each dict win.""" + headers: Dict[str, Any] = {} + for source in sources: + for name, value in (source or {}).items(): + cls._set_header(headers, name, value) + return headers + _default = None @classmethod @@ -179,10 +199,9 @@ def param_serialize( config = self.configuration # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) + header_params = self._merge_headers(header_params, self.default_headers) if self.cookie: - header_params['Cookie'] = self.cookie + self._set_header(header_params, 'Cookie', self.cookie) if header_params: header_params = self.sanitize_for_serialization(header_params) header_params = dict( @@ -519,6 +538,13 @@ def parameters_to_tuples(self, params, collection_formats): new_params.append((k, v)) return new_params + def explode_query_object(self, name, obj): + """form style, explode: one query parameter per entry, keyed by the property name; a list repeats the name, None is left out""" + obj = self.sanitize_for_serialization(obj) + if not isinstance(obj, dict): + obj = {name: obj} + return [(k, item) for k, v in obj.items() for item in (v if isinstance(v, (list, tuple)) else [v]) if item is not None] + def parameters_to_url_query(self, params, collection_formats): """Get parameters as list of tuples, formatting collections. @@ -537,11 +563,12 @@ def parameters_to_url_query(self, params, collection_formats): if isinstance(v, dict): v = json.dumps(v) - if k in collection_formats: + # a collection format applies only to a list; an exploded entry may share a declared array parameter's name + if k in collection_formats and isinstance(v, (list, tuple)): collection_format = collection_formats[k] if collection_format == 'multi': new_params.extend( - (k, quote(str(value).lower() if isinstance(value, bool) else str(value))) + (quote(str(k)), quote(str(value).lower() if isinstance(value, bool) else str(value))) for value in v ) else: @@ -554,12 +581,13 @@ def parameters_to_url_query(self, params, collection_formats): else: # csv is the default delimiter = ',' new_params.append( - (k, delimiter.join( + (quote(str(k)), delimiter.join( quote(str(value).lower() if isinstance(value, bool) else str(value)) for value in v)) ) else: - new_params.append((k, quote(str(v)))) + # names are quoted too: an exploded object's names are runtime data + new_params.append((quote(str(k)), quote(str(v)))) return "&".join(["=".join(map(str, item)) for item in new_params]) @@ -695,7 +723,11 @@ def _apply_auth_params( :param auth_setting: auth settings for the endpoint """ if auth_setting['in'] == 'cookie': - if not 'Cookie' in headers: + for key in list(headers): + if key.lower() == 'cookie': + self._set_header(headers, 'Cookie', headers[key]) + break + if not headers.get('Cookie'): headers['Cookie'] = "" else: headers['Cookie'] += "; " @@ -704,7 +736,7 @@ def _apply_auth_params( headers['Cookie'] += f"{auth_setting['key']}={cookie_value}" elif auth_setting['in'] == 'header': if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] + self._set_header(headers, auth_setting['key'], auth_setting['value']) elif auth_setting['in'] == 'query': queries.append((auth_setting['key'], auth_setting['value'])) else: diff --git a/airflow_client/client/configuration.py b/airflow_client/client/configuration.py index 3d969ea2..6f5ebaa9 100644 --- a/airflow_client/client/configuration.py +++ b/airflow_client/client/configuration.py @@ -570,7 +570,7 @@ def to_debug_report(self) -> str: "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 2\n"\ - "SDK Package Version: 3.3.2".\ + "SDK Package Version: 3.4.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: diff --git a/airflow_client/client/models/__init__.py b/airflow_client/client/models/__init__.py index df7f2dda..65bd1b44 100644 --- a/airflow_client/client/models/__init__.py +++ b/airflow_client/client/models/__init__.py @@ -18,6 +18,8 @@ from airflow_client.client.models.actions_inner2 import ActionsInner2 from airflow_client.client.models.actions_inner3 import ActionsInner3 from airflow_client.client.models.actions_inner4 import ActionsInner4 +from airflow_client.client.models.actions_inner5 import ActionsInner5 +from airflow_client.client.models.all_inner import AllInner from airflow_client.client.models.app_builder_menu_item_response import AppBuilderMenuItemResponse from airflow_client.client.models.app_builder_view_response import AppBuilderViewResponse from airflow_client.client.models.asset_alias_collection_response import AssetAliasCollectionResponse @@ -26,6 +28,13 @@ from airflow_client.client.models.asset_event_access_control import AssetEventAccessControl from airflow_client.client.models.asset_event_collection_response import AssetEventCollectionResponse from airflow_client.client.models.asset_event_response import AssetEventResponse +from airflow_client.client.models.asset_expression_alias import AssetExpressionAlias +from airflow_client.client.models.asset_expression_alias_info import AssetExpressionAliasInfo +from airflow_client.client.models.asset_expression_all import AssetExpressionAll +from airflow_client.client.models.asset_expression_any import AssetExpressionAny +from airflow_client.client.models.asset_expression_asset import AssetExpressionAsset +from airflow_client.client.models.asset_expression_asset_info import AssetExpressionAssetInfo +from airflow_client.client.models.asset_expression_ref import AssetExpressionRef from airflow_client.client.models.asset_response import AssetResponse from airflow_client.client.models.asset_state_store_body import AssetStateStoreBody from airflow_client.client.models.asset_state_store_collection_response import AssetStateStoreCollectionResponse @@ -35,24 +44,30 @@ from airflow_client.client.models.asset_watcher_response import AssetWatcherResponse from airflow_client.client.models.async_connection_test_response import AsyncConnectionTestResponse from airflow_client.client.models.backfill_collection_response import BackfillCollectionResponse +from airflow_client.client.models.backfill_dag_run_collection_response import BackfillDagRunCollectionResponse +from airflow_client.client.models.backfill_dag_run_response import BackfillDagRunResponse from airflow_client.client.models.backfill_post_body import BackfillPostBody from airflow_client.client.models.backfill_response import BackfillResponse from airflow_client.client.models.base_info_response import BaseInfoResponse from airflow_client.client.models.bulk_action_not_on_existence import BulkActionNotOnExistence from airflow_client.client.models.bulk_action_on_existence import BulkActionOnExistence from airflow_client.client.models.bulk_action_response import BulkActionResponse +from airflow_client.client.models.bulk_body_bulk_dag_body import BulkBodyBulkDAGBody from airflow_client.client.models.bulk_body_bulk_dag_run_body import BulkBodyBulkDAGRunBody from airflow_client.client.models.bulk_body_bulk_task_instance_body import BulkBodyBulkTaskInstanceBody from airflow_client.client.models.bulk_body_connection_body import BulkBodyConnectionBody from airflow_client.client.models.bulk_body_pool_body import BulkBodyPoolBody from airflow_client.client.models.bulk_body_variable_body import BulkBodyVariableBody +from airflow_client.client.models.bulk_create_action_bulk_dag_body import BulkCreateActionBulkDAGBody from airflow_client.client.models.bulk_create_action_bulk_dag_run_body import BulkCreateActionBulkDAGRunBody from airflow_client.client.models.bulk_create_action_bulk_task_instance_body import BulkCreateActionBulkTaskInstanceBody from airflow_client.client.models.bulk_create_action_connection_body import BulkCreateActionConnectionBody from airflow_client.client.models.bulk_create_action_pool_body import BulkCreateActionPoolBody from airflow_client.client.models.bulk_create_action_variable_body import BulkCreateActionVariableBody +from airflow_client.client.models.bulk_dag_body import BulkDAGBody from airflow_client.client.models.bulk_dag_run_body import BulkDAGRunBody from airflow_client.client.models.bulk_dag_run_clear_body import BulkDAGRunClearBody +from airflow_client.client.models.bulk_delete_action_bulk_dag_body import BulkDeleteActionBulkDAGBody from airflow_client.client.models.bulk_delete_action_bulk_dag_run_body import BulkDeleteActionBulkDAGRunBody from airflow_client.client.models.bulk_delete_action_bulk_task_instance_body import BulkDeleteActionBulkTaskInstanceBody from airflow_client.client.models.bulk_delete_action_connection_body import BulkDeleteActionConnectionBody @@ -60,6 +75,7 @@ from airflow_client.client.models.bulk_delete_action_variable_body import BulkDeleteActionVariableBody from airflow_client.client.models.bulk_response import BulkResponse from airflow_client.client.models.bulk_task_instance_body import BulkTaskInstanceBody +from airflow_client.client.models.bulk_update_action_bulk_dag_body import BulkUpdateActionBulkDAGBody from airflow_client.client.models.bulk_update_action_bulk_dag_run_body import BulkUpdateActionBulkDAGRunBody from airflow_client.client.models.bulk_update_action_bulk_task_instance_body import BulkUpdateActionBulkTaskInstanceBody from airflow_client.client.models.bulk_update_action_connection_body import BulkUpdateActionConnectionBody @@ -83,6 +99,7 @@ from airflow_client.client.models.create_asset_events_body import CreateAssetEventsBody from airflow_client.client.models.dag_collection_response import DAGCollectionResponse from airflow_client.client.models.dag_details_response import DAGDetailsResponse +from airflow_client.client.models.dag_details_response_asset_expression import DAGDetailsResponseAssetExpression from airflow_client.client.models.dag_patch_body import DAGPatchBody from airflow_client.client.models.dag_response import DAGResponse from airflow_client.client.models.dag_run_clear_body import DAGRunClearBody @@ -95,20 +112,36 @@ from airflow_client.client.models.dag_version_collection_response import DAGVersionCollectionResponse from airflow_client.client.models.dag_warning_collection_response import DAGWarningCollectionResponse from airflow_client.client.models.dag_warning_response import DAGWarningResponse +from airflow_client.client.models.dag_bundle_collection_response import DagBundleCollectionResponse +from airflow_client.client.models.dag_bundle_detail_response import DagBundleDetailResponse +from airflow_client.client.models.dag_bundle_file_collection_response import DagBundleFileCollectionResponse +from airflow_client.client.models.dag_bundle_file_response import DagBundleFileResponse +from airflow_client.client.models.dag_bundle_response import DagBundleResponse from airflow_client.client.models.dag_processor_info_response import DagProcessorInfoResponse +from airflow_client.client.models.dag_processor_instance_info_response import DagProcessorInstanceInfoResponse from airflow_client.client.models.dag_run_asset_reference import DagRunAssetReference from airflow_client.client.models.dag_run_mutable_states import DagRunMutableStates from airflow_client.client.models.dag_run_state import DagRunState from airflow_client.client.models.dag_run_triggered_by_type import DagRunTriggeredByType from airflow_client.client.models.dag_run_type import DagRunType from airflow_client.client.models.dag_schedule_asset_reference import DagScheduleAssetReference +from airflow_client.client.models.dag_scheduling_state import DagSchedulingState from airflow_client.client.models.dag_stats_collection_response import DagStatsCollectionResponse from airflow_client.client.models.dag_stats_response import DagStatsResponse from airflow_client.client.models.dag_stats_state_response import DagStatsStateResponse from airflow_client.client.models.dag_tag_response import DagTagResponse +from airflow_client.client.models.dag_version_diff_category import DagVersionDiffCategory +from airflow_client.client.models.dag_version_diff_change_response import DagVersionDiffChangeResponse +from airflow_client.client.models.dag_version_diff_impact import DagVersionDiffImpact +from airflow_client.client.models.dag_version_diff_mode import DagVersionDiffMode +from airflow_client.client.models.dag_version_diff_operation import DagVersionDiffOperation +from airflow_client.client.models.dag_version_diff_response import DagVersionDiffResponse +from airflow_client.client.models.dag_version_diff_serializer_versions import DagVersionDiffSerializerVersions +from airflow_client.client.models.dag_version_diff_values_status import DagVersionDiffValuesStatus from airflow_client.client.models.dag_version_response import DagVersionResponse from airflow_client.client.models.dag_warning_type import DagWarningType from airflow_client.client.models.detail import Detail +from airflow_client.client.models.detailed_health_status import DetailedHealthStatus from airflow_client.client.models.dry_run_backfill_collection_response import DryRunBackfillCollectionResponse from airflow_client.client.models.dry_run_backfill_response import DryRunBackfillResponse from airflow_client.client.models.entities_inner import EntitiesInner @@ -116,6 +149,7 @@ from airflow_client.client.models.entities_inner2 import EntitiesInner2 from airflow_client.client.models.entities_inner3 import EntitiesInner3 from airflow_client.client.models.entities_inner4 import EntitiesInner4 +from airflow_client.client.models.entities_inner5 import EntitiesInner5 from airflow_client.client.models.event_log_collection_response import EventLogCollectionResponse from airflow_client.client.models.event_log_response import EventLogResponse from airflow_client.client.models.expires_at import ExpiresAt @@ -132,18 +166,22 @@ from airflow_client.client.models.http_exception_response import HTTPExceptionResponse from airflow_client.client.models.http_validation_error import HTTPValidationError from airflow_client.client.models.health_info_response import HealthInfoResponse +from airflow_client.client.models.health_status import HealthStatus from airflow_client.client.models.import_error_collection_response import ImportErrorCollectionResponse from airflow_client.client.models.import_error_response import ImportErrorResponse from airflow_client.client.models.job_collection_response import JobCollectionResponse from airflow_client.client.models.job_response import JobResponse from airflow_client.client.models.last_asset_event_response import LastAssetEventResponse from airflow_client.client.models.location_inner import LocationInner +from airflow_client.client.models.loop_iteration_response import LoopIterationResponse from airflow_client.client.models.materialize_asset_body import MaterializeAssetBody from airflow_client.client.models.new_task_response import NewTaskResponse from airflow_client.client.models.patch_task_instance_body import PatchTaskInstanceBody from airflow_client.client.models.plugin_collection_response import PluginCollectionResponse from airflow_client.client.models.plugin_import_error_collection_response import PluginImportErrorCollectionResponse from airflow_client.client.models.plugin_import_error_response import PluginImportErrorResponse +from airflow_client.client.models.plugin_link_action_response import PluginLinkActionResponse +from airflow_client.client.models.plugin_react_action_response import PluginReactActionResponse from airflow_client.client.models.plugin_response import PluginResponse from airflow_client.client.models.pool_body import PoolBody from airflow_client.client.models.pool_collection_response import PoolCollectionResponse @@ -159,6 +197,7 @@ from airflow_client.client.models.response_clear_dag_runs import ResponseClearDagRuns from airflow_client.client.models.response_get_xcom_entry import ResponseGetXcomEntry from airflow_client.client.models.scheduler_info_response import SchedulerInfoResponse +from airflow_client.client.models.scheduler_instance_info_response import SchedulerInstanceInfoResponse from airflow_client.client.models.structured_log_message import StructuredLogMessage from airflow_client.client.models.task_collection_response import TaskCollectionResponse from airflow_client.client.models.task_dependency_collection_response import TaskDependencyCollectionResponse @@ -182,6 +221,8 @@ from airflow_client.client.models.trigger_dag_run_post_body import TriggerDAGRunPostBody from airflow_client.client.models.trigger_response import TriggerResponse from airflow_client.client.models.triggerer_info_response import TriggererInfoResponse +from airflow_client.client.models.triggerer_instance_info_response import TriggererInstanceInfoResponse +from airflow_client.client.models.ui_actions_inner import UiActionsInner from airflow_client.client.models.update_hitl_detail_payload import UpdateHITLDetailPayload from airflow_client.client.models.validation_error import ValidationError from airflow_client.client.models.value import Value @@ -189,6 +230,8 @@ from airflow_client.client.models.variable_collection_response import VariableCollectionResponse from airflow_client.client.models.variable_response import VariableResponse from airflow_client.client.models.version_info import VersionInfo +from airflow_client.client.models.warning_type import WarningType +from airflow_client.client.models.warning_type1 import WarningType1 from airflow_client.client.models.x_com_collection_response import XComCollectionResponse from airflow_client.client.models.x_com_create_body import XComCreateBody from airflow_client.client.models.x_com_response import XComResponse diff --git a/airflow_client/client/models/actions_inner.py b/airflow_client/client/models/actions_inner.py index 6555818c..880d63d8 100644 --- a/airflow_client/client/models/actions_inner.py +++ b/airflow_client/client/models/actions_inner.py @@ -17,27 +17,27 @@ import pprint from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional -from airflow_client.client.models.bulk_create_action_bulk_dag_run_body import BulkCreateActionBulkDAGRunBody -from airflow_client.client.models.bulk_delete_action_bulk_dag_run_body import BulkDeleteActionBulkDAGRunBody -from airflow_client.client.models.bulk_update_action_bulk_dag_run_body import BulkUpdateActionBulkDAGRunBody +from airflow_client.client.models.bulk_create_action_bulk_dag_body import BulkCreateActionBulkDAGBody +from airflow_client.client.models.bulk_delete_action_bulk_dag_body import BulkDeleteActionBulkDAGBody +from airflow_client.client.models.bulk_update_action_bulk_dag_body import BulkUpdateActionBulkDAGBody from pydantic import StrictStr, Field from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self -ACTIONSINNER_ONE_OF_SCHEMAS = ["BulkCreateActionBulkDAGRunBody", "BulkDeleteActionBulkDAGRunBody", "BulkUpdateActionBulkDAGRunBody"] +ACTIONSINNER_ONE_OF_SCHEMAS = ["BulkCreateActionBulkDAGBody", "BulkDeleteActionBulkDAGBody", "BulkUpdateActionBulkDAGBody"] class ActionsInner(BaseModel): """ ActionsInner """ - # data type: BulkCreateActionBulkDAGRunBody - oneof_schema_1_validator: Optional[BulkCreateActionBulkDAGRunBody] = None - # data type: BulkUpdateActionBulkDAGRunBody - oneof_schema_2_validator: Optional[BulkUpdateActionBulkDAGRunBody] = None - # data type: BulkDeleteActionBulkDAGRunBody - oneof_schema_3_validator: Optional[BulkDeleteActionBulkDAGRunBody] = None - actual_instance: Optional[Union[BulkCreateActionBulkDAGRunBody, BulkDeleteActionBulkDAGRunBody, BulkUpdateActionBulkDAGRunBody]] = None - one_of_schemas: Set[str] = { "BulkCreateActionBulkDAGRunBody", "BulkDeleteActionBulkDAGRunBody", "BulkUpdateActionBulkDAGRunBody" } + # data type: BulkCreateActionBulkDAGBody + oneof_schema_1_validator: Optional[BulkCreateActionBulkDAGBody] = None + # data type: BulkUpdateActionBulkDAGBody + oneof_schema_2_validator: Optional[BulkUpdateActionBulkDAGBody] = None + # data type: BulkDeleteActionBulkDAGBody + oneof_schema_3_validator: Optional[BulkDeleteActionBulkDAGBody] = None + actual_instance: Optional[Union[BulkCreateActionBulkDAGBody, BulkDeleteActionBulkDAGBody, BulkUpdateActionBulkDAGBody]] = None + one_of_schemas: Set[str] = { "BulkCreateActionBulkDAGBody", "BulkDeleteActionBulkDAGBody", "BulkUpdateActionBulkDAGBody" } model_config = ConfigDict( validate_assignment=True, @@ -60,27 +60,27 @@ def actual_instance_must_validate_oneof(cls, v): instance = ActionsInner.model_construct() error_messages = [] match = 0 - # validate data type: BulkCreateActionBulkDAGRunBody - if not isinstance(v, BulkCreateActionBulkDAGRunBody): - error_messages.append(f"Error! Input type `{type(v)}` is not `BulkCreateActionBulkDAGRunBody`") + # validate data type: BulkCreateActionBulkDAGBody + if not isinstance(v, BulkCreateActionBulkDAGBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `BulkCreateActionBulkDAGBody`") else: match += 1 - # validate data type: BulkUpdateActionBulkDAGRunBody - if not isinstance(v, BulkUpdateActionBulkDAGRunBody): - error_messages.append(f"Error! Input type `{type(v)}` is not `BulkUpdateActionBulkDAGRunBody`") + # validate data type: BulkUpdateActionBulkDAGBody + if not isinstance(v, BulkUpdateActionBulkDAGBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `BulkUpdateActionBulkDAGBody`") else: match += 1 - # validate data type: BulkDeleteActionBulkDAGRunBody - if not isinstance(v, BulkDeleteActionBulkDAGRunBody): - error_messages.append(f"Error! Input type `{type(v)}` is not `BulkDeleteActionBulkDAGRunBody`") + # validate data type: BulkDeleteActionBulkDAGBody + if not isinstance(v, BulkDeleteActionBulkDAGBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `BulkDeleteActionBulkDAGBody`") else: match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in ActionsInner with oneOf schemas: BulkCreateActionBulkDAGRunBody, BulkDeleteActionBulkDAGRunBody, BulkUpdateActionBulkDAGRunBody. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in ActionsInner with oneOf schemas: BulkCreateActionBulkDAGBody, BulkDeleteActionBulkDAGBody, BulkUpdateActionBulkDAGBody. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in ActionsInner with oneOf schemas: BulkCreateActionBulkDAGRunBody, BulkDeleteActionBulkDAGRunBody, BulkUpdateActionBulkDAGRunBody. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in ActionsInner with oneOf schemas: BulkCreateActionBulkDAGBody, BulkDeleteActionBulkDAGBody, BulkUpdateActionBulkDAGBody. Details: " + ", ".join(error_messages)) else: return v @@ -95,31 +95,31 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 - # deserialize data into BulkCreateActionBulkDAGRunBody + # deserialize data into BulkCreateActionBulkDAGBody try: - instance.actual_instance = BulkCreateActionBulkDAGRunBody.from_json(json_str) + instance.actual_instance = BulkCreateActionBulkDAGBody.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # deserialize data into BulkUpdateActionBulkDAGRunBody + # deserialize data into BulkUpdateActionBulkDAGBody try: - instance.actual_instance = BulkUpdateActionBulkDAGRunBody.from_json(json_str) + instance.actual_instance = BulkUpdateActionBulkDAGBody.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # deserialize data into BulkDeleteActionBulkDAGRunBody + # deserialize data into BulkDeleteActionBulkDAGBody try: - instance.actual_instance = BulkDeleteActionBulkDAGRunBody.from_json(json_str) + instance.actual_instance = BulkDeleteActionBulkDAGBody.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into ActionsInner with oneOf schemas: BulkCreateActionBulkDAGRunBody, BulkDeleteActionBulkDAGRunBody, BulkUpdateActionBulkDAGRunBody. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into ActionsInner with oneOf schemas: BulkCreateActionBulkDAGBody, BulkDeleteActionBulkDAGBody, BulkUpdateActionBulkDAGBody. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into ActionsInner with oneOf schemas: BulkCreateActionBulkDAGRunBody, BulkDeleteActionBulkDAGRunBody, BulkUpdateActionBulkDAGRunBody. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into ActionsInner with oneOf schemas: BulkCreateActionBulkDAGBody, BulkDeleteActionBulkDAGBody, BulkUpdateActionBulkDAGBody. Details: " + ", ".join(error_messages)) else: return instance @@ -133,7 +133,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], BulkCreateActionBulkDAGRunBody, BulkDeleteActionBulkDAGRunBody, BulkUpdateActionBulkDAGRunBody]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], BulkCreateActionBulkDAGBody, BulkDeleteActionBulkDAGBody, BulkUpdateActionBulkDAGBody]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/airflow_client/client/models/actions_inner1.py b/airflow_client/client/models/actions_inner1.py index 9a2b4141..bc66956a 100644 --- a/airflow_client/client/models/actions_inner1.py +++ b/airflow_client/client/models/actions_inner1.py @@ -17,27 +17,27 @@ import pprint from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional -from airflow_client.client.models.bulk_create_action_bulk_task_instance_body import BulkCreateActionBulkTaskInstanceBody -from airflow_client.client.models.bulk_delete_action_bulk_task_instance_body import BulkDeleteActionBulkTaskInstanceBody -from airflow_client.client.models.bulk_update_action_bulk_task_instance_body import BulkUpdateActionBulkTaskInstanceBody +from airflow_client.client.models.bulk_create_action_bulk_dag_run_body import BulkCreateActionBulkDAGRunBody +from airflow_client.client.models.bulk_delete_action_bulk_dag_run_body import BulkDeleteActionBulkDAGRunBody +from airflow_client.client.models.bulk_update_action_bulk_dag_run_body import BulkUpdateActionBulkDAGRunBody from pydantic import StrictStr, Field from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self -ACTIONSINNER1_ONE_OF_SCHEMAS = ["BulkCreateActionBulkTaskInstanceBody", "BulkDeleteActionBulkTaskInstanceBody", "BulkUpdateActionBulkTaskInstanceBody"] +ACTIONSINNER1_ONE_OF_SCHEMAS = ["BulkCreateActionBulkDAGRunBody", "BulkDeleteActionBulkDAGRunBody", "BulkUpdateActionBulkDAGRunBody"] class ActionsInner1(BaseModel): """ ActionsInner1 """ - # data type: BulkCreateActionBulkTaskInstanceBody - oneof_schema_1_validator: Optional[BulkCreateActionBulkTaskInstanceBody] = None - # data type: BulkUpdateActionBulkTaskInstanceBody - oneof_schema_2_validator: Optional[BulkUpdateActionBulkTaskInstanceBody] = None - # data type: BulkDeleteActionBulkTaskInstanceBody - oneof_schema_3_validator: Optional[BulkDeleteActionBulkTaskInstanceBody] = None - actual_instance: Optional[Union[BulkCreateActionBulkTaskInstanceBody, BulkDeleteActionBulkTaskInstanceBody, BulkUpdateActionBulkTaskInstanceBody]] = None - one_of_schemas: Set[str] = { "BulkCreateActionBulkTaskInstanceBody", "BulkDeleteActionBulkTaskInstanceBody", "BulkUpdateActionBulkTaskInstanceBody" } + # data type: BulkCreateActionBulkDAGRunBody + oneof_schema_1_validator: Optional[BulkCreateActionBulkDAGRunBody] = None + # data type: BulkUpdateActionBulkDAGRunBody + oneof_schema_2_validator: Optional[BulkUpdateActionBulkDAGRunBody] = None + # data type: BulkDeleteActionBulkDAGRunBody + oneof_schema_3_validator: Optional[BulkDeleteActionBulkDAGRunBody] = None + actual_instance: Optional[Union[BulkCreateActionBulkDAGRunBody, BulkDeleteActionBulkDAGRunBody, BulkUpdateActionBulkDAGRunBody]] = None + one_of_schemas: Set[str] = { "BulkCreateActionBulkDAGRunBody", "BulkDeleteActionBulkDAGRunBody", "BulkUpdateActionBulkDAGRunBody" } model_config = ConfigDict( validate_assignment=True, @@ -60,27 +60,27 @@ def actual_instance_must_validate_oneof(cls, v): instance = ActionsInner1.model_construct() error_messages = [] match = 0 - # validate data type: BulkCreateActionBulkTaskInstanceBody - if not isinstance(v, BulkCreateActionBulkTaskInstanceBody): - error_messages.append(f"Error! Input type `{type(v)}` is not `BulkCreateActionBulkTaskInstanceBody`") + # validate data type: BulkCreateActionBulkDAGRunBody + if not isinstance(v, BulkCreateActionBulkDAGRunBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `BulkCreateActionBulkDAGRunBody`") else: match += 1 - # validate data type: BulkUpdateActionBulkTaskInstanceBody - if not isinstance(v, BulkUpdateActionBulkTaskInstanceBody): - error_messages.append(f"Error! Input type `{type(v)}` is not `BulkUpdateActionBulkTaskInstanceBody`") + # validate data type: BulkUpdateActionBulkDAGRunBody + if not isinstance(v, BulkUpdateActionBulkDAGRunBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `BulkUpdateActionBulkDAGRunBody`") else: match += 1 - # validate data type: BulkDeleteActionBulkTaskInstanceBody - if not isinstance(v, BulkDeleteActionBulkTaskInstanceBody): - error_messages.append(f"Error! Input type `{type(v)}` is not `BulkDeleteActionBulkTaskInstanceBody`") + # validate data type: BulkDeleteActionBulkDAGRunBody + if not isinstance(v, BulkDeleteActionBulkDAGRunBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `BulkDeleteActionBulkDAGRunBody`") else: match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in ActionsInner1 with oneOf schemas: BulkCreateActionBulkTaskInstanceBody, BulkDeleteActionBulkTaskInstanceBody, BulkUpdateActionBulkTaskInstanceBody. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in ActionsInner1 with oneOf schemas: BulkCreateActionBulkDAGRunBody, BulkDeleteActionBulkDAGRunBody, BulkUpdateActionBulkDAGRunBody. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in ActionsInner1 with oneOf schemas: BulkCreateActionBulkTaskInstanceBody, BulkDeleteActionBulkTaskInstanceBody, BulkUpdateActionBulkTaskInstanceBody. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in ActionsInner1 with oneOf schemas: BulkCreateActionBulkDAGRunBody, BulkDeleteActionBulkDAGRunBody, BulkUpdateActionBulkDAGRunBody. Details: " + ", ".join(error_messages)) else: return v @@ -95,31 +95,31 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 - # deserialize data into BulkCreateActionBulkTaskInstanceBody + # deserialize data into BulkCreateActionBulkDAGRunBody try: - instance.actual_instance = BulkCreateActionBulkTaskInstanceBody.from_json(json_str) + instance.actual_instance = BulkCreateActionBulkDAGRunBody.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # deserialize data into BulkUpdateActionBulkTaskInstanceBody + # deserialize data into BulkUpdateActionBulkDAGRunBody try: - instance.actual_instance = BulkUpdateActionBulkTaskInstanceBody.from_json(json_str) + instance.actual_instance = BulkUpdateActionBulkDAGRunBody.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # deserialize data into BulkDeleteActionBulkTaskInstanceBody + # deserialize data into BulkDeleteActionBulkDAGRunBody try: - instance.actual_instance = BulkDeleteActionBulkTaskInstanceBody.from_json(json_str) + instance.actual_instance = BulkDeleteActionBulkDAGRunBody.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into ActionsInner1 with oneOf schemas: BulkCreateActionBulkTaskInstanceBody, BulkDeleteActionBulkTaskInstanceBody, BulkUpdateActionBulkTaskInstanceBody. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into ActionsInner1 with oneOf schemas: BulkCreateActionBulkDAGRunBody, BulkDeleteActionBulkDAGRunBody, BulkUpdateActionBulkDAGRunBody. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into ActionsInner1 with oneOf schemas: BulkCreateActionBulkTaskInstanceBody, BulkDeleteActionBulkTaskInstanceBody, BulkUpdateActionBulkTaskInstanceBody. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into ActionsInner1 with oneOf schemas: BulkCreateActionBulkDAGRunBody, BulkDeleteActionBulkDAGRunBody, BulkUpdateActionBulkDAGRunBody. Details: " + ", ".join(error_messages)) else: return instance @@ -133,7 +133,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], BulkCreateActionBulkTaskInstanceBody, BulkDeleteActionBulkTaskInstanceBody, BulkUpdateActionBulkTaskInstanceBody]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], BulkCreateActionBulkDAGRunBody, BulkDeleteActionBulkDAGRunBody, BulkUpdateActionBulkDAGRunBody]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/airflow_client/client/models/actions_inner2.py b/airflow_client/client/models/actions_inner2.py index d90b8b2c..7d7f1105 100644 --- a/airflow_client/client/models/actions_inner2.py +++ b/airflow_client/client/models/actions_inner2.py @@ -17,27 +17,27 @@ import pprint from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional -from airflow_client.client.models.bulk_create_action_connection_body import BulkCreateActionConnectionBody -from airflow_client.client.models.bulk_delete_action_connection_body import BulkDeleteActionConnectionBody -from airflow_client.client.models.bulk_update_action_connection_body import BulkUpdateActionConnectionBody +from airflow_client.client.models.bulk_create_action_bulk_task_instance_body import BulkCreateActionBulkTaskInstanceBody +from airflow_client.client.models.bulk_delete_action_bulk_task_instance_body import BulkDeleteActionBulkTaskInstanceBody +from airflow_client.client.models.bulk_update_action_bulk_task_instance_body import BulkUpdateActionBulkTaskInstanceBody from pydantic import StrictStr, Field from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self -ACTIONSINNER2_ONE_OF_SCHEMAS = ["BulkCreateActionConnectionBody", "BulkDeleteActionConnectionBody", "BulkUpdateActionConnectionBody"] +ACTIONSINNER2_ONE_OF_SCHEMAS = ["BulkCreateActionBulkTaskInstanceBody", "BulkDeleteActionBulkTaskInstanceBody", "BulkUpdateActionBulkTaskInstanceBody"] class ActionsInner2(BaseModel): """ ActionsInner2 """ - # data type: BulkCreateActionConnectionBody - oneof_schema_1_validator: Optional[BulkCreateActionConnectionBody] = None - # data type: BulkUpdateActionConnectionBody - oneof_schema_2_validator: Optional[BulkUpdateActionConnectionBody] = None - # data type: BulkDeleteActionConnectionBody - oneof_schema_3_validator: Optional[BulkDeleteActionConnectionBody] = None - actual_instance: Optional[Union[BulkCreateActionConnectionBody, BulkDeleteActionConnectionBody, BulkUpdateActionConnectionBody]] = None - one_of_schemas: Set[str] = { "BulkCreateActionConnectionBody", "BulkDeleteActionConnectionBody", "BulkUpdateActionConnectionBody" } + # data type: BulkCreateActionBulkTaskInstanceBody + oneof_schema_1_validator: Optional[BulkCreateActionBulkTaskInstanceBody] = None + # data type: BulkUpdateActionBulkTaskInstanceBody + oneof_schema_2_validator: Optional[BulkUpdateActionBulkTaskInstanceBody] = None + # data type: BulkDeleteActionBulkTaskInstanceBody + oneof_schema_3_validator: Optional[BulkDeleteActionBulkTaskInstanceBody] = None + actual_instance: Optional[Union[BulkCreateActionBulkTaskInstanceBody, BulkDeleteActionBulkTaskInstanceBody, BulkUpdateActionBulkTaskInstanceBody]] = None + one_of_schemas: Set[str] = { "BulkCreateActionBulkTaskInstanceBody", "BulkDeleteActionBulkTaskInstanceBody", "BulkUpdateActionBulkTaskInstanceBody" } model_config = ConfigDict( validate_assignment=True, @@ -60,27 +60,27 @@ def actual_instance_must_validate_oneof(cls, v): instance = ActionsInner2.model_construct() error_messages = [] match = 0 - # validate data type: BulkCreateActionConnectionBody - if not isinstance(v, BulkCreateActionConnectionBody): - error_messages.append(f"Error! Input type `{type(v)}` is not `BulkCreateActionConnectionBody`") + # validate data type: BulkCreateActionBulkTaskInstanceBody + if not isinstance(v, BulkCreateActionBulkTaskInstanceBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `BulkCreateActionBulkTaskInstanceBody`") else: match += 1 - # validate data type: BulkUpdateActionConnectionBody - if not isinstance(v, BulkUpdateActionConnectionBody): - error_messages.append(f"Error! Input type `{type(v)}` is not `BulkUpdateActionConnectionBody`") + # validate data type: BulkUpdateActionBulkTaskInstanceBody + if not isinstance(v, BulkUpdateActionBulkTaskInstanceBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `BulkUpdateActionBulkTaskInstanceBody`") else: match += 1 - # validate data type: BulkDeleteActionConnectionBody - if not isinstance(v, BulkDeleteActionConnectionBody): - error_messages.append(f"Error! Input type `{type(v)}` is not `BulkDeleteActionConnectionBody`") + # validate data type: BulkDeleteActionBulkTaskInstanceBody + if not isinstance(v, BulkDeleteActionBulkTaskInstanceBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `BulkDeleteActionBulkTaskInstanceBody`") else: match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in ActionsInner2 with oneOf schemas: BulkCreateActionConnectionBody, BulkDeleteActionConnectionBody, BulkUpdateActionConnectionBody. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in ActionsInner2 with oneOf schemas: BulkCreateActionBulkTaskInstanceBody, BulkDeleteActionBulkTaskInstanceBody, BulkUpdateActionBulkTaskInstanceBody. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in ActionsInner2 with oneOf schemas: BulkCreateActionConnectionBody, BulkDeleteActionConnectionBody, BulkUpdateActionConnectionBody. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in ActionsInner2 with oneOf schemas: BulkCreateActionBulkTaskInstanceBody, BulkDeleteActionBulkTaskInstanceBody, BulkUpdateActionBulkTaskInstanceBody. Details: " + ", ".join(error_messages)) else: return v @@ -95,31 +95,31 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 - # deserialize data into BulkCreateActionConnectionBody + # deserialize data into BulkCreateActionBulkTaskInstanceBody try: - instance.actual_instance = BulkCreateActionConnectionBody.from_json(json_str) + instance.actual_instance = BulkCreateActionBulkTaskInstanceBody.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # deserialize data into BulkUpdateActionConnectionBody + # deserialize data into BulkUpdateActionBulkTaskInstanceBody try: - instance.actual_instance = BulkUpdateActionConnectionBody.from_json(json_str) + instance.actual_instance = BulkUpdateActionBulkTaskInstanceBody.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # deserialize data into BulkDeleteActionConnectionBody + # deserialize data into BulkDeleteActionBulkTaskInstanceBody try: - instance.actual_instance = BulkDeleteActionConnectionBody.from_json(json_str) + instance.actual_instance = BulkDeleteActionBulkTaskInstanceBody.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into ActionsInner2 with oneOf schemas: BulkCreateActionConnectionBody, BulkDeleteActionConnectionBody, BulkUpdateActionConnectionBody. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into ActionsInner2 with oneOf schemas: BulkCreateActionBulkTaskInstanceBody, BulkDeleteActionBulkTaskInstanceBody, BulkUpdateActionBulkTaskInstanceBody. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into ActionsInner2 with oneOf schemas: BulkCreateActionConnectionBody, BulkDeleteActionConnectionBody, BulkUpdateActionConnectionBody. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into ActionsInner2 with oneOf schemas: BulkCreateActionBulkTaskInstanceBody, BulkDeleteActionBulkTaskInstanceBody, BulkUpdateActionBulkTaskInstanceBody. Details: " + ", ".join(error_messages)) else: return instance @@ -133,7 +133,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], BulkCreateActionConnectionBody, BulkDeleteActionConnectionBody, BulkUpdateActionConnectionBody]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], BulkCreateActionBulkTaskInstanceBody, BulkDeleteActionBulkTaskInstanceBody, BulkUpdateActionBulkTaskInstanceBody]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/airflow_client/client/models/actions_inner3.py b/airflow_client/client/models/actions_inner3.py index ceb39655..dcebbe35 100644 --- a/airflow_client/client/models/actions_inner3.py +++ b/airflow_client/client/models/actions_inner3.py @@ -17,27 +17,27 @@ import pprint from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional -from airflow_client.client.models.bulk_create_action_pool_body import BulkCreateActionPoolBody -from airflow_client.client.models.bulk_delete_action_pool_body import BulkDeleteActionPoolBody -from airflow_client.client.models.bulk_update_action_pool_body import BulkUpdateActionPoolBody +from airflow_client.client.models.bulk_create_action_connection_body import BulkCreateActionConnectionBody +from airflow_client.client.models.bulk_delete_action_connection_body import BulkDeleteActionConnectionBody +from airflow_client.client.models.bulk_update_action_connection_body import BulkUpdateActionConnectionBody from pydantic import StrictStr, Field from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self -ACTIONSINNER3_ONE_OF_SCHEMAS = ["BulkCreateActionPoolBody", "BulkDeleteActionPoolBody", "BulkUpdateActionPoolBody"] +ACTIONSINNER3_ONE_OF_SCHEMAS = ["BulkCreateActionConnectionBody", "BulkDeleteActionConnectionBody", "BulkUpdateActionConnectionBody"] class ActionsInner3(BaseModel): """ ActionsInner3 """ - # data type: BulkCreateActionPoolBody - oneof_schema_1_validator: Optional[BulkCreateActionPoolBody] = None - # data type: BulkUpdateActionPoolBody - oneof_schema_2_validator: Optional[BulkUpdateActionPoolBody] = None - # data type: BulkDeleteActionPoolBody - oneof_schema_3_validator: Optional[BulkDeleteActionPoolBody] = None - actual_instance: Optional[Union[BulkCreateActionPoolBody, BulkDeleteActionPoolBody, BulkUpdateActionPoolBody]] = None - one_of_schemas: Set[str] = { "BulkCreateActionPoolBody", "BulkDeleteActionPoolBody", "BulkUpdateActionPoolBody" } + # data type: BulkCreateActionConnectionBody + oneof_schema_1_validator: Optional[BulkCreateActionConnectionBody] = None + # data type: BulkUpdateActionConnectionBody + oneof_schema_2_validator: Optional[BulkUpdateActionConnectionBody] = None + # data type: BulkDeleteActionConnectionBody + oneof_schema_3_validator: Optional[BulkDeleteActionConnectionBody] = None + actual_instance: Optional[Union[BulkCreateActionConnectionBody, BulkDeleteActionConnectionBody, BulkUpdateActionConnectionBody]] = None + one_of_schemas: Set[str] = { "BulkCreateActionConnectionBody", "BulkDeleteActionConnectionBody", "BulkUpdateActionConnectionBody" } model_config = ConfigDict( validate_assignment=True, @@ -60,27 +60,27 @@ def actual_instance_must_validate_oneof(cls, v): instance = ActionsInner3.model_construct() error_messages = [] match = 0 - # validate data type: BulkCreateActionPoolBody - if not isinstance(v, BulkCreateActionPoolBody): - error_messages.append(f"Error! Input type `{type(v)}` is not `BulkCreateActionPoolBody`") + # validate data type: BulkCreateActionConnectionBody + if not isinstance(v, BulkCreateActionConnectionBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `BulkCreateActionConnectionBody`") else: match += 1 - # validate data type: BulkUpdateActionPoolBody - if not isinstance(v, BulkUpdateActionPoolBody): - error_messages.append(f"Error! Input type `{type(v)}` is not `BulkUpdateActionPoolBody`") + # validate data type: BulkUpdateActionConnectionBody + if not isinstance(v, BulkUpdateActionConnectionBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `BulkUpdateActionConnectionBody`") else: match += 1 - # validate data type: BulkDeleteActionPoolBody - if not isinstance(v, BulkDeleteActionPoolBody): - error_messages.append(f"Error! Input type `{type(v)}` is not `BulkDeleteActionPoolBody`") + # validate data type: BulkDeleteActionConnectionBody + if not isinstance(v, BulkDeleteActionConnectionBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `BulkDeleteActionConnectionBody`") else: match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in ActionsInner3 with oneOf schemas: BulkCreateActionPoolBody, BulkDeleteActionPoolBody, BulkUpdateActionPoolBody. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in ActionsInner3 with oneOf schemas: BulkCreateActionConnectionBody, BulkDeleteActionConnectionBody, BulkUpdateActionConnectionBody. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in ActionsInner3 with oneOf schemas: BulkCreateActionPoolBody, BulkDeleteActionPoolBody, BulkUpdateActionPoolBody. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in ActionsInner3 with oneOf schemas: BulkCreateActionConnectionBody, BulkDeleteActionConnectionBody, BulkUpdateActionConnectionBody. Details: " + ", ".join(error_messages)) else: return v @@ -95,31 +95,31 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 - # deserialize data into BulkCreateActionPoolBody + # deserialize data into BulkCreateActionConnectionBody try: - instance.actual_instance = BulkCreateActionPoolBody.from_json(json_str) + instance.actual_instance = BulkCreateActionConnectionBody.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # deserialize data into BulkUpdateActionPoolBody + # deserialize data into BulkUpdateActionConnectionBody try: - instance.actual_instance = BulkUpdateActionPoolBody.from_json(json_str) + instance.actual_instance = BulkUpdateActionConnectionBody.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # deserialize data into BulkDeleteActionPoolBody + # deserialize data into BulkDeleteActionConnectionBody try: - instance.actual_instance = BulkDeleteActionPoolBody.from_json(json_str) + instance.actual_instance = BulkDeleteActionConnectionBody.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into ActionsInner3 with oneOf schemas: BulkCreateActionPoolBody, BulkDeleteActionPoolBody, BulkUpdateActionPoolBody. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into ActionsInner3 with oneOf schemas: BulkCreateActionConnectionBody, BulkDeleteActionConnectionBody, BulkUpdateActionConnectionBody. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into ActionsInner3 with oneOf schemas: BulkCreateActionPoolBody, BulkDeleteActionPoolBody, BulkUpdateActionPoolBody. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into ActionsInner3 with oneOf schemas: BulkCreateActionConnectionBody, BulkDeleteActionConnectionBody, BulkUpdateActionConnectionBody. Details: " + ", ".join(error_messages)) else: return instance @@ -133,7 +133,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], BulkCreateActionPoolBody, BulkDeleteActionPoolBody, BulkUpdateActionPoolBody]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], BulkCreateActionConnectionBody, BulkDeleteActionConnectionBody, BulkUpdateActionConnectionBody]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/airflow_client/client/models/actions_inner4.py b/airflow_client/client/models/actions_inner4.py index b98d047c..24792469 100644 --- a/airflow_client/client/models/actions_inner4.py +++ b/airflow_client/client/models/actions_inner4.py @@ -17,27 +17,27 @@ import pprint from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional -from airflow_client.client.models.bulk_create_action_variable_body import BulkCreateActionVariableBody -from airflow_client.client.models.bulk_delete_action_variable_body import BulkDeleteActionVariableBody -from airflow_client.client.models.bulk_update_action_variable_body import BulkUpdateActionVariableBody +from airflow_client.client.models.bulk_create_action_pool_body import BulkCreateActionPoolBody +from airflow_client.client.models.bulk_delete_action_pool_body import BulkDeleteActionPoolBody +from airflow_client.client.models.bulk_update_action_pool_body import BulkUpdateActionPoolBody from pydantic import StrictStr, Field from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self -ACTIONSINNER4_ONE_OF_SCHEMAS = ["BulkCreateActionVariableBody", "BulkDeleteActionVariableBody", "BulkUpdateActionVariableBody"] +ACTIONSINNER4_ONE_OF_SCHEMAS = ["BulkCreateActionPoolBody", "BulkDeleteActionPoolBody", "BulkUpdateActionPoolBody"] class ActionsInner4(BaseModel): """ ActionsInner4 """ - # data type: BulkCreateActionVariableBody - oneof_schema_1_validator: Optional[BulkCreateActionVariableBody] = None - # data type: BulkUpdateActionVariableBody - oneof_schema_2_validator: Optional[BulkUpdateActionVariableBody] = None - # data type: BulkDeleteActionVariableBody - oneof_schema_3_validator: Optional[BulkDeleteActionVariableBody] = None - actual_instance: Optional[Union[BulkCreateActionVariableBody, BulkDeleteActionVariableBody, BulkUpdateActionVariableBody]] = None - one_of_schemas: Set[str] = { "BulkCreateActionVariableBody", "BulkDeleteActionVariableBody", "BulkUpdateActionVariableBody" } + # data type: BulkCreateActionPoolBody + oneof_schema_1_validator: Optional[BulkCreateActionPoolBody] = None + # data type: BulkUpdateActionPoolBody + oneof_schema_2_validator: Optional[BulkUpdateActionPoolBody] = None + # data type: BulkDeleteActionPoolBody + oneof_schema_3_validator: Optional[BulkDeleteActionPoolBody] = None + actual_instance: Optional[Union[BulkCreateActionPoolBody, BulkDeleteActionPoolBody, BulkUpdateActionPoolBody]] = None + one_of_schemas: Set[str] = { "BulkCreateActionPoolBody", "BulkDeleteActionPoolBody", "BulkUpdateActionPoolBody" } model_config = ConfigDict( validate_assignment=True, @@ -60,27 +60,27 @@ def actual_instance_must_validate_oneof(cls, v): instance = ActionsInner4.model_construct() error_messages = [] match = 0 - # validate data type: BulkCreateActionVariableBody - if not isinstance(v, BulkCreateActionVariableBody): - error_messages.append(f"Error! Input type `{type(v)}` is not `BulkCreateActionVariableBody`") + # validate data type: BulkCreateActionPoolBody + if not isinstance(v, BulkCreateActionPoolBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `BulkCreateActionPoolBody`") else: match += 1 - # validate data type: BulkUpdateActionVariableBody - if not isinstance(v, BulkUpdateActionVariableBody): - error_messages.append(f"Error! Input type `{type(v)}` is not `BulkUpdateActionVariableBody`") + # validate data type: BulkUpdateActionPoolBody + if not isinstance(v, BulkUpdateActionPoolBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `BulkUpdateActionPoolBody`") else: match += 1 - # validate data type: BulkDeleteActionVariableBody - if not isinstance(v, BulkDeleteActionVariableBody): - error_messages.append(f"Error! Input type `{type(v)}` is not `BulkDeleteActionVariableBody`") + # validate data type: BulkDeleteActionPoolBody + if not isinstance(v, BulkDeleteActionPoolBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `BulkDeleteActionPoolBody`") else: match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in ActionsInner4 with oneOf schemas: BulkCreateActionVariableBody, BulkDeleteActionVariableBody, BulkUpdateActionVariableBody. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in ActionsInner4 with oneOf schemas: BulkCreateActionPoolBody, BulkDeleteActionPoolBody, BulkUpdateActionPoolBody. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in ActionsInner4 with oneOf schemas: BulkCreateActionVariableBody, BulkDeleteActionVariableBody, BulkUpdateActionVariableBody. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in ActionsInner4 with oneOf schemas: BulkCreateActionPoolBody, BulkDeleteActionPoolBody, BulkUpdateActionPoolBody. Details: " + ", ".join(error_messages)) else: return v @@ -95,31 +95,31 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 - # deserialize data into BulkCreateActionVariableBody + # deserialize data into BulkCreateActionPoolBody try: - instance.actual_instance = BulkCreateActionVariableBody.from_json(json_str) + instance.actual_instance = BulkCreateActionPoolBody.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # deserialize data into BulkUpdateActionVariableBody + # deserialize data into BulkUpdateActionPoolBody try: - instance.actual_instance = BulkUpdateActionVariableBody.from_json(json_str) + instance.actual_instance = BulkUpdateActionPoolBody.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # deserialize data into BulkDeleteActionVariableBody + # deserialize data into BulkDeleteActionPoolBody try: - instance.actual_instance = BulkDeleteActionVariableBody.from_json(json_str) + instance.actual_instance = BulkDeleteActionPoolBody.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into ActionsInner4 with oneOf schemas: BulkCreateActionVariableBody, BulkDeleteActionVariableBody, BulkUpdateActionVariableBody. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into ActionsInner4 with oneOf schemas: BulkCreateActionPoolBody, BulkDeleteActionPoolBody, BulkUpdateActionPoolBody. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into ActionsInner4 with oneOf schemas: BulkCreateActionVariableBody, BulkDeleteActionVariableBody, BulkUpdateActionVariableBody. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into ActionsInner4 with oneOf schemas: BulkCreateActionPoolBody, BulkDeleteActionPoolBody, BulkUpdateActionPoolBody. Details: " + ", ".join(error_messages)) else: return instance @@ -133,7 +133,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], BulkCreateActionVariableBody, BulkDeleteActionVariableBody, BulkUpdateActionVariableBody]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], BulkCreateActionPoolBody, BulkDeleteActionPoolBody, BulkUpdateActionPoolBody]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/airflow_client/client/models/actions_inner5.py b/airflow_client/client/models/actions_inner5.py new file mode 100644 index 00000000..831a7cc8 --- /dev/null +++ b/airflow_client/client/models/actions_inner5.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from airflow_client.client.models.bulk_create_action_variable_body import BulkCreateActionVariableBody +from airflow_client.client.models.bulk_delete_action_variable_body import BulkDeleteActionVariableBody +from airflow_client.client.models.bulk_update_action_variable_body import BulkUpdateActionVariableBody +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +ACTIONSINNER5_ONE_OF_SCHEMAS = ["BulkCreateActionVariableBody", "BulkDeleteActionVariableBody", "BulkUpdateActionVariableBody"] + +class ActionsInner5(BaseModel): + """ + ActionsInner5 + """ + # data type: BulkCreateActionVariableBody + oneof_schema_1_validator: Optional[BulkCreateActionVariableBody] = None + # data type: BulkUpdateActionVariableBody + oneof_schema_2_validator: Optional[BulkUpdateActionVariableBody] = None + # data type: BulkDeleteActionVariableBody + oneof_schema_3_validator: Optional[BulkDeleteActionVariableBody] = None + actual_instance: Optional[Union[BulkCreateActionVariableBody, BulkDeleteActionVariableBody, BulkUpdateActionVariableBody]] = None + one_of_schemas: Set[str] = { "BulkCreateActionVariableBody", "BulkDeleteActionVariableBody", "BulkUpdateActionVariableBody" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ActionsInner5.model_construct() + error_messages = [] + match = 0 + # validate data type: BulkCreateActionVariableBody + if not isinstance(v, BulkCreateActionVariableBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `BulkCreateActionVariableBody`") + else: + match += 1 + # validate data type: BulkUpdateActionVariableBody + if not isinstance(v, BulkUpdateActionVariableBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `BulkUpdateActionVariableBody`") + else: + match += 1 + # validate data type: BulkDeleteActionVariableBody + if not isinstance(v, BulkDeleteActionVariableBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `BulkDeleteActionVariableBody`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ActionsInner5 with oneOf schemas: BulkCreateActionVariableBody, BulkDeleteActionVariableBody, BulkUpdateActionVariableBody. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ActionsInner5 with oneOf schemas: BulkCreateActionVariableBody, BulkDeleteActionVariableBody, BulkUpdateActionVariableBody. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into BulkCreateActionVariableBody + try: + instance.actual_instance = BulkCreateActionVariableBody.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into BulkUpdateActionVariableBody + try: + instance.actual_instance = BulkUpdateActionVariableBody.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into BulkDeleteActionVariableBody + try: + instance.actual_instance = BulkDeleteActionVariableBody.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ActionsInner5 with oneOf schemas: BulkCreateActionVariableBody, BulkDeleteActionVariableBody, BulkUpdateActionVariableBody. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ActionsInner5 with oneOf schemas: BulkCreateActionVariableBody, BulkDeleteActionVariableBody, BulkUpdateActionVariableBody. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], BulkCreateActionVariableBody, BulkDeleteActionVariableBody, BulkUpdateActionVariableBody]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/airflow_client/client/models/all_inner.py b/airflow_client/client/models/all_inner.py new file mode 100644 index 00000000..7d3c3597 --- /dev/null +++ b/airflow_client/client/models/all_inner.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from airflow_client.client.models.asset_expression_alias import AssetExpressionAlias +from airflow_client.client.models.asset_expression_asset import AssetExpressionAsset +from airflow_client.client.models.asset_expression_ref import AssetExpressionRef +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +ALLINNER_ONE_OF_SCHEMAS = ["AssetExpressionAlias", "AssetExpressionAll", "AssetExpressionAny", "AssetExpressionAsset", "AssetExpressionRef"] + +class AllInner(BaseModel): + """ + AllInner + """ + # data type: AssetExpressionAsset + oneof_schema_1_validator: Optional[AssetExpressionAsset] = None + # data type: AssetExpressionAlias + oneof_schema_2_validator: Optional[AssetExpressionAlias] = None + # data type: AssetExpressionRef + oneof_schema_3_validator: Optional[AssetExpressionRef] = None + # data type: AssetExpressionAny + oneof_schema_4_validator: Optional[AssetExpressionAny] = None + # data type: AssetExpressionAll + oneof_schema_5_validator: Optional[AssetExpressionAll] = None + actual_instance: Optional[Union[AssetExpressionAlias, AssetExpressionAll, AssetExpressionAny, AssetExpressionAsset, AssetExpressionRef]] = None + one_of_schemas: Set[str] = { "AssetExpressionAlias", "AssetExpressionAll", "AssetExpressionAny", "AssetExpressionAsset", "AssetExpressionRef" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = AllInner.model_construct() + error_messages = [] + match = 0 + # validate data type: AssetExpressionAsset + if not isinstance(v, AssetExpressionAsset): + error_messages.append(f"Error! Input type `{type(v)}` is not `AssetExpressionAsset`") + else: + match += 1 + # validate data type: AssetExpressionAlias + if not isinstance(v, AssetExpressionAlias): + error_messages.append(f"Error! Input type `{type(v)}` is not `AssetExpressionAlias`") + else: + match += 1 + # validate data type: AssetExpressionRef + if not isinstance(v, AssetExpressionRef): + error_messages.append(f"Error! Input type `{type(v)}` is not `AssetExpressionRef`") + else: + match += 1 + # validate data type: AssetExpressionAny + if not isinstance(v, AssetExpressionAny): + error_messages.append(f"Error! Input type `{type(v)}` is not `AssetExpressionAny`") + else: + match += 1 + # validate data type: AssetExpressionAll + if not isinstance(v, AssetExpressionAll): + error_messages.append(f"Error! Input type `{type(v)}` is not `AssetExpressionAll`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in AllInner with oneOf schemas: AssetExpressionAlias, AssetExpressionAll, AssetExpressionAny, AssetExpressionAsset, AssetExpressionRef. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in AllInner with oneOf schemas: AssetExpressionAlias, AssetExpressionAll, AssetExpressionAny, AssetExpressionAsset, AssetExpressionRef. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into AssetExpressionAsset + try: + instance.actual_instance = AssetExpressionAsset.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AssetExpressionAlias + try: + instance.actual_instance = AssetExpressionAlias.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AssetExpressionRef + try: + instance.actual_instance = AssetExpressionRef.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AssetExpressionAny + try: + instance.actual_instance = AssetExpressionAny.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AssetExpressionAll + try: + instance.actual_instance = AssetExpressionAll.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into AllInner with oneOf schemas: AssetExpressionAlias, AssetExpressionAll, AssetExpressionAny, AssetExpressionAsset, AssetExpressionRef. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into AllInner with oneOf schemas: AssetExpressionAlias, AssetExpressionAll, AssetExpressionAny, AssetExpressionAsset, AssetExpressionRef. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], AssetExpressionAlias, AssetExpressionAll, AssetExpressionAny, AssetExpressionAsset, AssetExpressionRef]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + +from airflow_client.client.models.asset_expression_all import AssetExpressionAll +from airflow_client.client.models.asset_expression_any import AssetExpressionAny +# TODO: Rewrite to not use raise_errors +AllInner.model_rebuild(raise_errors=False) + diff --git a/airflow_client/client/models/asset_event_response.py b/airflow_client/client/models/asset_event_response.py index fdde12a9..b95b7899 100644 --- a/airflow_client/client/models/asset_event_response.py +++ b/airflow_client/client/models/asset_event_response.py @@ -20,6 +20,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID from airflow_client.client.models.dag_run_asset_reference import DagRunAssetReference from typing import Optional, Set from typing_extensions import Self @@ -40,9 +41,10 @@ class AssetEventResponse(BaseModel): source_map_index: StrictInt source_run_id: Optional[StrictStr] = None source_task_id: Optional[StrictStr] = None + source_task_instance_id: Optional[UUID] = None timestamp: datetime uri: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["asset_id", "created_dagruns", "extra", "group", "id", "name", "partition_key", "source_dag_id", "source_map_index", "source_run_id", "source_task_id", "timestamp", "uri"] + __properties: ClassVar[List[str]] = ["asset_id", "created_dagruns", "extra", "group", "id", "name", "partition_key", "source_dag_id", "source_map_index", "source_run_id", "source_task_id", "source_task_instance_id", "timestamp", "uri"] model_config = ConfigDict( validate_by_name=True, @@ -112,6 +114,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "source_map_index": obj.get("source_map_index"), "source_run_id": obj.get("source_run_id"), "source_task_id": obj.get("source_task_id"), + "source_task_instance_id": obj.get("source_task_instance_id"), "timestamp": obj.get("timestamp"), "uri": obj.get("uri") }) diff --git a/airflow_client/client/models/asset_expression_alias.py b/airflow_client/client/models/asset_expression_alias.py new file mode 100644 index 00000000..2baf1253 --- /dev/null +++ b/airflow_client/client/models/asset_expression_alias.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from airflow_client.client.models.asset_expression_alias_info import AssetExpressionAliasInfo +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssetExpressionAlias(BaseModel): + """ + An asset alias leaf: ``{\"alias\": {\"name\": ..., \"group\": ...}}``. + """ # noqa: E501 + alias: AssetExpressionAliasInfo + __properties: ClassVar[List[str]] = ["alias"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssetExpressionAlias from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of alias + if self.alias: + _dict['alias'] = self.alias.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssetExpressionAlias from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alias": AssetExpressionAliasInfo.from_dict(obj["alias"]) if obj.get("alias") is not None else None + }) + return _obj + + diff --git a/airflow_client/client/models/asset_expression_alias_info.py b/airflow_client/client/models/asset_expression_alias_info.py new file mode 100644 index 00000000..27c15ee9 --- /dev/null +++ b/airflow_client/client/models/asset_expression_alias_info.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssetExpressionAliasInfo(BaseModel): + """ + Body of an ``alias`` leaf node. + """ # noqa: E501 + group: StrictStr + name: StrictStr + __properties: ClassVar[List[str]] = ["group", "name"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssetExpressionAliasInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssetExpressionAliasInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group": obj.get("group"), + "name": obj.get("name") + }) + return _obj + + diff --git a/airflow_client/client/models/asset_expression_all.py b/airflow_client/client/models/asset_expression_all.py new file mode 100644 index 00000000..8cd36254 --- /dev/null +++ b/airflow_client/client/models/asset_expression_all.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssetExpressionAll(BaseModel): + """ + An \"and\" node: ``{\"all\": [...]}`` -- satisfied when all children are satisfied. + """ # noqa: E501 + all: List[AllInner] + __properties: ClassVar[List[str]] = ["all"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssetExpressionAll from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in all (list) + _items = [] + if self.all: + for _item_all in self.all: + _items.append(_item_all.to_dict() if _item_all is not None else None) + _dict['all'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssetExpressionAll from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "all": [AllInner.from_dict(_item) for _item in obj["all"]] if obj.get("all") is not None else None + }) + return _obj + +from airflow_client.client.models.all_inner import AllInner +# TODO: Rewrite to not use raise_errors +AssetExpressionAll.model_rebuild(raise_errors=False) + diff --git a/airflow_client/client/models/asset_expression_any.py b/airflow_client/client/models/asset_expression_any.py new file mode 100644 index 00000000..5c787982 --- /dev/null +++ b/airflow_client/client/models/asset_expression_any.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssetExpressionAny(BaseModel): + """ + An \"or\" node: ``{\"any\": [...]}`` -- satisfied when any child is satisfied. + """ # noqa: E501 + any: List[AllInner] + __properties: ClassVar[List[str]] = ["any"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssetExpressionAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in any (list) + _items = [] + if self.any: + for _item_any in self.any: + _items.append(_item_any.to_dict() if _item_any is not None else None) + _dict['any'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssetExpressionAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "any": [AllInner.from_dict(_item) for _item in obj["any"]] if obj.get("any") is not None else None + }) + return _obj + +from airflow_client.client.models.all_inner import AllInner +# TODO: Rewrite to not use raise_errors +AssetExpressionAny.model_rebuild(raise_errors=False) + diff --git a/airflow_client/client/models/asset_expression_asset.py b/airflow_client/client/models/asset_expression_asset.py new file mode 100644 index 00000000..acb3c74a --- /dev/null +++ b/airflow_client/client/models/asset_expression_asset.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from airflow_client.client.models.asset_expression_asset_info import AssetExpressionAssetInfo +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssetExpressionAsset(BaseModel): + """ + An asset leaf: ``{\"asset\": {\"uri\": ..., \"name\": ..., \"group\": ...}}``. + """ # noqa: E501 + asset: AssetExpressionAssetInfo + __properties: ClassVar[List[str]] = ["asset"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssetExpressionAsset from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of asset + if self.asset: + _dict['asset'] = self.asset.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssetExpressionAsset from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset": AssetExpressionAssetInfo.from_dict(obj["asset"]) if obj.get("asset") is not None else None + }) + return _obj + + diff --git a/airflow_client/client/models/asset_expression_asset_info.py b/airflow_client/client/models/asset_expression_asset_info.py new file mode 100644 index 00000000..d713f20e --- /dev/null +++ b/airflow_client/client/models/asset_expression_asset_info.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssetExpressionAssetInfo(BaseModel): + """ + Body of an ``asset`` leaf node. ``id`` is injected by ``DagModelOperation.update_dag_asset_expression`` when the expression is persisted; ``BaseAsset.as_expression()`` itself only emits ``uri``/``name``/``group``. It is left optional so a row persisted before id-enrichment (or migrated from the pre-3.0 dataset format) degrades gracefully instead of failing response validation. A leaf the caller is not authorized to read is served with ``hidden`` set and ``uri``, ``name`` and ``id`` blanked (see ``airflow.api_fastapi.common.asset_expression``), so the shape of the schedule stays visible without revealing which asset it waits on. + """ # noqa: E501 + group: StrictStr + hidden: Optional[StrictBool] = False + id: Optional[StrictInt] = None + name: Optional[StrictStr] = None + uri: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["group", "hidden", "id", "name", "uri"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssetExpressionAssetInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssetExpressionAssetInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group": obj.get("group"), + "hidden": obj.get("hidden") if obj.get("hidden") is not None else False, + "id": obj.get("id"), + "name": obj.get("name"), + "uri": obj.get("uri") + }) + return _obj + + diff --git a/airflow_client/client/models/asset_expression_ref.py b/airflow_client/client/models/asset_expression_ref.py new file mode 100644 index 00000000..b2042c70 --- /dev/null +++ b/airflow_client/client/models/asset_expression_ref.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssetExpressionRef(BaseModel): + """ + An unresolved asset reference leaf: ``{\"asset_ref\": {\"name\": ...}}`` or ``{\"asset_ref\": {\"uri\": ...}}``. + """ # noqa: E501 + asset_ref: Dict[str, StrictStr] + __properties: ClassVar[List[str]] = ["asset_ref"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssetExpressionRef from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssetExpressionRef from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asset_ref": obj.get("asset_ref") + }) + return _obj + + diff --git a/airflow_client/client/models/asset_state_store_last_updated_by.py b/airflow_client/client/models/asset_state_store_last_updated_by.py index 33e0b9b2..567d90fc 100644 --- a/airflow_client/client/models/asset_state_store_last_updated_by.py +++ b/airflow_client/client/models/asset_state_store_last_updated_by.py @@ -19,6 +19,7 @@ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID from airflow_client.client.models.asset_state_store_writer_kind import AssetStateStoreWriterKind from typing import Optional, Set from typing_extensions import Self @@ -31,9 +32,13 @@ class AssetStateStoreLastUpdatedBy(BaseModel): dag_id: Optional[StrictStr] = None kind: AssetStateStoreWriterKind map_index: Optional[StrictInt] = None + region_id: Optional[UUID] = None + region_index: Optional[StrictInt] = None run_id: Optional[StrictStr] = None task_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["dag_id", "kind", "map_index", "run_id", "task_id"] + task_instance_id: Optional[UUID] = None + try_number: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["dag_id", "kind", "map_index", "region_id", "region_index", "run_id", "task_id", "task_instance_id", "try_number"] model_config = ConfigDict( validate_by_name=True, @@ -89,8 +94,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "dag_id": obj.get("dag_id"), "kind": obj.get("kind"), "map_index": obj.get("map_index"), + "region_id": obj.get("region_id"), + "region_index": obj.get("region_index"), "run_id": obj.get("run_id"), - "task_id": obj.get("task_id") + "task_id": obj.get("task_id"), + "task_instance_id": obj.get("task_instance_id"), + "try_number": obj.get("try_number") }) return _obj diff --git a/airflow_client/client/models/backfill_dag_run_collection_response.py b/airflow_client/client/models/backfill_dag_run_collection_response.py new file mode 100644 index 00000000..f2978488 --- /dev/null +++ b/airflow_client/client/models/backfill_dag_run_collection_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from airflow_client.client.models.backfill_dag_run_response import BackfillDagRunResponse +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class BackfillDagRunCollectionResponse(BaseModel): + """ + BackfillDagRun Collection serializer for responses. + """ # noqa: E501 + backfill_dag_runs: List[BackfillDagRunResponse] + total_entries: StrictInt + __properties: ClassVar[List[str]] = ["backfill_dag_runs", "total_entries"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BackfillDagRunCollectionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in backfill_dag_runs (list) + _items = [] + if self.backfill_dag_runs: + for _item_backfill_dag_runs in self.backfill_dag_runs: + _items.append(_item_backfill_dag_runs.to_dict() if _item_backfill_dag_runs is not None else None) + _dict['backfill_dag_runs'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BackfillDagRunCollectionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "backfill_dag_runs": [BackfillDagRunResponse.from_dict(_item) for _item in obj["backfill_dag_runs"]] if obj.get("backfill_dag_runs") is not None else None, + "total_entries": obj.get("total_entries") + }) + return _obj + + diff --git a/airflow_client/client/models/backfill_dag_run_response.py b/airflow_client/client/models/backfill_dag_run_response.py new file mode 100644 index 00000000..1859ac7c --- /dev/null +++ b/airflow_client/client/models/backfill_dag_run_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from airflow_client.client.models.dag_run_state import DagRunState +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class BackfillDagRunResponse(BaseModel): + """ + Serializer for a single BackfillDagRun entry with joined DagRun state. + """ # noqa: E501 + backfill_id: Annotated[int, Field(strict=True, ge=0)] + dag_id: StrictStr + dag_run_id: Optional[StrictStr] = None + dag_run_state: Optional[DagRunState] = None + exception_reason: Optional[StrictStr] = None + id: Annotated[int, Field(strict=True, ge=0)] + logical_date: Optional[datetime] = None + partition_key: Optional[StrictStr] = None + sort_ordinal: StrictInt + __properties: ClassVar[List[str]] = ["backfill_id", "dag_id", "dag_run_id", "dag_run_state", "exception_reason", "id", "logical_date", "partition_key", "sort_ordinal"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BackfillDagRunResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BackfillDagRunResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "backfill_id": obj.get("backfill_id"), + "dag_id": obj.get("dag_id"), + "dag_run_id": obj.get("dag_run_id"), + "dag_run_state": obj.get("dag_run_state"), + "exception_reason": obj.get("exception_reason"), + "id": obj.get("id"), + "logical_date": obj.get("logical_date"), + "partition_key": obj.get("partition_key"), + "sort_ordinal": obj.get("sort_ordinal") + }) + return _obj + + diff --git a/airflow_client/client/models/backfill_post_body.py b/airflow_client/client/models/backfill_post_body.py index 2abe0a49..e4c1a2f8 100644 --- a/airflow_client/client/models/backfill_post_body.py +++ b/airflow_client/client/models/backfill_post_body.py @@ -18,8 +18,9 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from airflow_client.client.models.reprocess_behavior import ReprocessBehavior from typing import Optional, Set from typing_extensions import Self @@ -31,14 +32,15 @@ class BackfillPostBody(BaseModel): """ # noqa: E501 dag_id: StrictStr dag_run_conf: Optional[Dict[str, Any]] = None + drain_dag: Optional[StrictBool] = Field(default=False, description="Drain the Dag together with the backfill. Draining changes the whole Dag: unfinished runs can start or resume except those held by paused backfills. No scheduled runs are created, and the Dag pauses once all unfinished runs finish. Paused backfills must be resumed for draining to complete. Requires the same permission as pausing the Dag. Ignored by the dry-run endpoint.") from_date: datetime - max_active_runs: Optional[StrictInt] = 10 + max_active_runs: Optional[Annotated[int, Field(strict=True, ge=1)]] = 10 reprocess_behavior: Optional[ReprocessBehavior] = None run_backwards: Optional[StrictBool] = False run_on_latest_version: Optional[StrictBool] = None to_date: datetime additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["dag_id", "dag_run_conf", "from_date", "max_active_runs", "reprocess_behavior", "run_backwards", "run_on_latest_version", "to_date"] + __properties: ClassVar[List[str]] = ["dag_id", "dag_run_conf", "drain_dag", "from_date", "max_active_runs", "reprocess_behavior", "run_backwards", "run_on_latest_version", "to_date"] model_config = ConfigDict( validate_by_name=True, @@ -100,6 +102,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "dag_id": obj.get("dag_id"), "dag_run_conf": obj.get("dag_run_conf"), + "drain_dag": obj.get("drain_dag") if obj.get("drain_dag") is not None else False, "from_date": obj.get("from_date"), "max_active_runs": obj.get("max_active_runs") if obj.get("max_active_runs") is not None else 10, "reprocess_behavior": obj.get("reprocess_behavior"), diff --git a/airflow_client/client/models/base_info_response.py b/airflow_client/client/models/base_info_response.py index a89ceaca..4ff23495 100644 --- a/airflow_client/client/models/base_info_response.py +++ b/airflow_client/client/models/base_info_response.py @@ -17,8 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional +from airflow_client.client.models.health_status import HealthStatus from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -27,7 +28,7 @@ class BaseInfoResponse(BaseModel): """ Base info serializer for responses. """ # noqa: E501 - status: Optional[StrictStr] = None + status: Optional[HealthStatus] = None __properties: ClassVar[List[str]] = ["status"] model_config = ConfigDict( diff --git a/airflow_client/client/models/bulk_body_bulk_dag_body.py b/airflow_client/client/models/bulk_body_bulk_dag_body.py new file mode 100644 index 00000000..a1c7ab8a --- /dev/null +++ b/airflow_client/client/models/bulk_body_bulk_dag_body.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from airflow_client.client.models.actions_inner import ActionsInner +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class BulkBodyBulkDAGBody(BaseModel): + """ + BulkBodyBulkDAGBody + """ # noqa: E501 + actions: List[ActionsInner] + __properties: ClassVar[List[str]] = ["actions"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BulkBodyBulkDAGBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in actions (list) + _items = [] + if self.actions: + for _item_actions in self.actions: + _items.append(_item_actions.to_dict() if _item_actions is not None else None) + _dict['actions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BulkBodyBulkDAGBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "actions": [ActionsInner.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None + }) + return _obj + + diff --git a/airflow_client/client/models/bulk_body_bulk_dag_run_body.py b/airflow_client/client/models/bulk_body_bulk_dag_run_body.py index 507d5268..e989a4b5 100644 --- a/airflow_client/client/models/bulk_body_bulk_dag_run_body.py +++ b/airflow_client/client/models/bulk_body_bulk_dag_run_body.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from airflow_client.client.models.actions_inner import ActionsInner +from airflow_client.client.models.actions_inner1 import ActionsInner1 from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -28,7 +28,7 @@ class BulkBodyBulkDAGRunBody(BaseModel): """ BulkBodyBulkDAGRunBody """ # noqa: E501 - actions: List[ActionsInner] + actions: List[ActionsInner1] __properties: ClassVar[List[str]] = ["actions"] model_config = ConfigDict( @@ -88,7 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "actions": [ActionsInner.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None + "actions": [ActionsInner1.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None }) return _obj diff --git a/airflow_client/client/models/bulk_body_bulk_task_instance_body.py b/airflow_client/client/models/bulk_body_bulk_task_instance_body.py index 6ee03752..de491ef7 100644 --- a/airflow_client/client/models/bulk_body_bulk_task_instance_body.py +++ b/airflow_client/client/models/bulk_body_bulk_task_instance_body.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from airflow_client.client.models.actions_inner1 import ActionsInner1 +from airflow_client.client.models.actions_inner2 import ActionsInner2 from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -28,7 +28,7 @@ class BulkBodyBulkTaskInstanceBody(BaseModel): """ BulkBodyBulkTaskInstanceBody """ # noqa: E501 - actions: List[ActionsInner1] + actions: List[ActionsInner2] __properties: ClassVar[List[str]] = ["actions"] model_config = ConfigDict( @@ -88,7 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "actions": [ActionsInner1.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None + "actions": [ActionsInner2.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None }) return _obj diff --git a/airflow_client/client/models/bulk_body_connection_body.py b/airflow_client/client/models/bulk_body_connection_body.py index cb276039..054493fd 100644 --- a/airflow_client/client/models/bulk_body_connection_body.py +++ b/airflow_client/client/models/bulk_body_connection_body.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from airflow_client.client.models.actions_inner2 import ActionsInner2 +from airflow_client.client.models.actions_inner3 import ActionsInner3 from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -28,7 +28,7 @@ class BulkBodyConnectionBody(BaseModel): """ BulkBodyConnectionBody """ # noqa: E501 - actions: List[ActionsInner2] + actions: List[ActionsInner3] __properties: ClassVar[List[str]] = ["actions"] model_config = ConfigDict( @@ -88,7 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "actions": [ActionsInner2.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None + "actions": [ActionsInner3.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None }) return _obj diff --git a/airflow_client/client/models/bulk_body_pool_body.py b/airflow_client/client/models/bulk_body_pool_body.py index ac0485a0..076d6dbe 100644 --- a/airflow_client/client/models/bulk_body_pool_body.py +++ b/airflow_client/client/models/bulk_body_pool_body.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from airflow_client.client.models.actions_inner3 import ActionsInner3 +from airflow_client.client.models.actions_inner4 import ActionsInner4 from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -28,7 +28,7 @@ class BulkBodyPoolBody(BaseModel): """ BulkBodyPoolBody """ # noqa: E501 - actions: List[ActionsInner3] + actions: List[ActionsInner4] __properties: ClassVar[List[str]] = ["actions"] model_config = ConfigDict( @@ -88,7 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "actions": [ActionsInner3.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None + "actions": [ActionsInner4.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None }) return _obj diff --git a/airflow_client/client/models/bulk_body_variable_body.py b/airflow_client/client/models/bulk_body_variable_body.py index eacedb50..0cf7047e 100644 --- a/airflow_client/client/models/bulk_body_variable_body.py +++ b/airflow_client/client/models/bulk_body_variable_body.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from airflow_client.client.models.actions_inner4 import ActionsInner4 +from airflow_client.client.models.actions_inner5 import ActionsInner5 from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -28,7 +28,7 @@ class BulkBodyVariableBody(BaseModel): """ BulkBodyVariableBody """ # noqa: E501 - actions: List[ActionsInner4] + actions: List[ActionsInner5] __properties: ClassVar[List[str]] = ["actions"] model_config = ConfigDict( @@ -88,7 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "actions": [ActionsInner4.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None + "actions": [ActionsInner5.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None }) return _obj diff --git a/airflow_client/client/models/bulk_create_action_bulk_dag_body.py b/airflow_client/client/models/bulk_create_action_bulk_dag_body.py new file mode 100644 index 00000000..b4ff7c2d --- /dev/null +++ b/airflow_client/client/models/bulk_create_action_bulk_dag_body.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from airflow_client.client.models.bulk_action_on_existence import BulkActionOnExistence +from airflow_client.client.models.bulk_dag_body import BulkDAGBody +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class BulkCreateActionBulkDAGBody(BaseModel): + """ + BulkCreateActionBulkDAGBody + """ # noqa: E501 + action: StrictStr = Field(description="The action to be performed on the entities.") + action_on_existence: Optional[BulkActionOnExistence] = None + entities: List[BulkDAGBody] = Field(description="A list of entities to be created.") + __properties: ClassVar[List[str]] = ["action", "action_on_existence", "entities"] + + @field_validator('action') + def action_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['create']): + raise ValueError("must be one of enum values ('create')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BulkCreateActionBulkDAGBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in entities (list) + _items = [] + if self.entities: + for _item_entities in self.entities: + _items.append(_item_entities.to_dict() if _item_entities is not None else None) + _dict['entities'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BulkCreateActionBulkDAGBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "action": obj.get("action"), + "action_on_existence": obj.get("action_on_existence"), + "entities": [BulkDAGBody.from_dict(_item) for _item in obj["entities"]] if obj.get("entities") is not None else None + }) + return _obj + + diff --git a/airflow_client/client/models/bulk_dag_body.py b/airflow_client/client/models/bulk_dag_body.py new file mode 100644 index 00000000..4ca3b00c --- /dev/null +++ b/airflow_client/client/models/bulk_dag_body.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from airflow_client.client.models.dag_scheduling_state import DagSchedulingState +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class BulkDAGBody(BaseModel): + """ + Request body for bulk update of Dags. + """ # noqa: E501 + dag_id: StrictStr + is_paused: Optional[StrictBool] = None + scheduling_state: Optional[DagSchedulingState] = None + __properties: ClassVar[List[str]] = ["dag_id", "is_paused", "scheduling_state"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BulkDAGBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BulkDAGBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dag_id": obj.get("dag_id"), + "is_paused": obj.get("is_paused"), + "scheduling_state": obj.get("scheduling_state") + }) + return _obj + + diff --git a/airflow_client/client/models/bulk_delete_action_bulk_dag_body.py b/airflow_client/client/models/bulk_delete_action_bulk_dag_body.py new file mode 100644 index 00000000..42d5f08b --- /dev/null +++ b/airflow_client/client/models/bulk_delete_action_bulk_dag_body.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from airflow_client.client.models.bulk_action_not_on_existence import BulkActionNotOnExistence +from airflow_client.client.models.entities_inner import EntitiesInner +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class BulkDeleteActionBulkDAGBody(BaseModel): + """ + BulkDeleteActionBulkDAGBody + """ # noqa: E501 + action: StrictStr = Field(description="The action to be performed on the entities.") + action_on_non_existence: Optional[BulkActionNotOnExistence] = None + entities: List[EntitiesInner] = Field(description="A list of entity id/key or entity objects to be deleted.") + __properties: ClassVar[List[str]] = ["action", "action_on_non_existence", "entities"] + + @field_validator('action') + def action_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['delete']): + raise ValueError("must be one of enum values ('delete')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BulkDeleteActionBulkDAGBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in entities (list) + _items = [] + if self.entities: + for _item_entities in self.entities: + _items.append(_item_entities.to_dict() if _item_entities is not None else None) + _dict['entities'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BulkDeleteActionBulkDAGBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "action": obj.get("action"), + "action_on_non_existence": obj.get("action_on_non_existence"), + "entities": [EntitiesInner.from_dict(_item) for _item in obj["entities"]] if obj.get("entities") is not None else None + }) + return _obj + + diff --git a/airflow_client/client/models/bulk_delete_action_bulk_dag_run_body.py b/airflow_client/client/models/bulk_delete_action_bulk_dag_run_body.py index 218e0f91..acae5773 100644 --- a/airflow_client/client/models/bulk_delete_action_bulk_dag_run_body.py +++ b/airflow_client/client/models/bulk_delete_action_bulk_dag_run_body.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from airflow_client.client.models.bulk_action_not_on_existence import BulkActionNotOnExistence -from airflow_client.client.models.entities_inner import EntitiesInner +from airflow_client.client.models.entities_inner1 import EntitiesInner1 from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -31,7 +31,7 @@ class BulkDeleteActionBulkDAGRunBody(BaseModel): """ # noqa: E501 action: StrictStr = Field(description="The action to be performed on the entities.") action_on_non_existence: Optional[BulkActionNotOnExistence] = None - entities: List[EntitiesInner] = Field(description="A list of entity id/key or entity objects to be deleted.") + entities: List[EntitiesInner1] = Field(description="A list of entity id/key or entity objects to be deleted.") __properties: ClassVar[List[str]] = ["action", "action_on_non_existence", "entities"] @field_validator('action') @@ -100,7 +100,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "action": obj.get("action"), "action_on_non_existence": obj.get("action_on_non_existence"), - "entities": [EntitiesInner.from_dict(_item) for _item in obj["entities"]] if obj.get("entities") is not None else None + "entities": [EntitiesInner1.from_dict(_item) for _item in obj["entities"]] if obj.get("entities") is not None else None }) return _obj diff --git a/airflow_client/client/models/bulk_delete_action_bulk_task_instance_body.py b/airflow_client/client/models/bulk_delete_action_bulk_task_instance_body.py index bbad76aa..545032ce 100644 --- a/airflow_client/client/models/bulk_delete_action_bulk_task_instance_body.py +++ b/airflow_client/client/models/bulk_delete_action_bulk_task_instance_body.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from airflow_client.client.models.bulk_action_not_on_existence import BulkActionNotOnExistence -from airflow_client.client.models.entities_inner1 import EntitiesInner1 +from airflow_client.client.models.entities_inner2 import EntitiesInner2 from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -31,7 +31,7 @@ class BulkDeleteActionBulkTaskInstanceBody(BaseModel): """ # noqa: E501 action: StrictStr = Field(description="The action to be performed on the entities.") action_on_non_existence: Optional[BulkActionNotOnExistence] = None - entities: List[EntitiesInner1] = Field(description="A list of entity id/key or entity objects to be deleted.") + entities: List[EntitiesInner2] = Field(description="A list of entity id/key or entity objects to be deleted.") __properties: ClassVar[List[str]] = ["action", "action_on_non_existence", "entities"] @field_validator('action') @@ -100,7 +100,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "action": obj.get("action"), "action_on_non_existence": obj.get("action_on_non_existence"), - "entities": [EntitiesInner1.from_dict(_item) for _item in obj["entities"]] if obj.get("entities") is not None else None + "entities": [EntitiesInner2.from_dict(_item) for _item in obj["entities"]] if obj.get("entities") is not None else None }) return _obj diff --git a/airflow_client/client/models/bulk_delete_action_connection_body.py b/airflow_client/client/models/bulk_delete_action_connection_body.py index 7f3a467b..afc69c07 100644 --- a/airflow_client/client/models/bulk_delete_action_connection_body.py +++ b/airflow_client/client/models/bulk_delete_action_connection_body.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from airflow_client.client.models.bulk_action_not_on_existence import BulkActionNotOnExistence -from airflow_client.client.models.entities_inner2 import EntitiesInner2 +from airflow_client.client.models.entities_inner3 import EntitiesInner3 from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -31,7 +31,7 @@ class BulkDeleteActionConnectionBody(BaseModel): """ # noqa: E501 action: StrictStr = Field(description="The action to be performed on the entities.") action_on_non_existence: Optional[BulkActionNotOnExistence] = None - entities: List[EntitiesInner2] = Field(description="A list of entity id/key or entity objects to be deleted.") + entities: List[EntitiesInner3] = Field(description="A list of entity id/key or entity objects to be deleted.") __properties: ClassVar[List[str]] = ["action", "action_on_non_existence", "entities"] @field_validator('action') @@ -100,7 +100,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "action": obj.get("action"), "action_on_non_existence": obj.get("action_on_non_existence"), - "entities": [EntitiesInner2.from_dict(_item) for _item in obj["entities"]] if obj.get("entities") is not None else None + "entities": [EntitiesInner3.from_dict(_item) for _item in obj["entities"]] if obj.get("entities") is not None else None }) return _obj diff --git a/airflow_client/client/models/bulk_delete_action_pool_body.py b/airflow_client/client/models/bulk_delete_action_pool_body.py index c2f01b23..35468068 100644 --- a/airflow_client/client/models/bulk_delete_action_pool_body.py +++ b/airflow_client/client/models/bulk_delete_action_pool_body.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from airflow_client.client.models.bulk_action_not_on_existence import BulkActionNotOnExistence -from airflow_client.client.models.entities_inner3 import EntitiesInner3 +from airflow_client.client.models.entities_inner4 import EntitiesInner4 from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -31,7 +31,7 @@ class BulkDeleteActionPoolBody(BaseModel): """ # noqa: E501 action: StrictStr = Field(description="The action to be performed on the entities.") action_on_non_existence: Optional[BulkActionNotOnExistence] = None - entities: List[EntitiesInner3] = Field(description="A list of entity id/key or entity objects to be deleted.") + entities: List[EntitiesInner4] = Field(description="A list of entity id/key or entity objects to be deleted.") __properties: ClassVar[List[str]] = ["action", "action_on_non_existence", "entities"] @field_validator('action') @@ -100,7 +100,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "action": obj.get("action"), "action_on_non_existence": obj.get("action_on_non_existence"), - "entities": [EntitiesInner3.from_dict(_item) for _item in obj["entities"]] if obj.get("entities") is not None else None + "entities": [EntitiesInner4.from_dict(_item) for _item in obj["entities"]] if obj.get("entities") is not None else None }) return _obj diff --git a/airflow_client/client/models/bulk_delete_action_variable_body.py b/airflow_client/client/models/bulk_delete_action_variable_body.py index 540008e7..5eae3c52 100644 --- a/airflow_client/client/models/bulk_delete_action_variable_body.py +++ b/airflow_client/client/models/bulk_delete_action_variable_body.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from airflow_client.client.models.bulk_action_not_on_existence import BulkActionNotOnExistence -from airflow_client.client.models.entities_inner4 import EntitiesInner4 +from airflow_client.client.models.entities_inner5 import EntitiesInner5 from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -31,7 +31,7 @@ class BulkDeleteActionVariableBody(BaseModel): """ # noqa: E501 action: StrictStr = Field(description="The action to be performed on the entities.") action_on_non_existence: Optional[BulkActionNotOnExistence] = None - entities: List[EntitiesInner4] = Field(description="A list of entity id/key or entity objects to be deleted.") + entities: List[EntitiesInner5] = Field(description="A list of entity id/key or entity objects to be deleted.") __properties: ClassVar[List[str]] = ["action", "action_on_non_existence", "entities"] @field_validator('action') @@ -100,7 +100,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "action": obj.get("action"), "action_on_non_existence": obj.get("action_on_non_existence"), - "entities": [EntitiesInner4.from_dict(_item) for _item in obj["entities"]] if obj.get("entities") is not None else None + "entities": [EntitiesInner5.from_dict(_item) for _item in obj["entities"]] if obj.get("entities") is not None else None }) return _obj diff --git a/airflow_client/client/models/bulk_task_instance_body.py b/airflow_client/client/models/bulk_task_instance_body.py index 1d1143bb..0aa8baa3 100644 --- a/airflow_client/client/models/bulk_task_instance_body.py +++ b/airflow_client/client/models/bulk_task_instance_body.py @@ -20,6 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated +from uuid import UUID from airflow_client.client.models.task_instance_state import TaskInstanceState from typing import Optional, Set from typing_extensions import Self @@ -38,8 +39,10 @@ class BulkTaskInstanceBody(BaseModel): map_index: Optional[StrictInt] = None new_state: Optional[TaskInstanceState] = None note: Optional[Annotated[str, Field(strict=True, max_length=1000)]] = None + region_id: Optional[UUID] = None + region_index: Optional[StrictInt] = None task_id: StrictStr - __properties: ClassVar[List[str]] = ["dag_id", "dag_run_id", "include_downstream", "include_future", "include_past", "include_upstream", "map_index", "new_state", "note", "task_id"] + __properties: ClassVar[List[str]] = ["dag_id", "dag_run_id", "include_downstream", "include_future", "include_past", "include_upstream", "map_index", "new_state", "note", "region_id", "region_index", "task_id"] model_config = ConfigDict( validate_by_name=True, @@ -101,6 +104,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "map_index": obj.get("map_index"), "new_state": obj.get("new_state"), "note": obj.get("note"), + "region_id": obj.get("region_id"), + "region_index": obj.get("region_index"), "task_id": obj.get("task_id") }) return _obj diff --git a/airflow_client/client/models/bulk_update_action_bulk_dag_body.py b/airflow_client/client/models/bulk_update_action_bulk_dag_body.py new file mode 100644 index 00000000..ee8d3cb1 --- /dev/null +++ b/airflow_client/client/models/bulk_update_action_bulk_dag_body.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from airflow_client.client.models.bulk_action_not_on_existence import BulkActionNotOnExistence +from airflow_client.client.models.bulk_dag_body import BulkDAGBody +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class BulkUpdateActionBulkDAGBody(BaseModel): + """ + BulkUpdateActionBulkDAGBody + """ # noqa: E501 + action: StrictStr = Field(description="The action to be performed on the entities.") + action_on_non_existence: Optional[BulkActionNotOnExistence] = None + entities: List[BulkDAGBody] = Field(description="A list of entities to be updated.") + update_mask: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["action", "action_on_non_existence", "entities", "update_mask"] + + @field_validator('action') + def action_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['update']): + raise ValueError("must be one of enum values ('update')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BulkUpdateActionBulkDAGBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in entities (list) + _items = [] + if self.entities: + for _item_entities in self.entities: + _items.append(_item_entities.to_dict() if _item_entities is not None else None) + _dict['entities'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BulkUpdateActionBulkDAGBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "action": obj.get("action"), + "action_on_non_existence": obj.get("action_on_non_existence"), + "entities": [BulkDAGBody.from_dict(_item) for _item in obj["entities"]] if obj.get("entities") is not None else None, + "update_mask": obj.get("update_mask") + }) + return _obj + + diff --git a/airflow_client/client/models/clear_task_instances_body.py b/airflow_client/client/models/clear_task_instances_body.py index 0f074d07..dbf1e73c 100644 --- a/airflow_client/client/models/clear_task_instances_body.py +++ b/airflow_client/client/models/clear_task_instances_body.py @@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated +from uuid import UUID from airflow_client.client.models.clear_task_instances_body_task_ids_inner import ClearTaskInstancesBodyTaskIdsInner from typing import Optional, Set from typing_extensions import Self @@ -35,8 +36,10 @@ class ClearTaskInstancesBody(BaseModel): end_date: Optional[datetime] = None include_downstream: Optional[StrictBool] = False include_future: Optional[StrictBool] = False + include_later_loop_iterations: Optional[StrictBool] = Field(default=True, description="Clear later iterations when the selection includes a loop gate.") include_past: Optional[StrictBool] = False include_upstream: Optional[StrictBool] = False + keep_task_state: Optional[StrictBool] = Field(default=False, description="Keep the task state store entries of the cleared task instances so the next attempt resumes from them. By default they are discarded, so the task starts over.") note: Optional[Annotated[str, Field(strict=True, max_length=1000)]] = None only_failed: Optional[StrictBool] = True only_running: Optional[StrictBool] = False @@ -44,8 +47,11 @@ class ClearTaskInstancesBody(BaseModel): reset_dag_runs: Optional[StrictBool] = True run_on_latest_version: Optional[StrictBool] = None start_date: Optional[datetime] = None + task_group_id: Optional[StrictStr] = None task_ids: Optional[List[ClearTaskInstancesBodyTaskIdsInner]] = None - __properties: ClassVar[List[str]] = ["dag_run_id", "dry_run", "end_date", "include_downstream", "include_future", "include_past", "include_upstream", "note", "only_failed", "only_running", "prevent_running_task", "reset_dag_runs", "run_on_latest_version", "start_date", "task_ids"] + task_instance_ids: Optional[Annotated[List[UUID], Field(min_length=1)]] = None + whole_expansion_ids: Optional[List[UUID]] = Field(default=None, description="Selected execution IDs whose entire mapped expansion should be cleared.") + __properties: ClassVar[List[str]] = ["dag_run_id", "dry_run", "end_date", "include_downstream", "include_future", "include_later_loop_iterations", "include_past", "include_upstream", "keep_task_state", "note", "only_failed", "only_running", "prevent_running_task", "reset_dag_runs", "run_on_latest_version", "start_date", "task_group_id", "task_ids", "task_instance_ids", "whole_expansion_ids"] model_config = ConfigDict( validate_by_name=True, @@ -109,8 +115,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "end_date": obj.get("end_date"), "include_downstream": obj.get("include_downstream") if obj.get("include_downstream") is not None else False, "include_future": obj.get("include_future") if obj.get("include_future") is not None else False, + "include_later_loop_iterations": obj.get("include_later_loop_iterations") if obj.get("include_later_loop_iterations") is not None else True, "include_past": obj.get("include_past") if obj.get("include_past") is not None else False, "include_upstream": obj.get("include_upstream") if obj.get("include_upstream") is not None else False, + "keep_task_state": obj.get("keep_task_state") if obj.get("keep_task_state") is not None else False, "note": obj.get("note"), "only_failed": obj.get("only_failed") if obj.get("only_failed") is not None else True, "only_running": obj.get("only_running") if obj.get("only_running") is not None else False, @@ -118,7 +126,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "reset_dag_runs": obj.get("reset_dag_runs") if obj.get("reset_dag_runs") is not None else True, "run_on_latest_version": obj.get("run_on_latest_version"), "start_date": obj.get("start_date"), - "task_ids": [ClearTaskInstancesBodyTaskIdsInner.from_dict(_item) for _item in obj["task_ids"]] if obj.get("task_ids") is not None else None + "task_group_id": obj.get("task_group_id"), + "task_ids": [ClearTaskInstancesBodyTaskIdsInner.from_dict(_item) for _item in obj["task_ids"]] if obj.get("task_ids") is not None else None, + "task_instance_ids": obj.get("task_instance_ids"), + "whole_expansion_ids": obj.get("whole_expansion_ids") }) return _obj diff --git a/airflow_client/client/models/dag_bundle_collection_response.py b/airflow_client/client/models/dag_bundle_collection_response.py new file mode 100644 index 00000000..cd79a830 --- /dev/null +++ b/airflow_client/client/models/dag_bundle_collection_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from airflow_client.client.models.dag_bundle_response import DagBundleResponse +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DagBundleCollectionResponse(BaseModel): + """ + Dag bundle collection response. + """ # noqa: E501 + dag_bundles: List[DagBundleResponse] + total_entries: StrictInt + __properties: ClassVar[List[str]] = ["dag_bundles", "total_entries"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DagBundleCollectionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in dag_bundles (list) + _items = [] + if self.dag_bundles: + for _item_dag_bundles in self.dag_bundles: + _items.append(_item_dag_bundles.to_dict() if _item_dag_bundles is not None else None) + _dict['dag_bundles'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DagBundleCollectionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dag_bundles": [DagBundleResponse.from_dict(_item) for _item in obj["dag_bundles"]] if obj.get("dag_bundles") is not None else None, + "total_entries": obj.get("total_entries") + }) + return _obj + + diff --git a/airflow_client/client/models/dag_bundle_detail_response.py b/airflow_client/client/models/dag_bundle_detail_response.py new file mode 100644 index 00000000..ca373b6c --- /dev/null +++ b/airflow_client/client/models/dag_bundle_detail_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DagBundleDetailResponse(BaseModel): + """ + Dag bundle serializer for the single-bundle response. + """ # noqa: E501 + active: Optional[StrictBool] = None + bundle_url: Optional[StrictStr] = None + dag_count: StrictInt = Field(description="Number of live Dags recorded against the bundle that the caller is permitted to see, counted on the same terms as ``GET /dags``.") + import_error_count: Optional[StrictInt] = None + last_refreshed: Optional[datetime] = None + name: StrictStr + team_name: Optional[StrictStr] = None + version: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["active", "bundle_url", "dag_count", "import_error_count", "last_refreshed", "name", "team_name", "version"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DagBundleDetailResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DagBundleDetailResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "active": obj.get("active"), + "bundle_url": obj.get("bundle_url"), + "dag_count": obj.get("dag_count"), + "import_error_count": obj.get("import_error_count"), + "last_refreshed": obj.get("last_refreshed"), + "name": obj.get("name"), + "team_name": obj.get("team_name"), + "version": obj.get("version") + }) + return _obj + + diff --git a/airflow_client/client/models/dag_bundle_file_collection_response.py b/airflow_client/client/models/dag_bundle_file_collection_response.py new file mode 100644 index 00000000..5d13dad1 --- /dev/null +++ b/airflow_client/client/models/dag_bundle_file_collection_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from airflow_client.client.models.dag_bundle_file_response import DagBundleFileResponse +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DagBundleFileCollectionResponse(BaseModel): + """ + Dag bundle file collection response. + """ # noqa: E501 + dag_bundle_files: List[DagBundleFileResponse] + total_entries: StrictInt + __properties: ClassVar[List[str]] = ["dag_bundle_files", "total_entries"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DagBundleFileCollectionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in dag_bundle_files (list) + _items = [] + if self.dag_bundle_files: + for _item_dag_bundle_files in self.dag_bundle_files: + _items.append(_item_dag_bundle_files.to_dict() if _item_dag_bundle_files is not None else None) + _dict['dag_bundle_files'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DagBundleFileCollectionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dag_bundle_files": [DagBundleFileResponse.from_dict(_item) for _item in obj["dag_bundle_files"]] if obj.get("dag_bundle_files") is not None else None, + "total_entries": obj.get("total_entries") + }) + return _obj + + diff --git a/airflow_client/client/models/dag_bundle_file_response.py b/airflow_client/client/models/dag_bundle_file_response.py new file mode 100644 index 00000000..5a9ef6ed --- /dev/null +++ b/airflow_client/client/models/dag_bundle_file_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DagBundleFileResponse(BaseModel): + """ + A file in a Dag bundle, as the Dag processor last saw it. + """ # noqa: E501 + dag_count: StrictInt = Field(description="Number of live Dags the file defines that the caller may read.") + import_error_count: Optional[StrictInt] = None + last_parse_duration: Optional[Union[StrictFloat, StrictInt]] = None + last_parsed_time: Optional[datetime] = None + relative_fileloc: StrictStr + __properties: ClassVar[List[str]] = ["dag_count", "import_error_count", "last_parse_duration", "last_parsed_time", "relative_fileloc"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DagBundleFileResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DagBundleFileResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dag_count": obj.get("dag_count"), + "import_error_count": obj.get("import_error_count"), + "last_parse_duration": obj.get("last_parse_duration"), + "last_parsed_time": obj.get("last_parsed_time"), + "relative_fileloc": obj.get("relative_fileloc") + }) + return _obj + + diff --git a/airflow_client/client/models/dag_bundle_response.py b/airflow_client/client/models/dag_bundle_response.py new file mode 100644 index 00000000..288417dd --- /dev/null +++ b/airflow_client/client/models/dag_bundle_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DagBundleResponse(BaseModel): + """ + Dag bundle serializer for responses. + """ # noqa: E501 + active: Optional[StrictBool] = None + bundle_url: Optional[StrictStr] = None + import_error_count: Optional[StrictInt] = None + last_refreshed: Optional[datetime] = None + name: StrictStr + team_name: Optional[StrictStr] = None + version: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["active", "bundle_url", "import_error_count", "last_refreshed", "name", "team_name", "version"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DagBundleResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DagBundleResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "active": obj.get("active"), + "bundle_url": obj.get("bundle_url"), + "import_error_count": obj.get("import_error_count"), + "last_refreshed": obj.get("last_refreshed"), + "name": obj.get("name"), + "team_name": obj.get("team_name"), + "version": obj.get("version") + }) + return _obj + + diff --git a/airflow_client/client/models/dag_details_response.py b/airflow_client/client/models/dag_details_response.py index c819c70d..fdb07152 100644 --- a/airflow_client/client/models/dag_details_response.py +++ b/airflow_client/client/models/dag_details_response.py @@ -20,7 +20,9 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union +from airflow_client.client.models.dag_details_response_asset_expression import DAGDetailsResponseAssetExpression from airflow_client.client.models.dag_run_type import DagRunType +from airflow_client.client.models.dag_scheduling_state import DagSchedulingState from airflow_client.client.models.dag_tag_response import DagTagResponse from airflow_client.client.models.dag_version_response import DagVersionResponse from typing import Optional, Set @@ -33,7 +35,7 @@ class DAGDetailsResponse(BaseModel): """ # noqa: E501 active_runs_count: Optional[StrictInt] = 0 allowed_run_types: Optional[List[DagRunType]] = None - asset_expression: Optional[Dict[str, Any]] = None + asset_expression: Optional[DAGDetailsResponseAssetExpression] = None bundle_name: Optional[StrictStr] = None bundle_version: Optional[StrictStr] = None catchup: StrictBool @@ -46,7 +48,7 @@ class DAGDetailsResponse(BaseModel): doc_md: Optional[StrictStr] = None end_date: Optional[datetime] = None file_token: StrictStr = Field(description="Return file token.") - fileloc: StrictStr + fileloc: Optional[StrictStr] = None has_import_errors: StrictBool has_task_concurrency_limits: StrictBool is_backfillable: StrictBool = Field(description="Whether this Dag's schedule supports backfilling.") @@ -72,15 +74,17 @@ class DAGDetailsResponse(BaseModel): relative_fileloc: Optional[StrictStr] = None render_template_as_native_obj: StrictBool rerun_with_latest_version: Optional[StrictBool] = None + scheduling_state: Optional[DagSchedulingState] = None start_date: Optional[datetime] = None tags: List[DagTagResponse] + team_name: Optional[StrictStr] = None template_search_path: Optional[List[StrictStr]] = None timetable_description: Optional[StrictStr] = None timetable_partitioned: StrictBool timetable_periodic: StrictBool timetable_summary: Optional[StrictStr] = None timezone: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["active_runs_count", "allowed_run_types", "asset_expression", "bundle_name", "bundle_version", "catchup", "concurrency", "dag_display_name", "dag_id", "dag_run_timeout", "default_args", "description", "doc_md", "end_date", "file_token", "fileloc", "has_import_errors", "has_task_concurrency_limits", "is_backfillable", "is_favorite", "is_paused", "is_paused_upon_creation", "is_stale", "last_expired", "last_parse_duration", "last_parsed", "last_parsed_time", "latest_dag_version", "max_active_runs", "max_active_tasks", "max_consecutive_failed_dag_runs", "next_dagrun_data_interval_end", "next_dagrun_data_interval_start", "next_dagrun_logical_date", "next_dagrun_run_after", "owner_links", "owners", "params", "relative_fileloc", "render_template_as_native_obj", "rerun_with_latest_version", "start_date", "tags", "template_search_path", "timetable_description", "timetable_partitioned", "timetable_periodic", "timetable_summary", "timezone"] + __properties: ClassVar[List[str]] = ["active_runs_count", "allowed_run_types", "asset_expression", "bundle_name", "bundle_version", "catchup", "concurrency", "dag_display_name", "dag_id", "dag_run_timeout", "default_args", "description", "doc_md", "end_date", "file_token", "fileloc", "has_import_errors", "has_task_concurrency_limits", "is_backfillable", "is_favorite", "is_paused", "is_paused_upon_creation", "is_stale", "last_expired", "last_parse_duration", "last_parsed", "last_parsed_time", "latest_dag_version", "max_active_runs", "max_active_tasks", "max_consecutive_failed_dag_runs", "next_dagrun_data_interval_end", "next_dagrun_data_interval_start", "next_dagrun_logical_date", "next_dagrun_run_after", "owner_links", "owners", "params", "relative_fileloc", "render_template_as_native_obj", "rerun_with_latest_version", "scheduling_state", "start_date", "tags", "team_name", "template_search_path", "timetable_description", "timetable_partitioned", "timetable_periodic", "timetable_summary", "timezone"] model_config = ConfigDict( validate_by_name=True, @@ -127,6 +131,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of asset_expression + if self.asset_expression: + _dict['asset_expression'] = self.asset_expression.to_dict() # override the default output from pydantic by calling `to_dict()` of latest_dag_version if self.latest_dag_version: _dict['latest_dag_version'] = self.latest_dag_version.to_dict() @@ -150,7 +157,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "active_runs_count": obj.get("active_runs_count") if obj.get("active_runs_count") is not None else 0, "allowed_run_types": obj.get("allowed_run_types"), - "asset_expression": obj.get("asset_expression"), + "asset_expression": DAGDetailsResponseAssetExpression.from_dict(obj["asset_expression"]) if obj.get("asset_expression") is not None else None, "bundle_name": obj.get("bundle_name"), "bundle_version": obj.get("bundle_version"), "catchup": obj.get("catchup"), @@ -189,8 +196,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "relative_fileloc": obj.get("relative_fileloc"), "render_template_as_native_obj": obj.get("render_template_as_native_obj"), "rerun_with_latest_version": obj.get("rerun_with_latest_version"), + "scheduling_state": obj.get("scheduling_state"), "start_date": obj.get("start_date"), "tags": [DagTagResponse.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None, + "team_name": obj.get("team_name"), "template_search_path": obj.get("template_search_path"), "timetable_description": obj.get("timetable_description"), "timetable_partitioned": obj.get("timetable_partitioned"), diff --git a/airflow_client/client/models/dag_details_response_asset_expression.py b/airflow_client/client/models/dag_details_response_asset_expression.py new file mode 100644 index 00000000..9a6e40bd --- /dev/null +++ b/airflow_client/client/models/dag_details_response_asset_expression.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from airflow_client.client.models.asset_expression_alias import AssetExpressionAlias +from airflow_client.client.models.asset_expression_all import AssetExpressionAll +from airflow_client.client.models.asset_expression_any import AssetExpressionAny +from airflow_client.client.models.asset_expression_asset import AssetExpressionAsset +from airflow_client.client.models.asset_expression_ref import AssetExpressionRef +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +DAGDETAILSRESPONSEASSETEXPRESSION_ONE_OF_SCHEMAS = ["AssetExpressionAlias", "AssetExpressionAll", "AssetExpressionAny", "AssetExpressionAsset", "AssetExpressionRef"] + +class DAGDetailsResponseAssetExpression(BaseModel): + """ + DAGDetailsResponseAssetExpression + """ + # data type: AssetExpressionAsset + oneof_schema_1_validator: Optional[AssetExpressionAsset] = None + # data type: AssetExpressionAlias + oneof_schema_2_validator: Optional[AssetExpressionAlias] = None + # data type: AssetExpressionRef + oneof_schema_3_validator: Optional[AssetExpressionRef] = None + # data type: AssetExpressionAny + oneof_schema_4_validator: Optional[AssetExpressionAny] = None + # data type: AssetExpressionAll + oneof_schema_5_validator: Optional[AssetExpressionAll] = None + actual_instance: Optional[Union[AssetExpressionAlias, AssetExpressionAll, AssetExpressionAny, AssetExpressionAsset, AssetExpressionRef]] = None + one_of_schemas: Set[str] = { "AssetExpressionAlias", "AssetExpressionAll", "AssetExpressionAny", "AssetExpressionAsset", "AssetExpressionRef" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = DAGDetailsResponseAssetExpression.model_construct() + error_messages = [] + match = 0 + # validate data type: AssetExpressionAsset + if not isinstance(v, AssetExpressionAsset): + error_messages.append(f"Error! Input type `{type(v)}` is not `AssetExpressionAsset`") + else: + match += 1 + # validate data type: AssetExpressionAlias + if not isinstance(v, AssetExpressionAlias): + error_messages.append(f"Error! Input type `{type(v)}` is not `AssetExpressionAlias`") + else: + match += 1 + # validate data type: AssetExpressionRef + if not isinstance(v, AssetExpressionRef): + error_messages.append(f"Error! Input type `{type(v)}` is not `AssetExpressionRef`") + else: + match += 1 + # validate data type: AssetExpressionAny + if not isinstance(v, AssetExpressionAny): + error_messages.append(f"Error! Input type `{type(v)}` is not `AssetExpressionAny`") + else: + match += 1 + # validate data type: AssetExpressionAll + if not isinstance(v, AssetExpressionAll): + error_messages.append(f"Error! Input type `{type(v)}` is not `AssetExpressionAll`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in DAGDetailsResponseAssetExpression with oneOf schemas: AssetExpressionAlias, AssetExpressionAll, AssetExpressionAny, AssetExpressionAsset, AssetExpressionRef. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in DAGDetailsResponseAssetExpression with oneOf schemas: AssetExpressionAlias, AssetExpressionAll, AssetExpressionAny, AssetExpressionAsset, AssetExpressionRef. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into AssetExpressionAsset + try: + instance.actual_instance = AssetExpressionAsset.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AssetExpressionAlias + try: + instance.actual_instance = AssetExpressionAlias.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AssetExpressionRef + try: + instance.actual_instance = AssetExpressionRef.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AssetExpressionAny + try: + instance.actual_instance = AssetExpressionAny.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AssetExpressionAll + try: + instance.actual_instance = AssetExpressionAll.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into DAGDetailsResponseAssetExpression with oneOf schemas: AssetExpressionAlias, AssetExpressionAll, AssetExpressionAny, AssetExpressionAsset, AssetExpressionRef. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into DAGDetailsResponseAssetExpression with oneOf schemas: AssetExpressionAlias, AssetExpressionAll, AssetExpressionAny, AssetExpressionAsset, AssetExpressionRef. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], AssetExpressionAlias, AssetExpressionAll, AssetExpressionAny, AssetExpressionAsset, AssetExpressionRef]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/airflow_client/client/models/dag_patch_body.py b/airflow_client/client/models/dag_patch_body.py index c48ec5c8..074ab4ea 100644 --- a/airflow_client/client/models/dag_patch_body.py +++ b/airflow_client/client/models/dag_patch_body.py @@ -18,7 +18,8 @@ import json from pydantic import BaseModel, ConfigDict, StrictBool -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional +from airflow_client.client.models.dag_scheduling_state import DagSchedulingState from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -27,8 +28,9 @@ class DAGPatchBody(BaseModel): """ Dag Serializer for updatable bodies. """ # noqa: E501 - is_paused: StrictBool - __properties: ClassVar[List[str]] = ["is_paused"] + is_paused: Optional[StrictBool] = None + scheduling_state: Optional[DagSchedulingState] = None + __properties: ClassVar[List[str]] = ["is_paused", "scheduling_state"] model_config = ConfigDict( validate_by_name=True, @@ -81,7 +83,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "is_paused": obj.get("is_paused") + "is_paused": obj.get("is_paused"), + "scheduling_state": obj.get("scheduling_state") }) return _obj diff --git a/airflow_client/client/models/dag_processor_info_response.py b/airflow_client/client/models/dag_processor_info_response.py index f7dd6f3e..ab0ba59e 100644 --- a/airflow_client/client/models/dag_processor_info_response.py +++ b/airflow_client/client/models/dag_processor_info_response.py @@ -19,6 +19,9 @@ from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from airflow_client.client.models.dag_processor_instance_info_response import DagProcessorInstanceInfoResponse +from airflow_client.client.models.detailed_health_status import DetailedHealthStatus +from airflow_client.client.models.health_status import HealthStatus from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -27,9 +30,11 @@ class DagProcessorInfoResponse(BaseModel): """ DagProcessor info serializer for responses. """ # noqa: E501 + detailed_status: Optional[DetailedHealthStatus] = None + instances: Optional[List[DagProcessorInstanceInfoResponse]] = None latest_dag_processor_heartbeat: Optional[StrictStr] = None - status: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["latest_dag_processor_heartbeat", "status"] + status: Optional[HealthStatus] = None + __properties: ClassVar[List[str]] = ["detailed_status", "instances", "latest_dag_processor_heartbeat", "status"] model_config = ConfigDict( validate_by_name=True, @@ -70,6 +75,12 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each item in instances (list) + _items = [] + if self.instances: + for _item_instances in self.instances: + _items.append(_item_instances.to_dict() if _item_instances is not None else None) + _dict['instances'] = _items return _dict @classmethod @@ -82,6 +93,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "detailed_status": obj.get("detailed_status"), + "instances": [DagProcessorInstanceInfoResponse.from_dict(_item) for _item in obj["instances"]] if obj.get("instances") is not None else None, "latest_dag_processor_heartbeat": obj.get("latest_dag_processor_heartbeat"), "status": obj.get("status") }) diff --git a/airflow_client/client/models/dag_processor_instance_info_response.py b/airflow_client/client/models/dag_processor_instance_info_response.py new file mode 100644 index 00000000..229de64e --- /dev/null +++ b/airflow_client/client/models/dag_processor_instance_info_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DagProcessorInstanceInfoResponse(BaseModel): + """ + Dag processor instance info serializer for responses. + """ # noqa: E501 + bundle_names: Optional[List[StrictStr]] = None + hostname: Optional[StrictStr] = None + latest_dag_processor_heartbeat: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["bundle_names", "hostname", "latest_dag_processor_heartbeat"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DagProcessorInstanceInfoResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DagProcessorInstanceInfoResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bundle_names": obj.get("bundle_names"), + "hostname": obj.get("hostname"), + "latest_dag_processor_heartbeat": obj.get("latest_dag_processor_heartbeat") + }) + return _obj + + diff --git a/airflow_client/client/models/dag_response.py b/airflow_client/client/models/dag_response.py index 17641fda..b6b92bf7 100644 --- a/airflow_client/client/models/dag_response.py +++ b/airflow_client/client/models/dag_response.py @@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from airflow_client.client.models.dag_run_type import DagRunType +from airflow_client.client.models.dag_scheduling_state import DagSchedulingState from airflow_client.client.models.dag_tag_response import DagTagResponse from typing import Optional, Set from typing_extensions import Self @@ -37,7 +38,7 @@ class DAGResponse(BaseModel): dag_id: StrictStr description: Optional[StrictStr] = None file_token: StrictStr = Field(description="Return file token.") - fileloc: StrictStr + fileloc: Optional[StrictStr] = None has_import_errors: StrictBool has_task_concurrency_limits: StrictBool is_backfillable: StrictBool = Field(description="Whether this Dag's schedule supports backfilling.") @@ -55,12 +56,13 @@ class DAGResponse(BaseModel): next_dagrun_run_after: Optional[datetime] = None owners: List[StrictStr] relative_fileloc: Optional[StrictStr] = None + scheduling_state: Optional[DagSchedulingState] = None tags: List[DagTagResponse] timetable_description: Optional[StrictStr] = None timetable_partitioned: StrictBool timetable_periodic: StrictBool timetable_summary: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["allowed_run_types", "bundle_name", "bundle_version", "dag_display_name", "dag_id", "description", "file_token", "fileloc", "has_import_errors", "has_task_concurrency_limits", "is_backfillable", "is_paused", "is_stale", "last_expired", "last_parse_duration", "last_parsed_time", "max_active_runs", "max_active_tasks", "max_consecutive_failed_dag_runs", "next_dagrun_data_interval_end", "next_dagrun_data_interval_start", "next_dagrun_logical_date", "next_dagrun_run_after", "owners", "relative_fileloc", "tags", "timetable_description", "timetable_partitioned", "timetable_periodic", "timetable_summary"] + __properties: ClassVar[List[str]] = ["allowed_run_types", "bundle_name", "bundle_version", "dag_display_name", "dag_id", "description", "file_token", "fileloc", "has_import_errors", "has_task_concurrency_limits", "is_backfillable", "is_paused", "is_stale", "last_expired", "last_parse_duration", "last_parsed_time", "max_active_runs", "max_active_tasks", "max_consecutive_failed_dag_runs", "next_dagrun_data_interval_end", "next_dagrun_data_interval_start", "next_dagrun_logical_date", "next_dagrun_run_after", "owners", "relative_fileloc", "scheduling_state", "tags", "timetable_description", "timetable_partitioned", "timetable_periodic", "timetable_summary"] model_config = ConfigDict( validate_by_name=True, @@ -148,6 +150,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "next_dagrun_run_after": obj.get("next_dagrun_run_after"), "owners": obj.get("owners"), "relative_fileloc": obj.get("relative_fileloc"), + "scheduling_state": obj.get("scheduling_state"), "tags": [DagTagResponse.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None, "timetable_description": obj.get("timetable_description"), "timetable_partitioned": obj.get("timetable_partitioned"), diff --git a/airflow_client/client/models/dag_run_asset_reference.py b/airflow_client/client/models/dag_run_asset_reference.py index 9d526fd9..e346f72c 100644 --- a/airflow_client/client/models/dag_run_asset_reference.py +++ b/airflow_client/client/models/dag_run_asset_reference.py @@ -35,7 +35,7 @@ class DagRunAssetReference(BaseModel): logical_date: Optional[datetime] = None partition_key: Optional[StrictStr] = None run_id: StrictStr - start_date: datetime + start_date: Optional[datetime] = None state: StrictStr triggering: StrictBool = Field(description="Whether this asset event triggered the referenced dag run. Only a run's most recent consumed asset event triggers it; earlier consumed events are included in the run but did not trigger it.") __properties: ClassVar[List[str]] = ["dag_id", "data_interval_end", "data_interval_start", "end_date", "logical_date", "partition_key", "run_id", "start_date", "state", "triggering"] diff --git a/airflow_client/client/models/dag_run_response.py b/airflow_client/client/models/dag_run_response.py index 5b35a145..075a5859 100644 --- a/airflow_client/client/models/dag_run_response.py +++ b/airflow_client/client/models/dag_run_response.py @@ -52,9 +52,10 @@ class DAGRunResponse(BaseModel): run_type: DagRunType start_date: Optional[datetime] = None state: DagRunState + team_name: Optional[StrictStr] = None triggered_by: Optional[DagRunTriggeredByType] = None triggering_user_name: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["bundle_version", "conf", "dag_display_name", "dag_id", "dag_run_id", "dag_versions", "data_interval_end", "data_interval_start", "duration", "end_date", "last_scheduling_decision", "logical_date", "note", "partition_date", "partition_key", "queued_at", "run_after", "run_type", "start_date", "state", "triggered_by", "triggering_user_name"] + __properties: ClassVar[List[str]] = ["bundle_version", "conf", "dag_display_name", "dag_id", "dag_run_id", "dag_versions", "data_interval_end", "data_interval_start", "duration", "end_date", "last_scheduling_decision", "logical_date", "note", "partition_date", "partition_key", "queued_at", "run_after", "run_type", "start_date", "state", "team_name", "triggered_by", "triggering_user_name"] model_config = ConfigDict( validate_by_name=True, @@ -133,6 +134,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "run_type": obj.get("run_type"), "start_date": obj.get("start_date"), "state": obj.get("state"), + "team_name": obj.get("team_name"), "triggered_by": obj.get("triggered_by"), "triggering_user_name": obj.get("triggering_user_name") }) diff --git a/airflow_client/client/models/dag_schedule_asset_reference.py b/airflow_client/client/models/dag_schedule_asset_reference.py index 083fb028..bc94dc8f 100644 --- a/airflow_client/client/models/dag_schedule_asset_reference.py +++ b/airflow_client/client/models/dag_schedule_asset_reference.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -30,8 +30,9 @@ class DagScheduleAssetReference(BaseModel): """ # noqa: E501 created_at: datetime dag_id: StrictStr + team_name: Optional[StrictStr] = None updated_at: datetime - __properties: ClassVar[List[str]] = ["created_at", "dag_id", "updated_at"] + __properties: ClassVar[List[str]] = ["created_at", "dag_id", "team_name", "updated_at"] model_config = ConfigDict( validate_by_name=True, @@ -86,6 +87,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "created_at": obj.get("created_at"), "dag_id": obj.get("dag_id"), + "team_name": obj.get("team_name"), "updated_at": obj.get("updated_at") }) return _obj diff --git a/airflow_client/client/models/dag_scheduling_state.py b/airflow_client/client/models/dag_scheduling_state.py new file mode 100644 index 00000000..4b3a5558 --- /dev/null +++ b/airflow_client/client/models/dag_scheduling_state.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class DagSchedulingState(str, Enum): + """ + States controlling whether a Dag can create and schedule work. + """ + + """ + allowed enum values + """ + ACTIVE = 'active' + DRAINING = 'draining' + PAUSED = 'paused' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DagSchedulingState from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/airflow_client/client/models/dag_source_response.py b/airflow_client/client/models/dag_source_response.py index ebef6d90..dbea60ed 100644 --- a/airflow_client/client/models/dag_source_response.py +++ b/airflow_client/client/models/dag_source_response.py @@ -30,8 +30,9 @@ class DAGSourceResponse(BaseModel): content: Optional[StrictStr] = None dag_display_name: StrictStr dag_id: StrictStr + language: Optional[StrictStr] = None version_number: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = ["content", "dag_display_name", "dag_id", "version_number"] + __properties: ClassVar[List[str]] = ["content", "dag_display_name", "dag_id", "language", "version_number"] model_config = ConfigDict( validate_by_name=True, @@ -87,6 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "content": obj.get("content"), "dag_display_name": obj.get("dag_display_name"), "dag_id": obj.get("dag_id"), + "language": obj.get("language"), "version_number": obj.get("version_number") }) return _obj diff --git a/airflow_client/client/models/dag_version_diff_category.py b/airflow_client/client/models/dag_version_diff_category.py new file mode 100644 index 00000000..59276f8e --- /dev/null +++ b/airflow_client/client/models/dag_version_diff_category.py @@ -0,0 +1,46 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class DagVersionDiffCategory(str, Enum): + """ + What part of a Dag a difference belongs to. Mirrors ``DiffCategory``. + """ + + """ + allowed enum values + """ + ASSET = 'asset' + AUTHORIZATION = 'authorization' + CALLBACK = 'callback' + DEADLINE = 'deadline' + DEPENDENCY = 'dependency' + METADATA = 'metadata' + PARAM = 'param' + PROVENANCE = 'provenance' + SCHEDULE = 'schedule' + TASK = 'task' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DagVersionDiffCategory from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/airflow_client/client/models/dag_version_diff_change_response.py b/airflow_client/client/models/dag_version_diff_change_response.py new file mode 100644 index 00000000..2fdc8a02 --- /dev/null +++ b/airflow_client/client/models/dag_version_diff_change_response.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from airflow_client.client.models.dag_version_diff_category import DagVersionDiffCategory +from airflow_client.client.models.dag_version_diff_impact import DagVersionDiffImpact +from airflow_client.client.models.dag_version_diff_operation import DagVersionDiffOperation +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DagVersionDiffChangeResponse(BaseModel): + """ + One structural difference between two stored Dag versions. + """ # noqa: E501 + after_digest: Optional[StrictStr] = None + after_value: Optional[Any] = Field(default=None, description="The value this path holds in the target version. Present only when values are disclosed, and omitted entirely when the change has no after side — which is how an absent side is told apart from a stored null.") + before_digest: Optional[StrictStr] = None + before_value: Optional[Any] = Field(default=None, description="The value this path held in the base version. Present only when values are disclosed, and omitted entirely when the change has no before side — which is how an absent side is told apart from a stored null.") + category: DagVersionDiffCategory + impact: DagVersionDiffImpact + occurrence_count: StrictInt = Field(description="How many underlying changes this record stands for. Always 1 when values are disclosed, since each change is then its own record; a redacted record merges every change sharing its path and operation.") + operation: DagVersionDiffOperation + path: StrictStr + __properties: ClassVar[List[str]] = ["after_digest", "after_value", "before_digest", "before_value", "category", "impact", "occurrence_count", "operation", "path"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DagVersionDiffChangeResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if after_value (nullable) is None + # and model_fields_set contains the field + if self.after_value is None and "after_value" in self.model_fields_set: + _dict['after_value'] = None + + # set to None if before_value (nullable) is None + # and model_fields_set contains the field + if self.before_value is None and "before_value" in self.model_fields_set: + _dict['before_value'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DagVersionDiffChangeResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "after_digest": obj.get("after_digest"), + "after_value": obj.get("after_value"), + "before_digest": obj.get("before_digest"), + "before_value": obj.get("before_value"), + "category": obj.get("category"), + "impact": obj.get("impact"), + "occurrence_count": obj.get("occurrence_count"), + "operation": obj.get("operation"), + "path": obj.get("path") + }) + return _obj + + diff --git a/airflow_client/client/models/dag_version_diff_impact.py b/airflow_client/client/models/dag_version_diff_impact.py new file mode 100644 index 00000000..defab2ac --- /dev/null +++ b/airflow_client/client/models/dag_version_diff_impact.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class DagVersionDiffImpact(str, Enum): + """ + What a difference affects. Mirrors ``DiffImpact``. + """ + + """ + allowed enum values + """ + AUTHORIZATION = 'authorization' + EXECUTION = 'execution' + METADATA = 'metadata' + PROVENANCE = 'provenance' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DagVersionDiffImpact from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/airflow_client/client/models/dag_version_diff_mode.py b/airflow_client/client/models/dag_version_diff_mode.py new file mode 100644 index 00000000..9bc99423 --- /dev/null +++ b/airflow_client/client/models/dag_version_diff_mode.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class DagVersionDiffMode(str, Enum): + """ + Whether a comparison could be made at all. + """ + + """ + allowed enum values + """ + OBSERVED_STATE = 'observed_state' + UNAVAILABLE = 'unavailable' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DagVersionDiffMode from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/airflow_client/client/models/dag_version_diff_operation.py b/airflow_client/client/models/dag_version_diff_operation.py new file mode 100644 index 00000000..69e3b9e3 --- /dev/null +++ b/airflow_client/client/models/dag_version_diff_operation.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class DagVersionDiffOperation(str, Enum): + """ + How a difference presents at its path. + """ + + """ + allowed enum values + """ + ADDED = 'added' + REMOVED = 'removed' + CHANGED = 'changed' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DagVersionDiffOperation from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/airflow_client/client/models/dag_version_diff_response.py b/airflow_client/client/models/dag_version_diff_response.py new file mode 100644 index 00000000..3d349e84 --- /dev/null +++ b/airflow_client/client/models/dag_version_diff_response.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from airflow_client.client.models.dag_version_diff_change_response import DagVersionDiffChangeResponse +from airflow_client.client.models.dag_version_diff_mode import DagVersionDiffMode +from airflow_client.client.models.dag_version_diff_serializer_versions import DagVersionDiffSerializerVersions +from airflow_client.client.models.dag_version_diff_values_status import DagVersionDiffValuesStatus +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DagVersionDiffResponse(BaseModel): + """ + Observed-state difference between two stored Dag versions. + """ # noqa: E501 + base_version_number: StrictInt + changes: List[DagVersionDiffChangeResponse] + diff_schema_version: StrictInt = Field(description="Wire format of this payload. Incremented when its shape changes.") + mode: DagVersionDiffMode + serializer_versions: DagVersionDiffSerializerVersions + target_version_number: StrictInt + total_changes: StrictInt = Field(description="Underlying changes across every disclosed path, not the number of records. Exact when `truncated` is false; a lower bound when it is true, because the changes at dropped paths are not counted.") + truncated: StrictBool = Field(description="Whether a change at a path not already in `changes` was dropped to stay within `max_changes`. Paths that are absent are absent, not unchanged.") + unavailable_reason: Optional[StrictStr] = None + values_status: DagVersionDiffValuesStatus + __properties: ClassVar[List[str]] = ["base_version_number", "changes", "diff_schema_version", "mode", "serializer_versions", "target_version_number", "total_changes", "truncated", "unavailable_reason", "values_status"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DagVersionDiffResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in changes (list) + _items = [] + if self.changes: + for _item_changes in self.changes: + _items.append(_item_changes.to_dict() if _item_changes is not None else None) + _dict['changes'] = _items + # override the default output from pydantic by calling `to_dict()` of serializer_versions + if self.serializer_versions: + _dict['serializer_versions'] = self.serializer_versions.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DagVersionDiffResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "base_version_number": obj.get("base_version_number"), + "changes": [DagVersionDiffChangeResponse.from_dict(_item) for _item in obj["changes"]] if obj.get("changes") is not None else None, + "diff_schema_version": obj.get("diff_schema_version"), + "mode": obj.get("mode"), + "serializer_versions": DagVersionDiffSerializerVersions.from_dict(obj["serializer_versions"]) if obj.get("serializer_versions") is not None else None, + "target_version_number": obj.get("target_version_number"), + "total_changes": obj.get("total_changes"), + "truncated": obj.get("truncated"), + "unavailable_reason": obj.get("unavailable_reason"), + "values_status": obj.get("values_status") + }) + return _obj + + diff --git a/airflow_client/client/models/dag_version_diff_serializer_versions.py b/airflow_client/client/models/dag_version_diff_serializer_versions.py new file mode 100644 index 00000000..9a33c3eb --- /dev/null +++ b/airflow_client/client/models/dag_version_diff_serializer_versions.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DagVersionDiffSerializerVersions(BaseModel): + """ + Which Dag serializer format each compared version was stored under. Unrelated to ``diff_schema_version``, which versions this payload rather than the serialized Dags it describes. + """ # noqa: E501 + base: Optional[StrictInt] = None + target: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["base", "target"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DagVersionDiffSerializerVersions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DagVersionDiffSerializerVersions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "base": obj.get("base"), + "target": obj.get("target") + }) + return _obj + + diff --git a/airflow_client/client/models/dag_version_diff_values_status.py b/airflow_client/client/models/dag_version_diff_values_status.py new file mode 100644 index 00000000..1aba61bc --- /dev/null +++ b/airflow_client/client/models/dag_version_diff_values_status.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class DagVersionDiffValuesStatus(str, Enum): + """ + Whether values were disclosed. Mirrors ``ValuesStatus``. + """ + + """ + allowed enum values + """ + AVAILABLE = 'available' + UNAVAILABLE = 'unavailable' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DagVersionDiffValuesStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/airflow_client/client/models/dag_warning_response.py b/airflow_client/client/models/dag_warning_response.py index 71fcb598..3734c6fe 100644 --- a/airflow_client/client/models/dag_warning_response.py +++ b/airflow_client/client/models/dag_warning_response.py @@ -20,7 +20,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List -from airflow_client.client.models.dag_warning_type import DagWarningType +from airflow_client.client.models.warning_type1 import WarningType1 from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -33,7 +33,7 @@ class DAGWarningResponse(BaseModel): dag_id: StrictStr message: StrictStr timestamp: datetime - warning_type: DagWarningType + warning_type: WarningType1 __properties: ClassVar[List[str]] = ["dag_display_name", "dag_id", "message", "timestamp", "warning_type"] model_config = ConfigDict( @@ -75,6 +75,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of warning_type + if self.warning_type: + _dict['warning_type'] = self.warning_type.to_dict() return _dict @classmethod @@ -91,7 +94,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "dag_id": obj.get("dag_id"), "message": obj.get("message"), "timestamp": obj.get("timestamp"), - "warning_type": obj.get("warning_type") + "warning_type": WarningType1.from_dict(obj["warning_type"]) if obj.get("warning_type") is not None else None }) return _obj diff --git a/airflow_client/client/models/dag_warning_type.py b/airflow_client/client/models/dag_warning_type.py index ccd8d62b..ca0f9931 100644 --- a/airflow_client/client/models/dag_warning_type.py +++ b/airflow_client/client/models/dag_warning_type.py @@ -27,8 +27,10 @@ class DagWarningType(str, Enum): allowed enum values """ ASSET_CONFLICT = 'asset conflict' + DUPLICATE_DAG_ID = 'duplicate dag id' NON_MINUS_EXISTENT_POOL = 'non-existent pool' RUNTIME_VARYING_VALUE = 'runtime varying value' + TASK_GROUP_CYCLE = 'task group cycle' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/airflow_client/client/models/detailed_health_status.py b/airflow_client/client/models/detailed_health_status.py new file mode 100644 index 00000000..f249f381 --- /dev/null +++ b/airflow_client/client/models/detailed_health_status.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class DetailedHealthStatus(str, Enum): + """ + How much of a component's work has a live instance covering it. + """ + + """ + allowed enum values + """ + HEALTHY = 'healthy' + DEGRADED = 'degraded' + DOWN = 'down' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DetailedHealthStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/airflow_client/client/models/entities_inner.py b/airflow_client/client/models/entities_inner.py index 591216c9..da1de153 100644 --- a/airflow_client/client/models/entities_inner.py +++ b/airflow_client/client/models/entities_inner.py @@ -19,12 +19,12 @@ import re # noqa: F401 from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Optional -from airflow_client.client.models.bulk_dag_run_body import BulkDAGRunBody +from airflow_client.client.models.bulk_dag_body import BulkDAGBody from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict from typing_extensions import Literal, Self from pydantic import Field -ENTITIESINNER_ANY_OF_SCHEMAS = ["BulkDAGRunBody", "str"] +ENTITIESINNER_ANY_OF_SCHEMAS = ["BulkDAGBody", "str"] class EntitiesInner(BaseModel): """ @@ -33,13 +33,13 @@ class EntitiesInner(BaseModel): # data type: str anyof_schema_1_validator: Optional[StrictStr] = None - # data type: BulkDAGRunBody - anyof_schema_2_validator: Optional[BulkDAGRunBody] = None + # data type: BulkDAGBody + anyof_schema_2_validator: Optional[BulkDAGBody] = None if TYPE_CHECKING: - actual_instance: Optional[Union[BulkDAGRunBody, str]] = None + actual_instance: Optional[Union[BulkDAGBody, str]] = None else: actual_instance: Any = None - any_of_schemas: Set[str] = { "BulkDAGRunBody", "str" } + any_of_schemas: Set[str] = { "BulkDAGBody", "str" } model_config = { "validate_assignment": True, @@ -66,15 +66,15 @@ def actual_instance_must_validate_anyof(cls, v): return v except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # validate data type: BulkDAGRunBody - if not isinstance(v, BulkDAGRunBody): - error_messages.append(f"Error! Input type `{type(v)}` is not `BulkDAGRunBody`") + # validate data type: BulkDAGBody + if not isinstance(v, BulkDAGBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `BulkDAGBody`") else: return v if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in EntitiesInner with anyOf schemas: BulkDAGRunBody, str. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting the actual_instance in EntitiesInner with anyOf schemas: BulkDAGBody, str. Details: " + ", ".join(error_messages)) else: return v @@ -96,16 +96,16 @@ def from_json(cls, json_str: str) -> Self: return instance except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # anyof_schema_2_validator: Optional[BulkDAGRunBody] = None + # anyof_schema_2_validator: Optional[BulkDAGBody] = None try: - instance.actual_instance = BulkDAGRunBody.from_json(json_str) + instance.actual_instance = BulkDAGBody.from_json(json_str) return instance except (ValidationError, ValueError) as e: error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into EntitiesInner with anyOf schemas: BulkDAGRunBody, str. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into EntitiesInner with anyOf schemas: BulkDAGBody, str. Details: " + ", ".join(error_messages)) else: return instance @@ -119,7 +119,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], BulkDAGRunBody, str]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], BulkDAGBody, str]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/airflow_client/client/models/entities_inner1.py b/airflow_client/client/models/entities_inner1.py index f979ea18..7b3d9268 100644 --- a/airflow_client/client/models/entities_inner1.py +++ b/airflow_client/client/models/entities_inner1.py @@ -19,12 +19,12 @@ import re # noqa: F401 from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Optional -from airflow_client.client.models.bulk_task_instance_body import BulkTaskInstanceBody +from airflow_client.client.models.bulk_dag_run_body import BulkDAGRunBody from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict from typing_extensions import Literal, Self from pydantic import Field -ENTITIESINNER1_ANY_OF_SCHEMAS = ["BulkTaskInstanceBody", "str"] +ENTITIESINNER1_ANY_OF_SCHEMAS = ["BulkDAGRunBody", "str"] class EntitiesInner1(BaseModel): """ @@ -33,13 +33,13 @@ class EntitiesInner1(BaseModel): # data type: str anyof_schema_1_validator: Optional[StrictStr] = None - # data type: BulkTaskInstanceBody - anyof_schema_2_validator: Optional[BulkTaskInstanceBody] = None + # data type: BulkDAGRunBody + anyof_schema_2_validator: Optional[BulkDAGRunBody] = None if TYPE_CHECKING: - actual_instance: Optional[Union[BulkTaskInstanceBody, str]] = None + actual_instance: Optional[Union[BulkDAGRunBody, str]] = None else: actual_instance: Any = None - any_of_schemas: Set[str] = { "BulkTaskInstanceBody", "str" } + any_of_schemas: Set[str] = { "BulkDAGRunBody", "str" } model_config = { "validate_assignment": True, @@ -66,15 +66,15 @@ def actual_instance_must_validate_anyof(cls, v): return v except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # validate data type: BulkTaskInstanceBody - if not isinstance(v, BulkTaskInstanceBody): - error_messages.append(f"Error! Input type `{type(v)}` is not `BulkTaskInstanceBody`") + # validate data type: BulkDAGRunBody + if not isinstance(v, BulkDAGRunBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `BulkDAGRunBody`") else: return v if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in EntitiesInner1 with anyOf schemas: BulkTaskInstanceBody, str. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting the actual_instance in EntitiesInner1 with anyOf schemas: BulkDAGRunBody, str. Details: " + ", ".join(error_messages)) else: return v @@ -96,16 +96,16 @@ def from_json(cls, json_str: str) -> Self: return instance except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # anyof_schema_2_validator: Optional[BulkTaskInstanceBody] = None + # anyof_schema_2_validator: Optional[BulkDAGRunBody] = None try: - instance.actual_instance = BulkTaskInstanceBody.from_json(json_str) + instance.actual_instance = BulkDAGRunBody.from_json(json_str) return instance except (ValidationError, ValueError) as e: error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into EntitiesInner1 with anyOf schemas: BulkTaskInstanceBody, str. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into EntitiesInner1 with anyOf schemas: BulkDAGRunBody, str. Details: " + ", ".join(error_messages)) else: return instance @@ -119,7 +119,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], BulkTaskInstanceBody, str]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], BulkDAGRunBody, str]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/airflow_client/client/models/entities_inner2.py b/airflow_client/client/models/entities_inner2.py index ff87813f..bce8debf 100644 --- a/airflow_client/client/models/entities_inner2.py +++ b/airflow_client/client/models/entities_inner2.py @@ -19,12 +19,12 @@ import re # noqa: F401 from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Optional -from airflow_client.client.models.connection_body import ConnectionBody +from airflow_client.client.models.bulk_task_instance_body import BulkTaskInstanceBody from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict from typing_extensions import Literal, Self from pydantic import Field -ENTITIESINNER2_ANY_OF_SCHEMAS = ["ConnectionBody", "str"] +ENTITIESINNER2_ANY_OF_SCHEMAS = ["BulkTaskInstanceBody", "str"] class EntitiesInner2(BaseModel): """ @@ -33,13 +33,13 @@ class EntitiesInner2(BaseModel): # data type: str anyof_schema_1_validator: Optional[StrictStr] = None - # data type: ConnectionBody - anyof_schema_2_validator: Optional[ConnectionBody] = None + # data type: BulkTaskInstanceBody + anyof_schema_2_validator: Optional[BulkTaskInstanceBody] = None if TYPE_CHECKING: - actual_instance: Optional[Union[ConnectionBody, str]] = None + actual_instance: Optional[Union[BulkTaskInstanceBody, str]] = None else: actual_instance: Any = None - any_of_schemas: Set[str] = { "ConnectionBody", "str" } + any_of_schemas: Set[str] = { "BulkTaskInstanceBody", "str" } model_config = { "validate_assignment": True, @@ -66,15 +66,15 @@ def actual_instance_must_validate_anyof(cls, v): return v except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # validate data type: ConnectionBody - if not isinstance(v, ConnectionBody): - error_messages.append(f"Error! Input type `{type(v)}` is not `ConnectionBody`") + # validate data type: BulkTaskInstanceBody + if not isinstance(v, BulkTaskInstanceBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `BulkTaskInstanceBody`") else: return v if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in EntitiesInner2 with anyOf schemas: ConnectionBody, str. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting the actual_instance in EntitiesInner2 with anyOf schemas: BulkTaskInstanceBody, str. Details: " + ", ".join(error_messages)) else: return v @@ -96,16 +96,16 @@ def from_json(cls, json_str: str) -> Self: return instance except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # anyof_schema_2_validator: Optional[ConnectionBody] = None + # anyof_schema_2_validator: Optional[BulkTaskInstanceBody] = None try: - instance.actual_instance = ConnectionBody.from_json(json_str) + instance.actual_instance = BulkTaskInstanceBody.from_json(json_str) return instance except (ValidationError, ValueError) as e: error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into EntitiesInner2 with anyOf schemas: ConnectionBody, str. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into EntitiesInner2 with anyOf schemas: BulkTaskInstanceBody, str. Details: " + ", ".join(error_messages)) else: return instance @@ -119,7 +119,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], ConnectionBody, str]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], BulkTaskInstanceBody, str]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/airflow_client/client/models/entities_inner3.py b/airflow_client/client/models/entities_inner3.py index e2055c45..ddf3178f 100644 --- a/airflow_client/client/models/entities_inner3.py +++ b/airflow_client/client/models/entities_inner3.py @@ -19,12 +19,12 @@ import re # noqa: F401 from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Optional -from airflow_client.client.models.pool_body import PoolBody +from airflow_client.client.models.connection_body import ConnectionBody from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict from typing_extensions import Literal, Self from pydantic import Field -ENTITIESINNER3_ANY_OF_SCHEMAS = ["PoolBody", "str"] +ENTITIESINNER3_ANY_OF_SCHEMAS = ["ConnectionBody", "str"] class EntitiesInner3(BaseModel): """ @@ -33,13 +33,13 @@ class EntitiesInner3(BaseModel): # data type: str anyof_schema_1_validator: Optional[StrictStr] = None - # data type: PoolBody - anyof_schema_2_validator: Optional[PoolBody] = None + # data type: ConnectionBody + anyof_schema_2_validator: Optional[ConnectionBody] = None if TYPE_CHECKING: - actual_instance: Optional[Union[PoolBody, str]] = None + actual_instance: Optional[Union[ConnectionBody, str]] = None else: actual_instance: Any = None - any_of_schemas: Set[str] = { "PoolBody", "str" } + any_of_schemas: Set[str] = { "ConnectionBody", "str" } model_config = { "validate_assignment": True, @@ -66,15 +66,15 @@ def actual_instance_must_validate_anyof(cls, v): return v except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # validate data type: PoolBody - if not isinstance(v, PoolBody): - error_messages.append(f"Error! Input type `{type(v)}` is not `PoolBody`") + # validate data type: ConnectionBody + if not isinstance(v, ConnectionBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `ConnectionBody`") else: return v if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in EntitiesInner3 with anyOf schemas: PoolBody, str. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting the actual_instance in EntitiesInner3 with anyOf schemas: ConnectionBody, str. Details: " + ", ".join(error_messages)) else: return v @@ -96,16 +96,16 @@ def from_json(cls, json_str: str) -> Self: return instance except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # anyof_schema_2_validator: Optional[PoolBody] = None + # anyof_schema_2_validator: Optional[ConnectionBody] = None try: - instance.actual_instance = PoolBody.from_json(json_str) + instance.actual_instance = ConnectionBody.from_json(json_str) return instance except (ValidationError, ValueError) as e: error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into EntitiesInner3 with anyOf schemas: PoolBody, str. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into EntitiesInner3 with anyOf schemas: ConnectionBody, str. Details: " + ", ".join(error_messages)) else: return instance @@ -119,7 +119,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], PoolBody, str]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], ConnectionBody, str]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/airflow_client/client/models/entities_inner4.py b/airflow_client/client/models/entities_inner4.py index 9356abc1..bae60432 100644 --- a/airflow_client/client/models/entities_inner4.py +++ b/airflow_client/client/models/entities_inner4.py @@ -19,12 +19,12 @@ import re # noqa: F401 from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Optional -from airflow_client.client.models.variable_body import VariableBody +from airflow_client.client.models.pool_body import PoolBody from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict from typing_extensions import Literal, Self from pydantic import Field -ENTITIESINNER4_ANY_OF_SCHEMAS = ["VariableBody", "str"] +ENTITIESINNER4_ANY_OF_SCHEMAS = ["PoolBody", "str"] class EntitiesInner4(BaseModel): """ @@ -33,13 +33,13 @@ class EntitiesInner4(BaseModel): # data type: str anyof_schema_1_validator: Optional[StrictStr] = None - # data type: VariableBody - anyof_schema_2_validator: Optional[VariableBody] = None + # data type: PoolBody + anyof_schema_2_validator: Optional[PoolBody] = None if TYPE_CHECKING: - actual_instance: Optional[Union[VariableBody, str]] = None + actual_instance: Optional[Union[PoolBody, str]] = None else: actual_instance: Any = None - any_of_schemas: Set[str] = { "VariableBody", "str" } + any_of_schemas: Set[str] = { "PoolBody", "str" } model_config = { "validate_assignment": True, @@ -66,15 +66,15 @@ def actual_instance_must_validate_anyof(cls, v): return v except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # validate data type: VariableBody - if not isinstance(v, VariableBody): - error_messages.append(f"Error! Input type `{type(v)}` is not `VariableBody`") + # validate data type: PoolBody + if not isinstance(v, PoolBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `PoolBody`") else: return v if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in EntitiesInner4 with anyOf schemas: VariableBody, str. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting the actual_instance in EntitiesInner4 with anyOf schemas: PoolBody, str. Details: " + ", ".join(error_messages)) else: return v @@ -96,16 +96,16 @@ def from_json(cls, json_str: str) -> Self: return instance except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # anyof_schema_2_validator: Optional[VariableBody] = None + # anyof_schema_2_validator: Optional[PoolBody] = None try: - instance.actual_instance = VariableBody.from_json(json_str) + instance.actual_instance = PoolBody.from_json(json_str) return instance except (ValidationError, ValueError) as e: error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into EntitiesInner4 with anyOf schemas: VariableBody, str. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into EntitiesInner4 with anyOf schemas: PoolBody, str. Details: " + ", ".join(error_messages)) else: return instance @@ -119,7 +119,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], VariableBody, str]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], PoolBody, str]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/airflow_client/client/models/entities_inner5.py b/airflow_client/client/models/entities_inner5.py new file mode 100644 index 00000000..50978c58 --- /dev/null +++ b/airflow_client/client/models/entities_inner5.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from airflow_client.client.models.variable_body import VariableBody +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +ENTITIESINNER5_ANY_OF_SCHEMAS = ["VariableBody", "str"] + +class EntitiesInner5(BaseModel): + """ + EntitiesInner5 + """ + + # data type: str + anyof_schema_1_validator: Optional[StrictStr] = None + # data type: VariableBody + anyof_schema_2_validator: Optional[VariableBody] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[VariableBody, str]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "VariableBody", "str" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = EntitiesInner5.model_construct() + error_messages = [] + # validate data type: str + try: + instance.anyof_schema_1_validator = v + return v + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: VariableBody + if not isinstance(v, VariableBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `VariableBody`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in EntitiesInner5 with anyOf schemas: VariableBody, str. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # deserialize data into str + try: + # validation + instance.anyof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.anyof_schema_1_validator + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[VariableBody] = None + try: + instance.actual_instance = VariableBody.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into EntitiesInner5 with anyOf schemas: VariableBody, str. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], VariableBody, str]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/airflow_client/client/models/event_log_response.py b/airflow_client/client/models/event_log_response.py index bf3da8ef..992d8208 100644 --- a/airflow_client/client/models/event_log_response.py +++ b/airflow_client/client/models/event_log_response.py @@ -20,6 +20,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -36,12 +37,15 @@ class EventLogResponse(BaseModel): logical_date: Optional[datetime] = None map_index: Optional[StrictInt] = None owner: Optional[StrictStr] = None + owner_display_name: Optional[StrictStr] = None run_id: Optional[StrictStr] = None task_display_name: Optional[StrictStr] = None task_id: Optional[StrictStr] = None + task_instance_id: Optional[UUID] = None + team_name: Optional[StrictStr] = None try_number: Optional[StrictInt] = None when: datetime - __properties: ClassVar[List[str]] = ["dag_display_name", "dag_id", "event", "event_log_id", "extra", "logical_date", "map_index", "owner", "run_id", "task_display_name", "task_id", "try_number", "when"] + __properties: ClassVar[List[str]] = ["dag_display_name", "dag_id", "event", "event_log_id", "extra", "logical_date", "map_index", "owner", "owner_display_name", "run_id", "task_display_name", "task_id", "task_instance_id", "team_name", "try_number", "when"] model_config = ConfigDict( validate_by_name=True, @@ -102,9 +106,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "logical_date": obj.get("logical_date"), "map_index": obj.get("map_index"), "owner": obj.get("owner"), + "owner_display_name": obj.get("owner_display_name"), "run_id": obj.get("run_id"), "task_display_name": obj.get("task_display_name"), "task_id": obj.get("task_id"), + "task_instance_id": obj.get("task_instance_id"), + "team_name": obj.get("team_name"), "try_number": obj.get("try_number"), "when": obj.get("when") }) diff --git a/airflow_client/client/models/external_view_response.py b/airflow_client/client/models/external_view_response.py index d8d13fe7..4ce12895 100644 --- a/airflow_client/client/models/external_view_response.py +++ b/airflow_client/client/models/external_view_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,6 +27,7 @@ class ExternalViewResponse(BaseModel): """ Serializer for External View Plugin responses. """ # noqa: E501 + applies_to: Optional[Dict[str, List[StrictStr]]] = Field(default=None, description="Serializer for the optional scoping criteria of a UI plugin. An open map of dotted field path to the values that path may take -- not a closed set of criteria. ``{\"state\": [\"failed\"], \"dag.tags.name\": [\"ml\"]}`` scopes to failed entities of ml-tagged Dags. An unqualified path is rooted at the entity the ``destination`` is about; a path may instead name a related record (``dag``, ``dag_run``, ``task``, ``task_instance``) as its first segment. Matching is equality against the listed values, OR within a path and AND across paths, and is evaluated client-side.") category: Optional[StrictStr] = None destination: Optional[StrictStr] = 'nav' href: StrictStr @@ -36,7 +37,7 @@ class ExternalViewResponse(BaseModel): nav_top_level: Optional[StrictBool] = None url_route: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["category", "destination", "href", "icon", "icon_dark_mode", "name", "nav_top_level", "url_route"] + __properties: ClassVar[List[str]] = ["applies_to", "category", "destination", "href", "icon", "icon_dark_mode", "name", "nav_top_level", "url_route"] @field_validator('destination') def destination_validate_enum(cls, value): @@ -44,8 +45,8 @@ def destination_validate_enum(cls, value): if value is None: return value - if value not in set(['nav', 'dag', 'dag_run', 'task', 'task_instance', 'base']): - raise ValueError("must be one of enum values ('nav', 'dag', 'dag_run', 'task', 'task_instance', 'base')") + if value not in set(['nav', 'dag', 'dag_run', 'task', 'task_instance', 'asset', 'base']): + raise ValueError("must be one of enum values ('nav', 'dag', 'dag_run', 'task', 'task_instance', 'asset', 'base')") return value model_config = ConfigDict( @@ -106,6 +107,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "applies_to": obj.get("applies_to"), "category": obj.get("category"), "destination": obj.get("destination") if obj.get("destination") is not None else 'nav', "href": obj.get("href"), diff --git a/airflow_client/client/models/health_status.py b/airflow_client/client/models/health_status.py new file mode 100644 index 00000000..9bb0cac2 --- /dev/null +++ b/airflow_client/client/models/health_status.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class HealthStatus(str, Enum): + """ + Aggregate health of a component: whether it has at least one live instance. + """ + + """ + allowed enum values + """ + HEALTHY = 'healthy' + UNHEALTHY = 'unhealthy' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of HealthStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/airflow_client/client/models/import_error_response.py b/airflow_client/client/models/import_error_response.py index e1cd1a6a..dade053e 100644 --- a/airflow_client/client/models/import_error_response.py +++ b/airflow_client/client/models/import_error_response.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -29,11 +29,13 @@ class ImportErrorResponse(BaseModel): Import Error Response. """ # noqa: E501 bundle_name: Optional[StrictStr] = None + file_token: StrictStr = Field(description="Return a signed token identifying the file, used to request its reparse.") filename: StrictStr import_error_id: StrictInt + source_reference: Optional[StrictStr] = None stack_trace: StrictStr timestamp: datetime - __properties: ClassVar[List[str]] = ["bundle_name", "filename", "import_error_id", "stack_trace", "timestamp"] + __properties: ClassVar[List[str]] = ["bundle_name", "file_token", "filename", "import_error_id", "source_reference", "stack_trace", "timestamp"] model_config = ConfigDict( validate_by_name=True, @@ -65,8 +67,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ + "file_token", ]) _dict = self.model_dump( @@ -87,8 +91,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "bundle_name": obj.get("bundle_name"), + "file_token": obj.get("file_token"), "filename": obj.get("filename"), "import_error_id": obj.get("import_error_id"), + "source_reference": obj.get("source_reference"), "stack_trace": obj.get("stack_trace"), "timestamp": obj.get("timestamp") }) diff --git a/airflow_client/client/models/job_response.py b/airflow_client/client/models/job_response.py index 4dbbdad3..f1b43ac3 100644 --- a/airflow_client/client/models/job_response.py +++ b/airflow_client/client/models/job_response.py @@ -28,6 +28,7 @@ class JobResponse(BaseModel): """ Job serializer for responses. """ # noqa: E501 + bundle_names: Optional[List[StrictStr]] = None dag_display_name: Optional[StrictStr] = None dag_id: Optional[StrictStr] = None end_date: Optional[datetime] = None @@ -38,8 +39,9 @@ class JobResponse(BaseModel): latest_heartbeat: Optional[datetime] = None start_date: Optional[datetime] = None state: Optional[StrictStr] = None + team_names: Optional[List[StrictStr]] = None unixname: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["dag_display_name", "dag_id", "end_date", "executor_class", "hostname", "id", "job_type", "latest_heartbeat", "start_date", "state", "unixname"] + __properties: ClassVar[List[str]] = ["bundle_names", "dag_display_name", "dag_id", "end_date", "executor_class", "hostname", "id", "job_type", "latest_heartbeat", "start_date", "state", "team_names", "unixname"] model_config = ConfigDict( validate_by_name=True, @@ -92,6 +94,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "bundle_names": obj.get("bundle_names"), "dag_display_name": obj.get("dag_display_name"), "dag_id": obj.get("dag_id"), "end_date": obj.get("end_date"), @@ -102,6 +105,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "latest_heartbeat": obj.get("latest_heartbeat"), "start_date": obj.get("start_date"), "state": obj.get("state"), + "team_names": obj.get("team_names"), "unixname": obj.get("unixname") }) return _obj diff --git a/airflow_client/client/models/loop_iteration_response.py b/airflow_client/client/models/loop_iteration_response.py new file mode 100644 index 00000000..c6ce6b44 --- /dev/null +++ b/airflow_client/client/models/loop_iteration_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LoopIterationResponse(BaseModel): + """ + A task execution's position in an enclosing loop. + """ # noqa: E501 + iteration: Annotated[int, Field(strict=True, ge=1)] = Field(description="Position in the enclosing loop, counting from one.") + loop_id: StrictStr + __properties: ClassVar[List[str]] = ["iteration", "loop_id"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LoopIterationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LoopIterationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "iteration": obj.get("iteration"), + "loop_id": obj.get("loop_id") + }) + return _obj + + diff --git a/airflow_client/client/models/materialize_asset_body.py b/airflow_client/client/models/materialize_asset_body.py index c0fecef7..b02dbb08 100644 --- a/airflow_client/client/models/materialize_asset_body.py +++ b/airflow_client/client/models/materialize_asset_body.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -28,16 +28,18 @@ class MaterializeAssetBody(BaseModel): """ Materialize asset request. """ # noqa: E501 + bundle_version: Optional[StrictStr] = None conf: Optional[Dict[str, Any]] = None dag_run_id: Optional[StrictStr] = None data_interval_end: Optional[datetime] = None data_interval_start: Optional[datetime] = None + drain_dag: Optional[StrictBool] = Field(default=False, description="Drain the Dag together with this run. Draining changes the whole Dag: unfinished runs can start or resume except those held by paused backfills. No scheduled runs are created, and the Dag pauses once all unfinished runs finish. Paused backfills must be resumed for draining to complete. Requires the same permission as pausing the Dag.") logical_date: Optional[datetime] = None note: Optional[StrictStr] = None partition_key: Optional[StrictStr] = None run_after: Optional[datetime] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["conf", "dag_run_id", "data_interval_end", "data_interval_start", "logical_date", "note", "partition_key", "run_after"] + __properties: ClassVar[List[str]] = ["bundle_version", "conf", "dag_run_id", "data_interval_end", "data_interval_start", "drain_dag", "logical_date", "note", "partition_key", "run_after"] model_config = ConfigDict( validate_by_name=True, @@ -97,10 +99,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "bundle_version": obj.get("bundle_version"), "conf": obj.get("conf"), "dag_run_id": obj.get("dag_run_id"), "data_interval_end": obj.get("data_interval_end"), "data_interval_start": obj.get("data_interval_start"), + "drain_dag": obj.get("drain_dag") if obj.get("drain_dag") is not None else False, "logical_date": obj.get("logical_date"), "note": obj.get("note"), "partition_key": obj.get("partition_key"), diff --git a/airflow_client/client/models/patch_task_instance_body.py b/airflow_client/client/models/patch_task_instance_body.py index 33088476..c29285d8 100644 --- a/airflow_client/client/models/patch_task_instance_body.py +++ b/airflow_client/client/models/patch_task_instance_body.py @@ -17,9 +17,10 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated +from uuid import UUID from airflow_client.client.models.task_instance_state import TaskInstanceState from typing import Optional, Set from typing_extensions import Self @@ -35,7 +36,9 @@ class PatchTaskInstanceBody(BaseModel): include_upstream: Optional[StrictBool] = False new_state: Optional[TaskInstanceState] = None note: Optional[Annotated[str, Field(strict=True, max_length=1000)]] = None - __properties: ClassVar[List[str]] = ["include_downstream", "include_future", "include_past", "include_upstream", "new_state", "note"] + region_id: Optional[UUID] = None + region_index: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["include_downstream", "include_future", "include_past", "include_upstream", "new_state", "note", "region_id", "region_index"] model_config = ConfigDict( validate_by_name=True, @@ -93,7 +96,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "include_past": obj.get("include_past") if obj.get("include_past") is not None else False, "include_upstream": obj.get("include_upstream") if obj.get("include_upstream") is not None else False, "new_state": obj.get("new_state"), - "note": obj.get("note") + "note": obj.get("note"), + "region_id": obj.get("region_id"), + "region_index": obj.get("region_index") }) return _obj diff --git a/airflow_client/client/models/plugin_link_action_response.py b/airflow_client/client/models/plugin_link_action_response.py new file mode 100644 index 00000000..e588935b --- /dev/null +++ b/airflow_client/client/models/plugin_link_action_response.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class PluginLinkActionResponse(BaseModel): + """ + Serializer for a UI action that opens a URL. + """ # noqa: E501 + action_type: StrictStr + applies_to: Optional[Dict[str, List[StrictStr]]] = Field(default=None, description="Serializer for the optional scoping criteria of a UI plugin. An open map of dotted field path to the values that path may take -- not a closed set of criteria. ``{\"state\": [\"failed\"], \"dag.tags.name\": [\"ml\"]}`` scopes to failed entities of ml-tagged Dags. An unqualified path is rooted at the entity the ``destination`` is about; a path may instead name a related record (``dag``, ``dag_run``, ``task``, ``task_instance``) as its first segment. Matching is equality against the listed values, OR within a path and AND across paths, and is evaluated client-side.") + destination: StrictStr + href: StrictStr + icon: Optional[StrictStr] = None + icon_dark_mode: Optional[StrictStr] = None + name: StrictStr + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["action_type", "applies_to", "destination", "href", "icon", "icon_dark_mode", "name"] + + @field_validator('action_type') + def action_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['link']): + raise ValueError("must be one of enum values ('link')") + return value + + @field_validator('destination') + def destination_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dag', 'dag_run', 'task_instance']): + raise ValueError("must be one of enum values ('dag', 'dag_run', 'task_instance')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PluginLinkActionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PluginLinkActionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "action_type": obj.get("action_type"), + "applies_to": obj.get("applies_to"), + "destination": obj.get("destination"), + "href": obj.get("href"), + "icon": obj.get("icon"), + "icon_dark_mode": obj.get("icon_dark_mode"), + "name": obj.get("name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/airflow_client/client/models/plugin_react_action_response.py b/airflow_client/client/models/plugin_react_action_response.py new file mode 100644 index 00000000..4bf580ba --- /dev/null +++ b/airflow_client/client/models/plugin_react_action_response.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class PluginReactActionResponse(BaseModel): + """ + Serializer for a UI action that mounts a React component behind a button. + """ # noqa: E501 + action_type: StrictStr + applies_to: Optional[Dict[str, List[StrictStr]]] = Field(default=None, description="Serializer for the optional scoping criteria of a UI plugin. An open map of dotted field path to the values that path may take -- not a closed set of criteria. ``{\"state\": [\"failed\"], \"dag.tags.name\": [\"ml\"]}`` scopes to failed entities of ml-tagged Dags. An unqualified path is rooted at the entity the ``destination`` is about; a path may instead name a related record (``dag``, ``dag_run``, ``task``, ``task_instance``) as its first segment. Matching is equality against the listed values, OR within a path and AND across paths, and is evaluated client-side.") + bundle_url: StrictStr + destination: StrictStr + icon: Optional[StrictStr] = None + icon_dark_mode: Optional[StrictStr] = None + name: StrictStr + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["action_type", "applies_to", "bundle_url", "destination", "icon", "icon_dark_mode", "name"] + + @field_validator('action_type') + def action_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['react']): + raise ValueError("must be one of enum values ('react')") + return value + + @field_validator('destination') + def destination_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dag', 'dag_run', 'task_instance']): + raise ValueError("must be one of enum values ('dag', 'dag_run', 'task_instance')") + return value + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PluginReactActionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PluginReactActionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "action_type": obj.get("action_type"), + "applies_to": obj.get("applies_to"), + "bundle_url": obj.get("bundle_url"), + "destination": obj.get("destination"), + "icon": obj.get("icon"), + "icon_dark_mode": obj.get("icon_dark_mode"), + "name": obj.get("name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/airflow_client/client/models/plugin_response.py b/airflow_client/client/models/plugin_response.py index 7b5f57ec..7918ae67 100644 --- a/airflow_client/client/models/plugin_response.py +++ b/airflow_client/client/models/plugin_response.py @@ -18,13 +18,14 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from airflow_client.client.models.app_builder_menu_item_response import AppBuilderMenuItemResponse from airflow_client.client.models.app_builder_view_response import AppBuilderViewResponse from airflow_client.client.models.external_view_response import ExternalViewResponse from airflow_client.client.models.fast_api_app_response import FastAPIAppResponse from airflow_client.client.models.fast_api_root_middleware_response import FastAPIRootMiddlewareResponse from airflow_client.client.models.react_app_response import ReactAppResponse +from airflow_client.client.models.ui_actions_inner import UiActionsInner from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -46,8 +47,10 @@ class PluginResponse(BaseModel): operator_extra_links: List[StrictStr] react_apps: List[ReactAppResponse] source: StrictStr + team_name: Optional[StrictStr] = None timetables: List[StrictStr] - __properties: ClassVar[List[str]] = ["appbuilder_menu_items", "appbuilder_views", "external_views", "fastapi_apps", "fastapi_root_middlewares", "flask_blueprints", "global_operator_extra_links", "listeners", "macros", "name", "operator_extra_links", "react_apps", "source", "timetables"] + ui_actions: Optional[List[UiActionsInner]] = Field(default=None, description="User-defined actions rendered on Dag, Dag Run, and Task Instance table rows and header cards.") + __properties: ClassVar[List[str]] = ["appbuilder_menu_items", "appbuilder_views", "external_views", "fastapi_apps", "fastapi_root_middlewares", "flask_blueprints", "global_operator_extra_links", "listeners", "macros", "name", "operator_extra_links", "react_apps", "source", "team_name", "timetables", "ui_actions"] model_config = ConfigDict( validate_by_name=True, @@ -124,6 +127,12 @@ def to_dict(self) -> Dict[str, Any]: for _item_react_apps in self.react_apps: _items.append(_item_react_apps.to_dict() if _item_react_apps is not None else None) _dict['react_apps'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in ui_actions (list) + _items = [] + if self.ui_actions: + for _item_ui_actions in self.ui_actions: + _items.append(_item_ui_actions.to_dict() if _item_ui_actions is not None else None) + _dict['ui_actions'] = _items return _dict @classmethod @@ -149,7 +158,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "operator_extra_links": obj.get("operator_extra_links"), "react_apps": [ReactAppResponse.from_dict(_item) for _item in obj["react_apps"]] if obj.get("react_apps") is not None else None, "source": obj.get("source"), - "timetables": obj.get("timetables") + "team_name": obj.get("team_name"), + "timetables": obj.get("timetables"), + "ui_actions": [UiActionsInner.from_dict(_item) for _item in obj["ui_actions"]] if obj.get("ui_actions") is not None else None }) return _obj diff --git a/airflow_client/client/models/pool_body.py b/airflow_client/client/models/pool_body.py index 30da5447..ab5c5311 100644 --- a/airflow_client/client/models/pool_body.py +++ b/airflow_client/client/models/pool_body.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from typing import Optional, Set @@ -35,6 +35,13 @@ class PoolBody(BaseModel): team_name: Optional[Annotated[str, Field(strict=True, max_length=50)]] = None __properties: ClassVar[List[str]] = ["description", "include_deferred", "name", "slots", "team_name"] + @field_validator('name', mode="before") + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"\S", value): + raise ValueError(r"must validate the regular expression /\S/") + return value + model_config = ConfigDict( validate_by_name=True, validate_by_alias=True, diff --git a/airflow_client/client/models/react_app_response.py b/airflow_client/client/models/react_app_response.py index a8a6de74..8962d5cd 100644 --- a/airflow_client/client/models/react_app_response.py +++ b/airflow_client/client/models/react_app_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,6 +27,7 @@ class ReactAppResponse(BaseModel): """ Serializer for React App Plugin responses. """ # noqa: E501 + applies_to: Optional[Dict[str, List[StrictStr]]] = Field(default=None, description="Serializer for the optional scoping criteria of a UI plugin. An open map of dotted field path to the values that path may take -- not a closed set of criteria. ``{\"state\": [\"failed\"], \"dag.tags.name\": [\"ml\"]}`` scopes to failed entities of ml-tagged Dags. An unqualified path is rooted at the entity the ``destination`` is about; a path may instead name a related record (``dag``, ``dag_run``, ``task``, ``task_instance``) as its first segment. Matching is equality against the listed values, OR within a path and AND across paths, and is evaluated client-side.") bundle_url: StrictStr category: Optional[StrictStr] = None destination: Optional[StrictStr] = 'nav' @@ -36,7 +37,7 @@ class ReactAppResponse(BaseModel): nav_top_level: Optional[StrictBool] = None url_route: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["bundle_url", "category", "destination", "icon", "icon_dark_mode", "name", "nav_top_level", "url_route"] + __properties: ClassVar[List[str]] = ["applies_to", "bundle_url", "category", "destination", "icon", "icon_dark_mode", "name", "nav_top_level", "url_route"] @field_validator('destination') def destination_validate_enum(cls, value): @@ -44,8 +45,8 @@ def destination_validate_enum(cls, value): if value is None: return value - if value not in set(['nav', 'dag', 'dag_run', 'task', 'task_instance', 'base', 'dashboard']): - raise ValueError("must be one of enum values ('nav', 'dag', 'dag_run', 'task', 'task_instance', 'base', 'dashboard')") + if value not in set(['nav', 'dag', 'dag_run', 'task', 'task_instance', 'asset', 'base', 'dashboard', 'dag_overview', 'task_overview']): + raise ValueError("must be one of enum values ('nav', 'dag', 'dag_run', 'task', 'task_instance', 'asset', 'base', 'dashboard', 'dag_overview', 'task_overview')") return value model_config = ConfigDict( @@ -106,6 +107,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "applies_to": obj.get("applies_to"), "bundle_url": obj.get("bundle_url"), "category": obj.get("category"), "destination": obj.get("destination") if obj.get("destination") is not None else 'nav', diff --git a/airflow_client/client/models/scheduler_info_response.py b/airflow_client/client/models/scheduler_info_response.py index ae779a8e..0ac4f4ab 100644 --- a/airflow_client/client/models/scheduler_info_response.py +++ b/airflow_client/client/models/scheduler_info_response.py @@ -19,6 +19,9 @@ from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from airflow_client.client.models.detailed_health_status import DetailedHealthStatus +from airflow_client.client.models.health_status import HealthStatus +from airflow_client.client.models.scheduler_instance_info_response import SchedulerInstanceInfoResponse from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -27,9 +30,11 @@ class SchedulerInfoResponse(BaseModel): """ Scheduler info serializer for responses. """ # noqa: E501 + detailed_status: Optional[DetailedHealthStatus] = None + instances: Optional[List[SchedulerInstanceInfoResponse]] = None latest_scheduler_heartbeat: Optional[StrictStr] = None - status: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["latest_scheduler_heartbeat", "status"] + status: Optional[HealthStatus] = None + __properties: ClassVar[List[str]] = ["detailed_status", "instances", "latest_scheduler_heartbeat", "status"] model_config = ConfigDict( validate_by_name=True, @@ -70,6 +75,12 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each item in instances (list) + _items = [] + if self.instances: + for _item_instances in self.instances: + _items.append(_item_instances.to_dict() if _item_instances is not None else None) + _dict['instances'] = _items return _dict @classmethod @@ -82,6 +93,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "detailed_status": obj.get("detailed_status"), + "instances": [SchedulerInstanceInfoResponse.from_dict(_item) for _item in obj["instances"]] if obj.get("instances") is not None else None, "latest_scheduler_heartbeat": obj.get("latest_scheduler_heartbeat"), "status": obj.get("status") }) diff --git a/airflow_client/client/models/scheduler_instance_info_response.py b/airflow_client/client/models/scheduler_instance_info_response.py new file mode 100644 index 00000000..57bcb866 --- /dev/null +++ b/airflow_client/client/models/scheduler_instance_info_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class SchedulerInstanceInfoResponse(BaseModel): + """ + Scheduler instance info serializer for responses. + """ # noqa: E501 + hostname: Optional[StrictStr] = None + latest_scheduler_heartbeat: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["hostname", "latest_scheduler_heartbeat"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SchedulerInstanceInfoResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SchedulerInstanceInfoResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hostname": obj.get("hostname"), + "latest_scheduler_heartbeat": obj.get("latest_scheduler_heartbeat") + }) + return _obj + + diff --git a/airflow_client/client/models/task_instance_history_response.py b/airflow_client/client/models/task_instance_history_response.py index 26e66991..24a91099 100644 --- a/airflow_client/client/models/task_instance_history_response.py +++ b/airflow_client/client/models/task_instance_history_response.py @@ -20,7 +20,9 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union +from uuid import UUID from airflow_client.client.models.dag_version_response import DagVersionResponse +from airflow_client.client.models.loop_iteration_response import LoopIterationResponse from airflow_client.client.models.task_instance_state import TaskInstanceState from typing import Optional, Set from typing_extensions import Self @@ -39,8 +41,11 @@ class TaskInstanceHistoryResponse(BaseModel): executor: Optional[StrictStr] = None executor_config: StrictStr hostname: Optional[StrictStr] = None + id: UUID + loop_iteration: Optional[LoopIterationResponse] = None map_index: StrictInt max_tries: StrictInt + note: Optional[StrictStr] = None operator: Optional[StrictStr] = None operator_name: Optional[StrictStr] = None pid: Optional[StrictInt] = None @@ -49,14 +54,18 @@ class TaskInstanceHistoryResponse(BaseModel): priority_weight: Optional[StrictInt] = None queue: Optional[StrictStr] = None queued_when: Optional[datetime] = None + region_id: Optional[UUID] = None + region_index: Optional[StrictInt] = None + retry_at: Optional[datetime] = None scheduled_when: Optional[datetime] = None start_date: Optional[datetime] = None state: Optional[TaskInstanceState] = None + state_reason: Optional[StrictStr] = None task_display_name: StrictStr task_id: StrictStr try_number: StrictInt unixname: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["dag_display_name", "dag_id", "dag_run_id", "dag_version", "duration", "end_date", "executor", "executor_config", "hostname", "map_index", "max_tries", "operator", "operator_name", "pid", "pool", "pool_slots", "priority_weight", "queue", "queued_when", "scheduled_when", "start_date", "state", "task_display_name", "task_id", "try_number", "unixname"] + __properties: ClassVar[List[str]] = ["dag_display_name", "dag_id", "dag_run_id", "dag_version", "duration", "end_date", "executor", "executor_config", "hostname", "id", "loop_iteration", "map_index", "max_tries", "note", "operator", "operator_name", "pid", "pool", "pool_slots", "priority_weight", "queue", "queued_when", "region_id", "region_index", "retry_at", "scheduled_when", "start_date", "state", "state_reason", "task_display_name", "task_id", "try_number", "unixname"] model_config = ConfigDict( validate_by_name=True, @@ -100,6 +109,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of dag_version if self.dag_version: _dict['dag_version'] = self.dag_version.to_dict() + # override the default output from pydantic by calling `to_dict()` of loop_iteration + if self.loop_iteration: + _dict['loop_iteration'] = self.loop_iteration.to_dict() return _dict @classmethod @@ -121,8 +133,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "executor": obj.get("executor"), "executor_config": obj.get("executor_config"), "hostname": obj.get("hostname"), + "id": obj.get("id"), + "loop_iteration": LoopIterationResponse.from_dict(obj["loop_iteration"]) if obj.get("loop_iteration") is not None else None, "map_index": obj.get("map_index"), "max_tries": obj.get("max_tries"), + "note": obj.get("note"), "operator": obj.get("operator"), "operator_name": obj.get("operator_name"), "pid": obj.get("pid"), @@ -131,9 +146,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "priority_weight": obj.get("priority_weight"), "queue": obj.get("queue"), "queued_when": obj.get("queued_when"), + "region_id": obj.get("region_id"), + "region_index": obj.get("region_index"), + "retry_at": obj.get("retry_at"), "scheduled_when": obj.get("scheduled_when"), "start_date": obj.get("start_date"), "state": obj.get("state"), + "state_reason": obj.get("state_reason"), "task_display_name": obj.get("task_display_name"), "task_id": obj.get("task_id"), "try_number": obj.get("try_number"), diff --git a/airflow_client/client/models/task_instance_response.py b/airflow_client/client/models/task_instance_response.py index b7b740c5..99d8192b 100644 --- a/airflow_client/client/models/task_instance_response.py +++ b/airflow_client/client/models/task_instance_response.py @@ -18,11 +18,12 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from uuid import UUID from airflow_client.client.models.dag_version_response import DagVersionResponse from airflow_client.client.models.job_response import JobResponse +from airflow_client.client.models.loop_iteration_response import LoopIterationResponse from airflow_client.client.models.task_instance_state import TaskInstanceState from airflow_client.client.models.trigger_response import TriggerResponse from typing import Optional, Set @@ -43,7 +44,9 @@ class TaskInstanceResponse(BaseModel): executor_config: StrictStr hostname: Optional[StrictStr] = None id: UUID + in_loop: StrictBool logical_date: Optional[datetime] = None + loop_iteration: Optional[LoopIterationResponse] = None map_index: StrictInt max_tries: StrictInt note: Optional[StrictStr] = None @@ -55,19 +58,24 @@ class TaskInstanceResponse(BaseModel): priority_weight: Optional[StrictInt] = None queue: Optional[StrictStr] = None queued_when: Optional[datetime] = None + region_id: Optional[UUID] = None + region_index: Optional[StrictInt] = None rendered_fields: Optional[Dict[str, Any]] = None rendered_map_index: Optional[StrictStr] = None + retry_at: Optional[datetime] = None run_after: datetime scheduled_when: Optional[datetime] = None start_date: Optional[datetime] = None state: Optional[TaskInstanceState] = None + state_reason: Optional[StrictStr] = None task_display_name: StrictStr task_id: StrictStr + team_name: Optional[StrictStr] = None trigger: Optional[TriggerResponse] = None triggerer_job: Optional[JobResponse] = None try_number: StrictInt unixname: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["dag_display_name", "dag_id", "dag_run_id", "dag_version", "duration", "end_date", "executor", "executor_config", "hostname", "id", "logical_date", "map_index", "max_tries", "note", "operator", "operator_name", "pid", "pool", "pool_slots", "priority_weight", "queue", "queued_when", "rendered_fields", "rendered_map_index", "run_after", "scheduled_when", "start_date", "state", "task_display_name", "task_id", "trigger", "triggerer_job", "try_number", "unixname"] + __properties: ClassVar[List[str]] = ["dag_display_name", "dag_id", "dag_run_id", "dag_version", "duration", "end_date", "executor", "executor_config", "hostname", "id", "in_loop", "logical_date", "loop_iteration", "map_index", "max_tries", "note", "operator", "operator_name", "pid", "pool", "pool_slots", "priority_weight", "queue", "queued_when", "region_id", "region_index", "rendered_fields", "rendered_map_index", "retry_at", "run_after", "scheduled_when", "start_date", "state", "state_reason", "task_display_name", "task_id", "team_name", "trigger", "triggerer_job", "try_number", "unixname"] model_config = ConfigDict( validate_by_name=True, @@ -111,6 +119,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of dag_version if self.dag_version: _dict['dag_version'] = self.dag_version.to_dict() + # override the default output from pydantic by calling `to_dict()` of loop_iteration + if self.loop_iteration: + _dict['loop_iteration'] = self.loop_iteration.to_dict() # override the default output from pydantic by calling `to_dict()` of trigger if self.trigger: _dict['trigger'] = self.trigger.to_dict() @@ -139,7 +150,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "executor_config": obj.get("executor_config"), "hostname": obj.get("hostname"), "id": obj.get("id"), + "in_loop": obj.get("in_loop"), "logical_date": obj.get("logical_date"), + "loop_iteration": LoopIterationResponse.from_dict(obj["loop_iteration"]) if obj.get("loop_iteration") is not None else None, "map_index": obj.get("map_index"), "max_tries": obj.get("max_tries"), "note": obj.get("note"), @@ -151,14 +164,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "priority_weight": obj.get("priority_weight"), "queue": obj.get("queue"), "queued_when": obj.get("queued_when"), + "region_id": obj.get("region_id"), + "region_index": obj.get("region_index"), "rendered_fields": obj.get("rendered_fields"), "rendered_map_index": obj.get("rendered_map_index"), + "retry_at": obj.get("retry_at"), "run_after": obj.get("run_after"), "scheduled_when": obj.get("scheduled_when"), "start_date": obj.get("start_date"), "state": obj.get("state"), + "state_reason": obj.get("state_reason"), "task_display_name": obj.get("task_display_name"), "task_id": obj.get("task_id"), + "team_name": obj.get("team_name"), "trigger": TriggerResponse.from_dict(obj["trigger"]) if obj.get("trigger") is not None else None, "triggerer_job": JobResponse.from_dict(obj["triggerer_job"]) if obj.get("triggerer_job") is not None else None, "try_number": obj.get("try_number"), diff --git a/airflow_client/client/models/task_outlet_asset_reference.py b/airflow_client/client/models/task_outlet_asset_reference.py index 906412db..cd92e134 100644 --- a/airflow_client/client/models/task_outlet_asset_reference.py +++ b/airflow_client/client/models/task_outlet_asset_reference.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -31,8 +31,9 @@ class TaskOutletAssetReference(BaseModel): created_at: datetime dag_id: StrictStr task_id: StrictStr + team_name: Optional[StrictStr] = None updated_at: datetime - __properties: ClassVar[List[str]] = ["created_at", "dag_id", "task_id", "updated_at"] + __properties: ClassVar[List[str]] = ["created_at", "dag_id", "task_id", "team_name", "updated_at"] model_config = ConfigDict( validate_by_name=True, @@ -88,6 +89,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "created_at": obj.get("created_at"), "dag_id": obj.get("dag_id"), "task_id": obj.get("task_id"), + "team_name": obj.get("team_name"), "updated_at": obj.get("updated_at") }) return _obj diff --git a/airflow_client/client/models/trigger_dag_run_post_body.py b/airflow_client/client/models/trigger_dag_run_post_body.py index 6d119b5d..2b995993 100644 --- a/airflow_client/client/models/trigger_dag_run_post_body.py +++ b/airflow_client/client/models/trigger_dag_run_post_body.py @@ -13,7 +13,7 @@ import re import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -23,16 +23,18 @@ class TriggerDAGRunPostBody(BaseModel): """ Trigger Dag Run Serializer for POST body. """ + bundle_version: Optional[StrictStr] = None conf: Optional[Dict[str, Any]] = None dag_run_id: Optional[StrictStr] = None data_interval_end: Optional[datetime] = None data_interval_start: Optional[datetime] = None + drain_dag: Optional[StrictBool] = Field(default=False, description='Drain the Dag together with this run. Draining changes the whole Dag: unfinished runs can start or resume except those held by paused backfills. No scheduled runs are created, and the Dag pauses once all unfinished runs finish. Paused backfills must be resumed for draining to complete. Requires the same permission as pausing the Dag.') logical_date: Optional[datetime] = None note: Optional[StrictStr] = None partition_key: Optional[StrictStr] = None run_after: Optional[datetime] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ['conf', 'dag_run_id', 'data_interval_end', 'data_interval_start', 'logical_date', 'note', 'partition_key', 'run_after'] + __properties: ClassVar[List[str]] = ['bundle_version', 'conf', 'dag_run_id', 'data_interval_end', 'data_interval_start', 'drain_dag', 'logical_date', 'note', 'partition_key', 'run_after'] model_config = ConfigDict(validate_by_name=True, validate_by_alias=True, validate_assignment=True, protected_namespaces=()) def to_str(self) -> str: @@ -64,7 +66,7 @@ def to_dict(self) -> Dict[str, Any]: if 'logical_date' not in _dict: _dict['logical_date'] = None if self.additional_properties is not None: - for (_key, _value) in self.additional_properties.items(): + for _key, _value in self.additional_properties.items(): _dict[_key] = _value return _dict @@ -75,7 +77,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({'conf': obj.get('conf'), 'dag_run_id': obj.get('dag_run_id'), 'data_interval_end': obj.get('data_interval_end'), 'data_interval_start': obj.get('data_interval_start'), 'logical_date': obj.get('logical_date'), 'note': obj.get('note'), 'partition_key': obj.get('partition_key'), 'run_after': obj.get('run_after')}) + _obj = cls.model_validate({'bundle_version': obj.get('bundle_version'), 'conf': obj.get('conf'), 'dag_run_id': obj.get('dag_run_id'), 'data_interval_end': obj.get('data_interval_end'), 'data_interval_start': obj.get('data_interval_start'), 'drain_dag': obj.get('drain_dag') if obj.get('drain_dag') is not None else False, 'logical_date': obj.get('logical_date'), 'note': obj.get('note'), 'partition_key': obj.get('partition_key'), 'run_after': obj.get('run_after')}) for _key in obj.keys(): if _key not in cls.__properties: _obj.additional_properties[_key] = obj.get(_key) diff --git a/airflow_client/client/models/triggerer_info_response.py b/airflow_client/client/models/triggerer_info_response.py index 988432ef..6e1b3a8c 100644 --- a/airflow_client/client/models/triggerer_info_response.py +++ b/airflow_client/client/models/triggerer_info_response.py @@ -19,6 +19,9 @@ from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from airflow_client.client.models.detailed_health_status import DetailedHealthStatus +from airflow_client.client.models.health_status import HealthStatus +from airflow_client.client.models.triggerer_instance_info_response import TriggererInstanceInfoResponse from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -27,9 +30,11 @@ class TriggererInfoResponse(BaseModel): """ Triggerer info serializer for responses. """ # noqa: E501 + detailed_status: Optional[DetailedHealthStatus] = None + instances: Optional[List[TriggererInstanceInfoResponse]] = None latest_triggerer_heartbeat: Optional[StrictStr] = None - status: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["latest_triggerer_heartbeat", "status"] + status: Optional[HealthStatus] = None + __properties: ClassVar[List[str]] = ["detailed_status", "instances", "latest_triggerer_heartbeat", "status"] model_config = ConfigDict( validate_by_name=True, @@ -70,6 +75,12 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each item in instances (list) + _items = [] + if self.instances: + for _item_instances in self.instances: + _items.append(_item_instances.to_dict() if _item_instances is not None else None) + _dict['instances'] = _items return _dict @classmethod @@ -82,6 +93,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "detailed_status": obj.get("detailed_status"), + "instances": [TriggererInstanceInfoResponse.from_dict(_item) for _item in obj["instances"]] if obj.get("instances") is not None else None, "latest_triggerer_heartbeat": obj.get("latest_triggerer_heartbeat"), "status": obj.get("status") }) diff --git a/airflow_client/client/models/triggerer_instance_info_response.py b/airflow_client/client/models/triggerer_instance_info_response.py new file mode 100644 index 00000000..d75ee105 --- /dev/null +++ b/airflow_client/client/models/triggerer_instance_info_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class TriggererInstanceInfoResponse(BaseModel): + """ + Triggerer instance info serializer for responses. + """ # noqa: E501 + hostname: Optional[StrictStr] = None + latest_triggerer_heartbeat: Optional[StrictStr] = None + team_names: List[StrictStr] + __properties: ClassVar[List[str]] = ["hostname", "latest_triggerer_heartbeat", "team_names"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TriggererInstanceInfoResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TriggererInstanceInfoResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hostname": obj.get("hostname"), + "latest_triggerer_heartbeat": obj.get("latest_triggerer_heartbeat"), + "team_names": obj.get("team_names") + }) + return _obj + + diff --git a/airflow_client/client/models/ui_actions_inner.py b/airflow_client/client/models/ui_actions_inner.py new file mode 100644 index 00000000..57ecffad --- /dev/null +++ b/airflow_client/client/models/ui_actions_inner.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from airflow_client.client.models.plugin_link_action_response import PluginLinkActionResponse +from airflow_client.client.models.plugin_react_action_response import PluginReactActionResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +UIACTIONSINNER_ONE_OF_SCHEMAS = ["PluginLinkActionResponse", "PluginReactActionResponse"] + +class UiActionsInner(BaseModel): + """ + UiActionsInner + """ + # data type: PluginLinkActionResponse + oneof_schema_1_validator: Optional[PluginLinkActionResponse] = None + # data type: PluginReactActionResponse + oneof_schema_2_validator: Optional[PluginReactActionResponse] = None + actual_instance: Optional[Union[PluginLinkActionResponse, PluginReactActionResponse]] = None + one_of_schemas: Set[str] = { "PluginLinkActionResponse", "PluginReactActionResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = UiActionsInner.model_construct() + error_messages = [] + match = 0 + # validate data type: PluginLinkActionResponse + if not isinstance(v, PluginLinkActionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `PluginLinkActionResponse`") + else: + match += 1 + # validate data type: PluginReactActionResponse + if not isinstance(v, PluginReactActionResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `PluginReactActionResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in UiActionsInner with oneOf schemas: PluginLinkActionResponse, PluginReactActionResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in UiActionsInner with oneOf schemas: PluginLinkActionResponse, PluginReactActionResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into PluginLinkActionResponse + try: + instance.actual_instance = PluginLinkActionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PluginReactActionResponse + try: + instance.actual_instance = PluginReactActionResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into UiActionsInner with oneOf schemas: PluginLinkActionResponse, PluginReactActionResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into UiActionsInner with oneOf schemas: PluginLinkActionResponse, PluginReactActionResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], PluginLinkActionResponse, PluginReactActionResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/airflow_client/client/models/update_hitl_detail_payload.py b/airflow_client/client/models/update_hitl_detail_payload.py index 827279af..8edcb618 100644 --- a/airflow_client/client/models/update_hitl_detail_payload.py +++ b/airflow_client/client/models/update_hitl_detail_payload.py @@ -17,6 +17,7 @@ import re # noqa: F401 import json +from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated @@ -30,7 +31,8 @@ class UpdateHITLDetailPayload(BaseModel): """ # noqa: E501 chosen_options: Annotated[List[StrictStr], Field(min_length=1)] params_input: Optional[Dict[str, Any]] = None - __properties: ClassVar[List[str]] = ["chosen_options", "params_input"] + request_created_at: Optional[datetime] = None + __properties: ClassVar[List[str]] = ["chosen_options", "params_input", "request_created_at"] model_config = ConfigDict( validate_by_name=True, @@ -84,7 +86,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "chosen_options": obj.get("chosen_options"), - "params_input": obj.get("params_input") + "params_input": obj.get("params_input"), + "request_created_at": obj.get("request_created_at") }) return _obj diff --git a/airflow_client/client/models/variable_body.py b/airflow_client/client/models/variable_body.py index 0524591e..dd9505d8 100644 --- a/airflow_client/client/models/variable_body.py +++ b/airflow_client/client/models/variable_body.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from typing import Optional, Set @@ -34,6 +34,13 @@ class VariableBody(BaseModel): value: Optional[Any] __properties: ClassVar[List[str]] = ["description", "key", "team_name", "value"] + @field_validator('key', mode="before") + def key_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"\S", value): + raise ValueError(r"must validate the regular expression /\S/") + return value + model_config = ConfigDict( validate_by_name=True, validate_by_alias=True, diff --git a/airflow_client/client/models/warning_type.py b/airflow_client/client/models/warning_type.py new file mode 100644 index 00000000..c7a6d0fc --- /dev/null +++ b/airflow_client/client/models/warning_type.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from typing_extensions import Annotated +from airflow_client.client.models.dag_warning_type import DagWarningType +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +WARNINGTYPE_ANY_OF_SCHEMAS = ["DagWarningType", "str"] + +class WarningType(BaseModel): + """ + WarningType + """ + + # data type: DagWarningType + anyof_schema_1_validator: Optional[DagWarningType] = None + # data type: str + anyof_schema_2_validator: Optional[Annotated[str, Field(strict=True, max_length=50)]] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[DagWarningType, str]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "DagWarningType", "str" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + if v is None: + return v + + instance = WarningType.model_construct() + error_messages = [] + # validate data type: DagWarningType + if not isinstance(v, DagWarningType): + error_messages.append(f"Error! Input type `{type(v)}` is not `DagWarningType`") + else: + return v + + # validate data type: str + try: + instance.anyof_schema_2_validator = v + return v + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in WarningType with anyOf schemas: DagWarningType, str. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + # anyof_schema_1_validator: Optional[DagWarningType] = None + try: + instance.actual_instance = DagWarningType.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into str + try: + # validation + instance.anyof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.anyof_schema_2_validator + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into WarningType with anyOf schemas: DagWarningType, str. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], DagWarningType, str]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/airflow_client/client/models/warning_type1.py b/airflow_client/client/models/warning_type1.py new file mode 100644 index 00000000..7f3f75ec --- /dev/null +++ b/airflow_client/client/models/warning_type1.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from typing_extensions import Annotated +from airflow_client.client.models.dag_warning_type import DagWarningType +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +WARNINGTYPE1_ANY_OF_SCHEMAS = ["DagWarningType", "str"] + +class WarningType1(BaseModel): + """ + WarningType1 + """ + + # data type: DagWarningType + anyof_schema_1_validator: Optional[DagWarningType] = None + # data type: str + anyof_schema_2_validator: Optional[Annotated[str, Field(strict=True, max_length=50)]] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[DagWarningType, str]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "DagWarningType", "str" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = WarningType1.model_construct() + error_messages = [] + # validate data type: DagWarningType + if not isinstance(v, DagWarningType): + error_messages.append(f"Error! Input type `{type(v)}` is not `DagWarningType`") + else: + return v + + # validate data type: str + try: + instance.anyof_schema_2_validator = v + return v + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in WarningType1 with anyOf schemas: DagWarningType, str. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # anyof_schema_1_validator: Optional[DagWarningType] = None + try: + instance.actual_instance = DagWarningType.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into str + try: + # validation + instance.anyof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.anyof_schema_2_validator + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into WarningType1 with anyOf schemas: DagWarningType, str. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], DagWarningType, str]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/airflow_client/client/models/x_com_create_body.py b/airflow_client/client/models/x_com_create_body.py index 787d2009..d6a26389 100644 --- a/airflow_client/client/models/x_com_create_body.py +++ b/airflow_client/client/models/x_com_create_body.py @@ -17,8 +17,10 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from uuid import UUID from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -29,8 +31,10 @@ class XComCreateBody(BaseModel): """ # noqa: E501 key: StrictStr map_index: Optional[StrictInt] = -1 + region_id: Optional[UUID] = None + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None value: Optional[Any] - __properties: ClassVar[List[str]] = ["key", "map_index", "value"] + __properties: ClassVar[List[str]] = ["key", "map_index", "region_id", "region_index", "value"] model_config = ConfigDict( validate_by_name=True, @@ -90,6 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "key": obj.get("key"), "map_index": obj.get("map_index") if obj.get("map_index") is not None else -1, + "region_id": obj.get("region_id"), + "region_index": obj.get("region_index"), "value": obj.get("value") }) return _obj diff --git a/airflow_client/client/models/x_com_response.py b/airflow_client/client/models/x_com_response.py index bed5f6ad..497f993e 100644 --- a/airflow_client/client/models/x_com_response.py +++ b/airflow_client/client/models/x_com_response.py @@ -20,6 +20,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -33,12 +34,15 @@ class XComResponse(BaseModel): key: StrictStr logical_date: Optional[datetime] = None map_index: StrictInt + region_id: Optional[UUID] = None + region_index: Optional[StrictInt] = None run_after: datetime run_id: StrictStr task_display_name: StrictStr task_id: StrictStr + team_name: Optional[StrictStr] = None timestamp: datetime - __properties: ClassVar[List[str]] = ["dag_display_name", "dag_id", "key", "logical_date", "map_index", "run_after", "run_id", "task_display_name", "task_id", "timestamp"] + __properties: ClassVar[List[str]] = ["dag_display_name", "dag_id", "key", "logical_date", "map_index", "region_id", "region_index", "run_after", "run_id", "task_display_name", "task_id", "team_name", "timestamp"] model_config = ConfigDict( validate_by_name=True, @@ -96,10 +100,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "key": obj.get("key"), "logical_date": obj.get("logical_date"), "map_index": obj.get("map_index"), + "region_id": obj.get("region_id"), + "region_index": obj.get("region_index"), "run_after": obj.get("run_after"), "run_id": obj.get("run_id"), "task_display_name": obj.get("task_display_name"), "task_id": obj.get("task_id"), + "team_name": obj.get("team_name"), "timestamp": obj.get("timestamp") }) return _obj diff --git a/airflow_client/client/models/x_com_response_native.py b/airflow_client/client/models/x_com_response_native.py index 7543ac1a..755c9d92 100644 --- a/airflow_client/client/models/x_com_response_native.py +++ b/airflow_client/client/models/x_com_response_native.py @@ -20,6 +20,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -33,13 +34,16 @@ class XComResponseNative(BaseModel): key: StrictStr logical_date: Optional[datetime] = None map_index: StrictInt + region_id: Optional[UUID] = None + region_index: Optional[StrictInt] = None run_after: datetime run_id: StrictStr task_display_name: StrictStr task_id: StrictStr + team_name: Optional[StrictStr] = None timestamp: datetime value: Optional[Any] - __properties: ClassVar[List[str]] = ["dag_display_name", "dag_id", "key", "logical_date", "map_index", "run_after", "run_id", "task_display_name", "task_id", "timestamp", "value"] + __properties: ClassVar[List[str]] = ["dag_display_name", "dag_id", "key", "logical_date", "map_index", "region_id", "region_index", "run_after", "run_id", "task_display_name", "task_id", "team_name", "timestamp", "value"] model_config = ConfigDict( validate_by_name=True, @@ -102,10 +106,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "key": obj.get("key"), "logical_date": obj.get("logical_date"), "map_index": obj.get("map_index"), + "region_id": obj.get("region_id"), + "region_index": obj.get("region_index"), "run_after": obj.get("run_after"), "run_id": obj.get("run_id"), "task_display_name": obj.get("task_display_name"), "task_id": obj.get("task_id"), + "team_name": obj.get("team_name"), "timestamp": obj.get("timestamp"), "value": obj.get("value") }) diff --git a/airflow_client/client/models/x_com_response_string.py b/airflow_client/client/models/x_com_response_string.py index 475ce63e..1016763e 100644 --- a/airflow_client/client/models/x_com_response_string.py +++ b/airflow_client/client/models/x_com_response_string.py @@ -20,6 +20,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -33,13 +34,16 @@ class XComResponseString(BaseModel): key: StrictStr logical_date: Optional[datetime] = None map_index: StrictInt + region_id: Optional[UUID] = None + region_index: Optional[StrictInt] = None run_after: datetime run_id: StrictStr task_display_name: StrictStr task_id: StrictStr + team_name: Optional[StrictStr] = None timestamp: datetime value: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["dag_display_name", "dag_id", "key", "logical_date", "map_index", "run_after", "run_id", "task_display_name", "task_id", "timestamp", "value"] + __properties: ClassVar[List[str]] = ["dag_display_name", "dag_id", "key", "logical_date", "map_index", "region_id", "region_index", "run_after", "run_id", "task_display_name", "task_id", "team_name", "timestamp", "value"] model_config = ConfigDict( validate_by_name=True, @@ -97,10 +101,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "key": obj.get("key"), "logical_date": obj.get("logical_date"), "map_index": obj.get("map_index"), + "region_id": obj.get("region_id"), + "region_index": obj.get("region_index"), "run_after": obj.get("run_after"), "run_id": obj.get("run_id"), "task_display_name": obj.get("task_display_name"), "task_id": obj.get("task_id"), + "team_name": obj.get("team_name"), "timestamp": obj.get("timestamp"), "value": obj.get("value") }) diff --git a/airflow_client/client/models/x_com_update_body.py b/airflow_client/client/models/x_com_update_body.py index c1775ae9..d4d93cab 100644 --- a/airflow_client/client/models/x_com_update_body.py +++ b/airflow_client/client/models/x_com_update_body.py @@ -17,8 +17,10 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from uuid import UUID from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python @@ -28,8 +30,10 @@ class XComUpdateBody(BaseModel): Payload serializer for updating an XCom entry. """ # noqa: E501 map_index: Optional[StrictInt] = -1 + region_id: Optional[UUID] = None + region_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None value: Optional[Any] - __properties: ClassVar[List[str]] = ["map_index", "value"] + __properties: ClassVar[List[str]] = ["map_index", "region_id", "region_index", "value"] model_config = ConfigDict( validate_by_name=True, @@ -88,6 +92,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "map_index": obj.get("map_index") if obj.get("map_index") is not None else -1, + "region_id": obj.get("region_id"), + "region_index": obj.get("region_index"), "value": obj.get("value") }) return _obj diff --git a/airflow_client/client/rest.py b/airflow_client/client/rest.py index 0ea0e568..a96970bd 100644 --- a/airflow_client/client/rest.py +++ b/airflow_client/client/rest.py @@ -216,7 +216,7 @@ def request( ) post_params = post_params or {} - headers = headers or {} + headers = urllib3.HTTPHeaderDict(headers or {}) timeout = None if _request_timeout: diff --git a/docs/ActionsInner5.md b/docs/ActionsInner5.md new file mode 100644 index 00000000..ac9274a8 --- /dev/null +++ b/docs/ActionsInner5.md @@ -0,0 +1,33 @@ +# ActionsInner5 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action** | **str** | The action to be performed on the entities. | +**action_on_existence** | [**BulkActionOnExistence**](BulkActionOnExistence.md) | | [optional] +**entities** | [**List[EntitiesInner5]**](EntitiesInner5.md) | A list of entity id/key or entity objects to be deleted. | +**action_on_non_existence** | [**BulkActionNotOnExistence**](BulkActionNotOnExistence.md) | | [optional] +**update_mask** | **List[str]** | | [optional] + +## Example + +```python +from airflow_client.client.models.actions_inner5 import ActionsInner5 + +# TODO update the JSON string below +json = "{}" +# create an instance of ActionsInner5 from a JSON string +actions_inner5_instance = ActionsInner5.from_json(json) +# print the JSON string representation of the object +print(ActionsInner5.to_json()) + +# convert the object into a dict +actions_inner5_dict = actions_inner5_instance.to_dict() +# create an instance of ActionsInner5 from a dict +actions_inner5_from_dict = ActionsInner5.from_dict(actions_inner5_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AllInner.md b/docs/AllInner.md new file mode 100644 index 00000000..eca6db60 --- /dev/null +++ b/docs/AllInner.md @@ -0,0 +1,33 @@ +# AllInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | [**AssetExpressionAssetInfo**](AssetExpressionAssetInfo.md) | | +**alias** | [**AssetExpressionAliasInfo**](AssetExpressionAliasInfo.md) | | +**asset_ref** | **Dict[str, str]** | | +**any** | [**List[AllInner]**](AllInner.md) | | +**all** | [**List[AllInner]**](AllInner.md) | | + +## Example + +```python +from airflow_client.client.models.all_inner import AllInner + +# TODO update the JSON string below +json = "{}" +# create an instance of AllInner from a JSON string +all_inner_instance = AllInner.from_json(json) +# print the JSON string representation of the object +print(AllInner.to_json()) + +# convert the object into a dict +all_inner_dict = all_inner_instance.to_dict() +# create an instance of AllInner from a dict +all_inner_from_dict = AllInner.from_dict(all_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssetApi.md b/docs/AssetApi.md index 1f631870..78139b0a 100644 --- a/docs/AssetApi.md +++ b/docs/AssetApi.md @@ -622,7 +622,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_asset_events** -> AssetEventCollectionResponse get_asset_events(limit=limit, offset=offset, order_by=order_by, asset_id=asset_id, source_dag_id=source_dag_id, source_task_id=source_task_id, source_run_id=source_run_id, source_map_index=source_map_index, name_pattern=name_pattern, name_prefix_pattern=name_prefix_pattern, timestamp_gte=timestamp_gte, timestamp_gt=timestamp_gt, timestamp_lte=timestamp_lte, timestamp_lt=timestamp_lt) +> AssetEventCollectionResponse get_asset_events(limit=limit, offset=offset, order_by=order_by, asset_id=asset_id, source_dag_id=source_dag_id, source_task_id=source_task_id, source_task_instance_id=source_task_instance_id, source_run_id=source_run_id, source_map_index=source_map_index, partition_key=partition_key, partition_key_regexp_pattern=partition_key_regexp_pattern, name_pattern=name_pattern, name_prefix_pattern=name_prefix_pattern, extra=extra, timestamp_gte=timestamp_gte, timestamp_gt=timestamp_gt, timestamp_lte=timestamp_lte, timestamp_lt=timestamp_lt) Get Asset Events @@ -667,10 +667,14 @@ with airflow_client.client.ApiClient(configuration) as api_client: asset_id = 56 # int | (optional) source_dag_id = 'source_dag_id_example' # str | (optional) source_task_id = 'source_task_id_example' # str | (optional) + source_task_instance_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) source_run_id = 'source_run_id_example' # str | (optional) source_map_index = 56 # int | (optional) + partition_key = 'partition_key_example' # str | (optional) + partition_key_regexp_pattern = 'partition_key_regexp_pattern_example' # str | Filter results by matching this regular expression against the field value. (optional) name_pattern = 'name_pattern_example' # str | Case-insensitive substring match (SQL `ILIKE`). Slower than `name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". (optional) name_prefix_pattern = 'name_prefix_pattern_example' # str | Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". (optional) + extra = ['extra_example'] # List[str] | Filter by JSON key-value pairs. Repeat for multiple conditions (AND logic). Format: key=value (e.g. extra=region=us&extra=env=prod). (optional) timestamp_gte = '2013-10-20T19:20:30+01:00' # datetime | (optional) timestamp_gt = '2013-10-20T19:20:30+01:00' # datetime | (optional) timestamp_lte = '2013-10-20T19:20:30+01:00' # datetime | (optional) @@ -678,7 +682,7 @@ with airflow_client.client.ApiClient(configuration) as api_client: try: # Get Asset Events - api_response = api_instance.get_asset_events(limit=limit, offset=offset, order_by=order_by, asset_id=asset_id, source_dag_id=source_dag_id, source_task_id=source_task_id, source_run_id=source_run_id, source_map_index=source_map_index, name_pattern=name_pattern, name_prefix_pattern=name_prefix_pattern, timestamp_gte=timestamp_gte, timestamp_gt=timestamp_gt, timestamp_lte=timestamp_lte, timestamp_lt=timestamp_lt) + api_response = api_instance.get_asset_events(limit=limit, offset=offset, order_by=order_by, asset_id=asset_id, source_dag_id=source_dag_id, source_task_id=source_task_id, source_task_instance_id=source_task_instance_id, source_run_id=source_run_id, source_map_index=source_map_index, partition_key=partition_key, partition_key_regexp_pattern=partition_key_regexp_pattern, name_pattern=name_pattern, name_prefix_pattern=name_prefix_pattern, extra=extra, timestamp_gte=timestamp_gte, timestamp_gt=timestamp_gt, timestamp_lte=timestamp_lte, timestamp_lt=timestamp_lt) print("The response of AssetApi->get_asset_events:\n") pprint(api_response) except Exception as e: @@ -698,10 +702,14 @@ Name | Type | Description | Notes **asset_id** | **int**| | [optional] **source_dag_id** | **str**| | [optional] **source_task_id** | **str**| | [optional] + **source_task_instance_id** | **UUID**| | [optional] **source_run_id** | **str**| | [optional] **source_map_index** | **int**| | [optional] + **partition_key** | **str**| | [optional] + **partition_key_regexp_pattern** | **str**| Filter results by matching this regular expression against the field value. | [optional] **name_pattern** | **str**| Case-insensitive substring match (SQL `ILIKE`). Slower than `name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". | [optional] **name_prefix_pattern** | **str**| Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". | [optional] + **extra** | [**List[str]**](str.md)| Filter by JSON key-value pairs. Repeat for multiple conditions (AND logic). Format: key=value (e.g. extra=region=us&extra=env=prod). | [optional] **timestamp_gte** | **datetime**| | [optional] **timestamp_gt** | **datetime**| | [optional] **timestamp_lte** | **datetime**| | [optional] @@ -819,7 +827,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_assets** -> AssetCollectionResponse get_assets(limit=limit, offset=offset, name_pattern=name_pattern, name_prefix_pattern=name_prefix_pattern, uri_pattern=uri_pattern, uri_prefix_pattern=uri_prefix_pattern, dag_ids=dag_ids, only_active=only_active, order_by=order_by) +> AssetCollectionResponse get_assets(limit=limit, offset=offset, name_pattern=name_pattern, name_prefix_pattern=name_prefix_pattern, uri=uri, uri_pattern=uri_pattern, uri_prefix_pattern=uri_prefix_pattern, dag_ids=dag_ids, only_active=only_active, order_by=order_by) Get Assets @@ -862,6 +870,7 @@ with airflow_client.client.ApiClient(configuration) as api_client: offset = 0 # int | (optional) (default to 0) name_pattern = 'name_pattern_example' # str | Case-insensitive substring match (SQL `ILIKE`). Slower than `name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". (optional) name_prefix_pattern = 'name_prefix_pattern_example' # str | Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". (optional) + uri = ['uri_example'] # List[str] | Exact-match filter on the full asset URI. Compiles to an indexed equality comparison (``uri = ...``). Repeat the parameter (``?uri=a&uri=b``) to match multiple assets. (optional) uri_pattern = 'uri_pattern_example' # str | Case-insensitive substring match (SQL `ILIKE`). Slower than `uri_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". (optional) uri_prefix_pattern = 'uri_prefix_pattern_example' # str | Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". (optional) dag_ids = ['dag_ids_example'] # List[str] | (optional) @@ -870,7 +879,7 @@ with airflow_client.client.ApiClient(configuration) as api_client: try: # Get Assets - api_response = api_instance.get_assets(limit=limit, offset=offset, name_pattern=name_pattern, name_prefix_pattern=name_prefix_pattern, uri_pattern=uri_pattern, uri_prefix_pattern=uri_prefix_pattern, dag_ids=dag_ids, only_active=only_active, order_by=order_by) + api_response = api_instance.get_assets(limit=limit, offset=offset, name_pattern=name_pattern, name_prefix_pattern=name_prefix_pattern, uri=uri, uri_pattern=uri_pattern, uri_prefix_pattern=uri_prefix_pattern, dag_ids=dag_ids, only_active=only_active, order_by=order_by) print("The response of AssetApi->get_assets:\n") pprint(api_response) except Exception as e: @@ -888,6 +897,7 @@ Name | Type | Description | Notes **offset** | **int**| | [optional] [default to 0] **name_pattern** | **str**| Case-insensitive substring match (SQL `ILIKE`). Slower than `name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". | [optional] **name_prefix_pattern** | **str**| Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". | [optional] + **uri** | [**List[str]**](str.md)| Exact-match filter on the full asset URI. Compiles to an indexed equality comparison (``uri = ...``). Repeat the parameter (``?uri=a&uri=b``) to match multiple assets. | [optional] **uri_pattern** | **str**| Case-insensitive substring match (SQL `ILIKE`). Slower than `uri_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". | [optional] **uri_prefix_pattern** | **str**| Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". | [optional] **dag_ids** | [**List[str]**](str.md)| | [optional] @@ -1095,7 +1105,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **materialize_asset** -> DAGRunResponse materialize_asset(asset_id, materialize_asset_body=materialize_asset_body) +> DAGRunResponse materialize_asset(asset_id, materialize_asset_body) Materialize Asset @@ -1136,11 +1146,11 @@ with airflow_client.client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = airflow_client.client.AssetApi(api_client) asset_id = 56 # int | - materialize_asset_body = airflow_client.client.MaterializeAssetBody() # MaterializeAssetBody | (optional) + materialize_asset_body = airflow_client.client.MaterializeAssetBody() # MaterializeAssetBody | try: # Materialize Asset - api_response = api_instance.materialize_asset(asset_id, materialize_asset_body=materialize_asset_body) + api_response = api_instance.materialize_asset(asset_id, materialize_asset_body) print("The response of AssetApi->materialize_asset:\n") pprint(api_response) except Exception as e: @@ -1155,7 +1165,7 @@ with airflow_client.client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **asset_id** | **int**| | - **materialize_asset_body** | [**MaterializeAssetBody**](MaterializeAssetBody.md)| | [optional] + **materialize_asset_body** | [**MaterializeAssetBody**](MaterializeAssetBody.md)| | ### Return type diff --git a/docs/AssetEventResponse.md b/docs/AssetEventResponse.md index fe936610..851f4c62 100644 --- a/docs/AssetEventResponse.md +++ b/docs/AssetEventResponse.md @@ -17,6 +17,7 @@ Name | Type | Description | Notes **source_map_index** | **int** | | **source_run_id** | **str** | | [optional] **source_task_id** | **str** | | [optional] +**source_task_instance_id** | **UUID** | | [optional] **timestamp** | **datetime** | | **uri** | **str** | | [optional] diff --git a/docs/AssetExpressionAlias.md b/docs/AssetExpressionAlias.md new file mode 100644 index 00000000..36d52913 --- /dev/null +++ b/docs/AssetExpressionAlias.md @@ -0,0 +1,30 @@ +# AssetExpressionAlias + +An asset alias leaf: ``{\"alias\": {\"name\": ..., \"group\": ...}}``. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**alias** | [**AssetExpressionAliasInfo**](AssetExpressionAliasInfo.md) | | + +## Example + +```python +from airflow_client.client.models.asset_expression_alias import AssetExpressionAlias + +# TODO update the JSON string below +json = "{}" +# create an instance of AssetExpressionAlias from a JSON string +asset_expression_alias_instance = AssetExpressionAlias.from_json(json) +# print the JSON string representation of the object +print(AssetExpressionAlias.to_json()) + +# convert the object into a dict +asset_expression_alias_dict = asset_expression_alias_instance.to_dict() +# create an instance of AssetExpressionAlias from a dict +asset_expression_alias_from_dict = AssetExpressionAlias.from_dict(asset_expression_alias_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssetExpressionAliasInfo.md b/docs/AssetExpressionAliasInfo.md new file mode 100644 index 00000000..ecd131dd --- /dev/null +++ b/docs/AssetExpressionAliasInfo.md @@ -0,0 +1,31 @@ +# AssetExpressionAliasInfo + +Body of an ``alias`` leaf node. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group** | **str** | | +**name** | **str** | | + +## Example + +```python +from airflow_client.client.models.asset_expression_alias_info import AssetExpressionAliasInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of AssetExpressionAliasInfo from a JSON string +asset_expression_alias_info_instance = AssetExpressionAliasInfo.from_json(json) +# print the JSON string representation of the object +print(AssetExpressionAliasInfo.to_json()) + +# convert the object into a dict +asset_expression_alias_info_dict = asset_expression_alias_info_instance.to_dict() +# create an instance of AssetExpressionAliasInfo from a dict +asset_expression_alias_info_from_dict = AssetExpressionAliasInfo.from_dict(asset_expression_alias_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssetExpressionAll.md b/docs/AssetExpressionAll.md new file mode 100644 index 00000000..80887a21 --- /dev/null +++ b/docs/AssetExpressionAll.md @@ -0,0 +1,30 @@ +# AssetExpressionAll + +An \"and\" node: ``{\"all\": [...]}`` -- satisfied when all children are satisfied. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**all** | [**List[AllInner]**](AllInner.md) | | + +## Example + +```python +from airflow_client.client.models.asset_expression_all import AssetExpressionAll + +# TODO update the JSON string below +json = "{}" +# create an instance of AssetExpressionAll from a JSON string +asset_expression_all_instance = AssetExpressionAll.from_json(json) +# print the JSON string representation of the object +print(AssetExpressionAll.to_json()) + +# convert the object into a dict +asset_expression_all_dict = asset_expression_all_instance.to_dict() +# create an instance of AssetExpressionAll from a dict +asset_expression_all_from_dict = AssetExpressionAll.from_dict(asset_expression_all_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssetExpressionAny.md b/docs/AssetExpressionAny.md new file mode 100644 index 00000000..f560ae01 --- /dev/null +++ b/docs/AssetExpressionAny.md @@ -0,0 +1,30 @@ +# AssetExpressionAny + +An \"or\" node: ``{\"any\": [...]}`` -- satisfied when any child is satisfied. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any** | [**List[AllInner]**](AllInner.md) | | + +## Example + +```python +from airflow_client.client.models.asset_expression_any import AssetExpressionAny + +# TODO update the JSON string below +json = "{}" +# create an instance of AssetExpressionAny from a JSON string +asset_expression_any_instance = AssetExpressionAny.from_json(json) +# print the JSON string representation of the object +print(AssetExpressionAny.to_json()) + +# convert the object into a dict +asset_expression_any_dict = asset_expression_any_instance.to_dict() +# create an instance of AssetExpressionAny from a dict +asset_expression_any_from_dict = AssetExpressionAny.from_dict(asset_expression_any_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssetExpressionAsset.md b/docs/AssetExpressionAsset.md new file mode 100644 index 00000000..3088ba82 --- /dev/null +++ b/docs/AssetExpressionAsset.md @@ -0,0 +1,30 @@ +# AssetExpressionAsset + +An asset leaf: ``{\"asset\": {\"uri\": ..., \"name\": ..., \"group\": ...}}``. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | [**AssetExpressionAssetInfo**](AssetExpressionAssetInfo.md) | | + +## Example + +```python +from airflow_client.client.models.asset_expression_asset import AssetExpressionAsset + +# TODO update the JSON string below +json = "{}" +# create an instance of AssetExpressionAsset from a JSON string +asset_expression_asset_instance = AssetExpressionAsset.from_json(json) +# print the JSON string representation of the object +print(AssetExpressionAsset.to_json()) + +# convert the object into a dict +asset_expression_asset_dict = asset_expression_asset_instance.to_dict() +# create an instance of AssetExpressionAsset from a dict +asset_expression_asset_from_dict = AssetExpressionAsset.from_dict(asset_expression_asset_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssetExpressionAssetInfo.md b/docs/AssetExpressionAssetInfo.md new file mode 100644 index 00000000..92f00489 --- /dev/null +++ b/docs/AssetExpressionAssetInfo.md @@ -0,0 +1,34 @@ +# AssetExpressionAssetInfo + +Body of an ``asset`` leaf node. ``id`` is injected by ``DagModelOperation.update_dag_asset_expression`` when the expression is persisted; ``BaseAsset.as_expression()`` itself only emits ``uri``/``name``/``group``. It is left optional so a row persisted before id-enrichment (or migrated from the pre-3.0 dataset format) degrades gracefully instead of failing response validation. A leaf the caller is not authorized to read is served with ``hidden`` set and ``uri``, ``name`` and ``id`` blanked (see ``airflow.api_fastapi.common.asset_expression``), so the shape of the schedule stays visible without revealing which asset it waits on. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group** | **str** | | +**hidden** | **bool** | | [optional] [default to False] +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**uri** | **str** | | [optional] + +## Example + +```python +from airflow_client.client.models.asset_expression_asset_info import AssetExpressionAssetInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of AssetExpressionAssetInfo from a JSON string +asset_expression_asset_info_instance = AssetExpressionAssetInfo.from_json(json) +# print the JSON string representation of the object +print(AssetExpressionAssetInfo.to_json()) + +# convert the object into a dict +asset_expression_asset_info_dict = asset_expression_asset_info_instance.to_dict() +# create an instance of AssetExpressionAssetInfo from a dict +asset_expression_asset_info_from_dict = AssetExpressionAssetInfo.from_dict(asset_expression_asset_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssetExpressionRef.md b/docs/AssetExpressionRef.md new file mode 100644 index 00000000..2ae81d40 --- /dev/null +++ b/docs/AssetExpressionRef.md @@ -0,0 +1,30 @@ +# AssetExpressionRef + +An unresolved asset reference leaf: ``{\"asset_ref\": {\"name\": ...}}`` or ``{\"asset_ref\": {\"uri\": ...}}``. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset_ref** | **Dict[str, str]** | | + +## Example + +```python +from airflow_client.client.models.asset_expression_ref import AssetExpressionRef + +# TODO update the JSON string below +json = "{}" +# create an instance of AssetExpressionRef from a JSON string +asset_expression_ref_instance = AssetExpressionRef.from_json(json) +# print the JSON string representation of the object +print(AssetExpressionRef.to_json()) + +# convert the object into a dict +asset_expression_ref_dict = asset_expression_ref_instance.to_dict() +# create an instance of AssetExpressionRef from a dict +asset_expression_ref_from_dict = AssetExpressionRef.from_dict(asset_expression_ref_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssetStateStoreLastUpdatedBy.md b/docs/AssetStateStoreLastUpdatedBy.md index e89f6f2a..eb1abfb6 100644 --- a/docs/AssetStateStoreLastUpdatedBy.md +++ b/docs/AssetStateStoreLastUpdatedBy.md @@ -9,8 +9,12 @@ Name | Type | Description | Notes **dag_id** | **str** | | [optional] **kind** | [**AssetStateStoreWriterKind**](AssetStateStoreWriterKind.md) | | **map_index** | **int** | | [optional] +**region_id** | **UUID** | | [optional] +**region_index** | **int** | | [optional] **run_id** | **str** | | [optional] **task_id** | **str** | | [optional] +**task_instance_id** | **UUID** | | [optional] +**try_number** | **int** | | [optional] ## Example diff --git a/docs/BackfillApi.md b/docs/BackfillApi.md index 5b544b5c..5f799fe7 100644 --- a/docs/BackfillApi.md +++ b/docs/BackfillApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**create_backfill**](BackfillApi.md#create_backfill) | **POST** /api/v2/backfills | Create Backfill [**create_backfill_dry_run**](BackfillApi.md#create_backfill_dry_run) | **POST** /api/v2/backfills/dry_run | Create Backfill Dry Run [**get_backfill**](BackfillApi.md#get_backfill) | **GET** /api/v2/backfills/{backfill_id} | Get Backfill +[**list_backfill_dag_runs**](BackfillApi.md#list_backfill_dag_runs) | **GET** /api/v2/backfills/{backfill_id}/dag_runs | List Backfill Dag Runs [**list_backfills**](BackfillApi.md#list_backfills) | **GET** /api/v2/backfills | List Backfills [**pause_backfill**](BackfillApi.md#pause_backfill) | **PUT** /api/v2/backfills/{backfill_id}/pause | Pause Backfill [**unpause_backfill**](BackfillApi.md#unpause_backfill) | **PUT** /api/v2/backfills/{backfill_id}/unpause | Unpause Backfill @@ -354,6 +355,97 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **list_backfill_dag_runs** +> BackfillDagRunCollectionResponse list_backfill_dag_runs(backfill_id, limit=limit, offset=offset, order_by=order_by) + +List Backfill Dag Runs + +List Dag runs associated with a backfill, including skipped slots. + +### Example + +* OAuth Authentication (OAuth2PasswordBearer): +* Bearer Authentication (HTTPBearer): + +```python +import airflow_client.client +from airflow_client.client.models.backfill_dag_run_collection_response import BackfillDagRunCollectionResponse +from airflow_client.client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = airflow_client.client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure Bearer authorization: HTTPBearer +configuration = airflow_client.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with airflow_client.client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = airflow_client.client.BackfillApi(api_client) + backfill_id = 56 # int | + limit = 50 # int | (optional) (default to 50) + offset = 0 # int | (optional) (default to 0) + order_by = ["sort_ordinal"] # List[str] | Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, sort_ordinal` (optional) (default to ["sort_ordinal"]) + + try: + # List Backfill Dag Runs + api_response = api_instance.list_backfill_dag_runs(backfill_id, limit=limit, offset=offset, order_by=order_by) + print("The response of BackfillApi->list_backfill_dag_runs:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BackfillApi->list_backfill_dag_runs: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **backfill_id** | **int**| | + **limit** | **int**| | [optional] [default to 50] + **offset** | **int**| | [optional] [default to 0] + **order_by** | [**List[str]**](str.md)| Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, sort_ordinal` | [optional] [default to ["sort_ordinal"]] + +### Return type + +[**BackfillDagRunCollectionResponse**](BackfillDagRunCollectionResponse.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **list_backfills** > BackfillCollectionResponse list_backfills(dag_id, limit=limit, offset=offset, order_by=order_by) diff --git a/docs/BackfillDagRunCollectionResponse.md b/docs/BackfillDagRunCollectionResponse.md new file mode 100644 index 00000000..894acb59 --- /dev/null +++ b/docs/BackfillDagRunCollectionResponse.md @@ -0,0 +1,31 @@ +# BackfillDagRunCollectionResponse + +BackfillDagRun Collection serializer for responses. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**backfill_dag_runs** | [**List[BackfillDagRunResponse]**](BackfillDagRunResponse.md) | | +**total_entries** | **int** | | + +## Example + +```python +from airflow_client.client.models.backfill_dag_run_collection_response import BackfillDagRunCollectionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BackfillDagRunCollectionResponse from a JSON string +backfill_dag_run_collection_response_instance = BackfillDagRunCollectionResponse.from_json(json) +# print the JSON string representation of the object +print(BackfillDagRunCollectionResponse.to_json()) + +# convert the object into a dict +backfill_dag_run_collection_response_dict = backfill_dag_run_collection_response_instance.to_dict() +# create an instance of BackfillDagRunCollectionResponse from a dict +backfill_dag_run_collection_response_from_dict = BackfillDagRunCollectionResponse.from_dict(backfill_dag_run_collection_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BackfillDagRunResponse.md b/docs/BackfillDagRunResponse.md new file mode 100644 index 00000000..bfe860ae --- /dev/null +++ b/docs/BackfillDagRunResponse.md @@ -0,0 +1,38 @@ +# BackfillDagRunResponse + +Serializer for a single BackfillDagRun entry with joined DagRun state. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**backfill_id** | **int** | | +**dag_id** | **str** | | +**dag_run_id** | **str** | | [optional] +**dag_run_state** | [**DagRunState**](DagRunState.md) | | [optional] +**exception_reason** | **str** | | [optional] +**id** | **int** | | +**logical_date** | **datetime** | | [optional] +**partition_key** | **str** | | [optional] +**sort_ordinal** | **int** | | + +## Example + +```python +from airflow_client.client.models.backfill_dag_run_response import BackfillDagRunResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BackfillDagRunResponse from a JSON string +backfill_dag_run_response_instance = BackfillDagRunResponse.from_json(json) +# print the JSON string representation of the object +print(BackfillDagRunResponse.to_json()) + +# convert the object into a dict +backfill_dag_run_response_dict = backfill_dag_run_response_instance.to_dict() +# create an instance of BackfillDagRunResponse from a dict +backfill_dag_run_response_from_dict = BackfillDagRunResponse.from_dict(backfill_dag_run_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BackfillPostBody.md b/docs/BackfillPostBody.md index ec50bb6b..9649eba7 100644 --- a/docs/BackfillPostBody.md +++ b/docs/BackfillPostBody.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **dag_id** | **str** | | **dag_run_conf** | **Dict[str, object]** | | [optional] +**drain_dag** | **bool** | Drain the Dag together with the backfill. Draining changes the whole Dag: unfinished runs can start or resume except those held by paused backfills. No scheduled runs are created, and the Dag pauses once all unfinished runs finish. Paused backfills must be resumed for draining to complete. Requires the same permission as pausing the Dag. Ignored by the dry-run endpoint. | [optional] [default to False] **from_date** | **datetime** | | **max_active_runs** | **int** | | [optional] [default to 10] **reprocess_behavior** | [**ReprocessBehavior**](ReprocessBehavior.md) | | [optional] diff --git a/docs/BaseInfoResponse.md b/docs/BaseInfoResponse.md index f8c1158b..5f78b02b 100644 --- a/docs/BaseInfoResponse.md +++ b/docs/BaseInfoResponse.md @@ -6,7 +6,7 @@ Base info serializer for responses. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **str** | | [optional] +**status** | [**HealthStatus**](HealthStatus.md) | | [optional] ## Example diff --git a/docs/BulkBodyBulkDAGBody.md b/docs/BulkBodyBulkDAGBody.md new file mode 100644 index 00000000..344bb8a1 --- /dev/null +++ b/docs/BulkBodyBulkDAGBody.md @@ -0,0 +1,29 @@ +# BulkBodyBulkDAGBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**actions** | [**List[ActionsInner]**](ActionsInner.md) | | + +## Example + +```python +from airflow_client.client.models.bulk_body_bulk_dag_body import BulkBodyBulkDAGBody + +# TODO update the JSON string below +json = "{}" +# create an instance of BulkBodyBulkDAGBody from a JSON string +bulk_body_bulk_dag_body_instance = BulkBodyBulkDAGBody.from_json(json) +# print the JSON string representation of the object +print(BulkBodyBulkDAGBody.to_json()) + +# convert the object into a dict +bulk_body_bulk_dag_body_dict = bulk_body_bulk_dag_body_instance.to_dict() +# create an instance of BulkBodyBulkDAGBody from a dict +bulk_body_bulk_dag_body_from_dict = BulkBodyBulkDAGBody.from_dict(bulk_body_bulk_dag_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BulkBodyBulkDAGRunBody.md b/docs/BulkBodyBulkDAGRunBody.md index 709bf23d..48a73323 100644 --- a/docs/BulkBodyBulkDAGRunBody.md +++ b/docs/BulkBodyBulkDAGRunBody.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**actions** | [**List[ActionsInner]**](ActionsInner.md) | | +**actions** | [**List[ActionsInner1]**](ActionsInner1.md) | | ## Example diff --git a/docs/BulkBodyBulkTaskInstanceBody.md b/docs/BulkBodyBulkTaskInstanceBody.md index 659f5e43..9d8b0efa 100644 --- a/docs/BulkBodyBulkTaskInstanceBody.md +++ b/docs/BulkBodyBulkTaskInstanceBody.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**actions** | [**List[ActionsInner1]**](ActionsInner1.md) | | +**actions** | [**List[ActionsInner2]**](ActionsInner2.md) | | ## Example diff --git a/docs/BulkBodyConnectionBody.md b/docs/BulkBodyConnectionBody.md index 0febc231..5817a3ff 100644 --- a/docs/BulkBodyConnectionBody.md +++ b/docs/BulkBodyConnectionBody.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**actions** | [**List[ActionsInner2]**](ActionsInner2.md) | | +**actions** | [**List[ActionsInner3]**](ActionsInner3.md) | | ## Example diff --git a/docs/BulkBodyPoolBody.md b/docs/BulkBodyPoolBody.md index a4461b2b..b2d028a5 100644 --- a/docs/BulkBodyPoolBody.md +++ b/docs/BulkBodyPoolBody.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**actions** | [**List[ActionsInner3]**](ActionsInner3.md) | | +**actions** | [**List[ActionsInner4]**](ActionsInner4.md) | | ## Example diff --git a/docs/BulkBodyVariableBody.md b/docs/BulkBodyVariableBody.md index 626d83cd..c6350edd 100644 --- a/docs/BulkBodyVariableBody.md +++ b/docs/BulkBodyVariableBody.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**actions** | [**List[ActionsInner4]**](ActionsInner4.md) | | +**actions** | [**List[ActionsInner5]**](ActionsInner5.md) | | ## Example diff --git a/docs/BulkCreateActionBulkDAGBody.md b/docs/BulkCreateActionBulkDAGBody.md new file mode 100644 index 00000000..3447c176 --- /dev/null +++ b/docs/BulkCreateActionBulkDAGBody.md @@ -0,0 +1,31 @@ +# BulkCreateActionBulkDAGBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action** | **str** | The action to be performed on the entities. | +**action_on_existence** | [**BulkActionOnExistence**](BulkActionOnExistence.md) | | [optional] +**entities** | [**List[BulkDAGBody]**](BulkDAGBody.md) | A list of entities to be created. | + +## Example + +```python +from airflow_client.client.models.bulk_create_action_bulk_dag_body import BulkCreateActionBulkDAGBody + +# TODO update the JSON string below +json = "{}" +# create an instance of BulkCreateActionBulkDAGBody from a JSON string +bulk_create_action_bulk_dag_body_instance = BulkCreateActionBulkDAGBody.from_json(json) +# print the JSON string representation of the object +print(BulkCreateActionBulkDAGBody.to_json()) + +# convert the object into a dict +bulk_create_action_bulk_dag_body_dict = bulk_create_action_bulk_dag_body_instance.to_dict() +# create an instance of BulkCreateActionBulkDAGBody from a dict +bulk_create_action_bulk_dag_body_from_dict = BulkCreateActionBulkDAGBody.from_dict(bulk_create_action_bulk_dag_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BulkDAGBody.md b/docs/BulkDAGBody.md new file mode 100644 index 00000000..7430d589 --- /dev/null +++ b/docs/BulkDAGBody.md @@ -0,0 +1,32 @@ +# BulkDAGBody + +Request body for bulk update of Dags. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dag_id** | **str** | | +**is_paused** | **bool** | | [optional] +**scheduling_state** | [**DagSchedulingState**](DagSchedulingState.md) | | [optional] + +## Example + +```python +from airflow_client.client.models.bulk_dag_body import BulkDAGBody + +# TODO update the JSON string below +json = "{}" +# create an instance of BulkDAGBody from a JSON string +bulk_dag_body_instance = BulkDAGBody.from_json(json) +# print the JSON string representation of the object +print(BulkDAGBody.to_json()) + +# convert the object into a dict +bulk_dag_body_dict = bulk_dag_body_instance.to_dict() +# create an instance of BulkDAGBody from a dict +bulk_dag_body_from_dict = BulkDAGBody.from_dict(bulk_dag_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BulkDeleteActionBulkDAGBody.md b/docs/BulkDeleteActionBulkDAGBody.md new file mode 100644 index 00000000..e4a6a5ad --- /dev/null +++ b/docs/BulkDeleteActionBulkDAGBody.md @@ -0,0 +1,31 @@ +# BulkDeleteActionBulkDAGBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action** | **str** | The action to be performed on the entities. | +**action_on_non_existence** | [**BulkActionNotOnExistence**](BulkActionNotOnExistence.md) | | [optional] +**entities** | [**List[EntitiesInner]**](EntitiesInner.md) | A list of entity id/key or entity objects to be deleted. | + +## Example + +```python +from airflow_client.client.models.bulk_delete_action_bulk_dag_body import BulkDeleteActionBulkDAGBody + +# TODO update the JSON string below +json = "{}" +# create an instance of BulkDeleteActionBulkDAGBody from a JSON string +bulk_delete_action_bulk_dag_body_instance = BulkDeleteActionBulkDAGBody.from_json(json) +# print the JSON string representation of the object +print(BulkDeleteActionBulkDAGBody.to_json()) + +# convert the object into a dict +bulk_delete_action_bulk_dag_body_dict = bulk_delete_action_bulk_dag_body_instance.to_dict() +# create an instance of BulkDeleteActionBulkDAGBody from a dict +bulk_delete_action_bulk_dag_body_from_dict = BulkDeleteActionBulkDAGBody.from_dict(bulk_delete_action_bulk_dag_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BulkDeleteActionBulkDAGRunBody.md b/docs/BulkDeleteActionBulkDAGRunBody.md index c6154e98..9465b2b0 100644 --- a/docs/BulkDeleteActionBulkDAGRunBody.md +++ b/docs/BulkDeleteActionBulkDAGRunBody.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **action** | **str** | The action to be performed on the entities. | **action_on_non_existence** | [**BulkActionNotOnExistence**](BulkActionNotOnExistence.md) | | [optional] -**entities** | [**List[EntitiesInner]**](EntitiesInner.md) | A list of entity id/key or entity objects to be deleted. | +**entities** | [**List[EntitiesInner1]**](EntitiesInner1.md) | A list of entity id/key or entity objects to be deleted. | ## Example diff --git a/docs/BulkDeleteActionBulkTaskInstanceBody.md b/docs/BulkDeleteActionBulkTaskInstanceBody.md index b549afa0..4323ba27 100644 --- a/docs/BulkDeleteActionBulkTaskInstanceBody.md +++ b/docs/BulkDeleteActionBulkTaskInstanceBody.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **action** | **str** | The action to be performed on the entities. | **action_on_non_existence** | [**BulkActionNotOnExistence**](BulkActionNotOnExistence.md) | | [optional] -**entities** | [**List[EntitiesInner1]**](EntitiesInner1.md) | A list of entity id/key or entity objects to be deleted. | +**entities** | [**List[EntitiesInner2]**](EntitiesInner2.md) | A list of entity id/key or entity objects to be deleted. | ## Example diff --git a/docs/BulkDeleteActionConnectionBody.md b/docs/BulkDeleteActionConnectionBody.md index a358f0e8..287a2ec4 100644 --- a/docs/BulkDeleteActionConnectionBody.md +++ b/docs/BulkDeleteActionConnectionBody.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **action** | **str** | The action to be performed on the entities. | **action_on_non_existence** | [**BulkActionNotOnExistence**](BulkActionNotOnExistence.md) | | [optional] -**entities** | [**List[EntitiesInner2]**](EntitiesInner2.md) | A list of entity id/key or entity objects to be deleted. | +**entities** | [**List[EntitiesInner3]**](EntitiesInner3.md) | A list of entity id/key or entity objects to be deleted. | ## Example diff --git a/docs/BulkDeleteActionPoolBody.md b/docs/BulkDeleteActionPoolBody.md index d2ad9a5d..d8a20547 100644 --- a/docs/BulkDeleteActionPoolBody.md +++ b/docs/BulkDeleteActionPoolBody.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **action** | **str** | The action to be performed on the entities. | **action_on_non_existence** | [**BulkActionNotOnExistence**](BulkActionNotOnExistence.md) | | [optional] -**entities** | [**List[EntitiesInner3]**](EntitiesInner3.md) | A list of entity id/key or entity objects to be deleted. | +**entities** | [**List[EntitiesInner4]**](EntitiesInner4.md) | A list of entity id/key or entity objects to be deleted. | ## Example diff --git a/docs/BulkDeleteActionVariableBody.md b/docs/BulkDeleteActionVariableBody.md index 2ed83d97..d1b9d399 100644 --- a/docs/BulkDeleteActionVariableBody.md +++ b/docs/BulkDeleteActionVariableBody.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **action** | **str** | The action to be performed on the entities. | **action_on_non_existence** | [**BulkActionNotOnExistence**](BulkActionNotOnExistence.md) | | [optional] -**entities** | [**List[EntitiesInner4]**](EntitiesInner4.md) | A list of entity id/key or entity objects to be deleted. | +**entities** | [**List[EntitiesInner5]**](EntitiesInner5.md) | A list of entity id/key or entity objects to be deleted. | ## Example diff --git a/docs/BulkTaskInstanceBody.md b/docs/BulkTaskInstanceBody.md index f6e9d868..64cd6aa3 100644 --- a/docs/BulkTaskInstanceBody.md +++ b/docs/BulkTaskInstanceBody.md @@ -15,6 +15,8 @@ Name | Type | Description | Notes **map_index** | **int** | | [optional] **new_state** | [**TaskInstanceState**](TaskInstanceState.md) | | [optional] **note** | **str** | | [optional] +**region_id** | **UUID** | | [optional] +**region_index** | **int** | | [optional] **task_id** | **str** | | ## Example diff --git a/docs/BulkUpdateActionBulkDAGBody.md b/docs/BulkUpdateActionBulkDAGBody.md new file mode 100644 index 00000000..bf40d5d6 --- /dev/null +++ b/docs/BulkUpdateActionBulkDAGBody.md @@ -0,0 +1,32 @@ +# BulkUpdateActionBulkDAGBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action** | **str** | The action to be performed on the entities. | +**action_on_non_existence** | [**BulkActionNotOnExistence**](BulkActionNotOnExistence.md) | | [optional] +**entities** | [**List[BulkDAGBody]**](BulkDAGBody.md) | A list of entities to be updated. | +**update_mask** | **List[str]** | | [optional] + +## Example + +```python +from airflow_client.client.models.bulk_update_action_bulk_dag_body import BulkUpdateActionBulkDAGBody + +# TODO update the JSON string below +json = "{}" +# create an instance of BulkUpdateActionBulkDAGBody from a JSON string +bulk_update_action_bulk_dag_body_instance = BulkUpdateActionBulkDAGBody.from_json(json) +# print the JSON string representation of the object +print(BulkUpdateActionBulkDAGBody.to_json()) + +# convert the object into a dict +bulk_update_action_bulk_dag_body_dict = bulk_update_action_bulk_dag_body_instance.to_dict() +# create an instance of BulkUpdateActionBulkDAGBody from a dict +bulk_update_action_bulk_dag_body_from_dict = BulkUpdateActionBulkDAGBody.from_dict(bulk_update_action_bulk_dag_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClearTaskInstancesBody.md b/docs/ClearTaskInstancesBody.md index 4bc0a703..4f49b3d7 100644 --- a/docs/ClearTaskInstancesBody.md +++ b/docs/ClearTaskInstancesBody.md @@ -11,8 +11,10 @@ Name | Type | Description | Notes **end_date** | **datetime** | | [optional] **include_downstream** | **bool** | | [optional] [default to False] **include_future** | **bool** | | [optional] [default to False] +**include_later_loop_iterations** | **bool** | Clear later iterations when the selection includes a loop gate. | [optional] [default to True] **include_past** | **bool** | | [optional] [default to False] **include_upstream** | **bool** | | [optional] [default to False] +**keep_task_state** | **bool** | Keep the task state store entries of the cleared task instances so the next attempt resumes from them. By default they are discarded, so the task starts over. | [optional] [default to False] **note** | **str** | | [optional] **only_failed** | **bool** | | [optional] [default to True] **only_running** | **bool** | | [optional] [default to False] @@ -20,7 +22,10 @@ Name | Type | Description | Notes **reset_dag_runs** | **bool** | | [optional] [default to True] **run_on_latest_version** | **bool** | | [optional] **start_date** | **datetime** | | [optional] +**task_group_id** | **str** | | [optional] **task_ids** | [**List[ClearTaskInstancesBodyTaskIdsInner]**](ClearTaskInstancesBodyTaskIdsInner.md) | | [optional] +**task_instance_ids** | **List[UUID]** | | [optional] +**whole_expansion_ids** | **List[UUID]** | Selected execution IDs whose entire mapped expansion should be cleared. | [optional] ## Example diff --git a/docs/ConnectionApi.md b/docs/ConnectionApi.md index fa060ab2..2fec4171 100644 --- a/docs/ConnectionApi.md +++ b/docs/ConnectionApi.md @@ -868,6 +868,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful Response | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **422** | Validation Error | - | diff --git a/docs/DAGApi.md b/docs/DAGApi.md index bd0dfa62..d7202a05 100644 --- a/docs/DAGApi.md +++ b/docs/DAGApi.md @@ -4,6 +4,7 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- +[**bulk_dags**](DAGApi.md#bulk_dags) | **PATCH** /api/v2/dags/bulk | Bulk Dags [**delete_dag**](DAGApi.md#delete_dag) | **DELETE** /api/v2/dags/{dag_id} | Delete Dag [**favorite_dag**](DAGApi.md#favorite_dag) | **POST** /api/v2/dags/{dag_id}/favorite | Favorite Dag [**get_dag**](DAGApi.md#get_dag) | **GET** /api/v2/dags/{dag_id} | Get Dag @@ -15,6 +16,91 @@ Method | HTTP request | Description [**unfavorite_dag**](DAGApi.md#unfavorite_dag) | **POST** /api/v2/dags/{dag_id}/unfavorite | Unfavorite Dag +# **bulk_dags** +> BulkResponse bulk_dags(bulk_body_bulk_dag_body) + +Bulk Dags + +Bulk pause, resume, or drain Dags by id. + +### Example + +* OAuth Authentication (OAuth2PasswordBearer): +* Bearer Authentication (HTTPBearer): + +```python +import airflow_client.client +from airflow_client.client.models.bulk_body_bulk_dag_body import BulkBodyBulkDAGBody +from airflow_client.client.models.bulk_response import BulkResponse +from airflow_client.client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = airflow_client.client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure Bearer authorization: HTTPBearer +configuration = airflow_client.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with airflow_client.client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = airflow_client.client.DAGApi(api_client) + bulk_body_bulk_dag_body = airflow_client.client.BulkBodyBulkDAGBody() # BulkBodyBulkDAGBody | + + try: + # Bulk Dags + api_response = api_instance.bulk_dags(bulk_body_bulk_dag_body) + print("The response of DAGApi->bulk_dags:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DAGApi->bulk_dags: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **bulk_body_bulk_dag_body** | [**BulkBodyBulkDAGBody**](BulkBodyBulkDAGBody.md)| | + +### Return type + +[**BulkResponse**](BulkResponse.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **delete_dag** > object delete_dag(dag_id) @@ -179,6 +265,7 @@ void (empty response body) **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -448,7 +535,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_dags** -> DAGCollectionResponse get_dags(limit=limit, offset=offset, tags=tags, tags_match_mode=tags_match_mode, owners=owners, dag_id_pattern=dag_id_pattern, dag_id_prefix_pattern=dag_id_prefix_pattern, dag_display_name_pattern=dag_display_name_pattern, dag_display_name_prefix_pattern=dag_display_name_prefix_pattern, exclude_stale=exclude_stale, paused=paused, has_import_errors=has_import_errors, last_dag_run_state=last_dag_run_state, bundle_name=bundle_name, bundle_version=bundle_version, has_asset_schedule=has_asset_schedule, asset_dependency=asset_dependency, dag_run_start_date_gte=dag_run_start_date_gte, dag_run_start_date_gt=dag_run_start_date_gt, dag_run_start_date_lte=dag_run_start_date_lte, dag_run_start_date_lt=dag_run_start_date_lt, dag_run_end_date_gte=dag_run_end_date_gte, dag_run_end_date_gt=dag_run_end_date_gt, dag_run_end_date_lte=dag_run_end_date_lte, dag_run_end_date_lt=dag_run_end_date_lt, dag_run_state=dag_run_state, order_by=order_by, is_favorite=is_favorite, timetable_type=timetable_type) +> DAGCollectionResponse get_dags(is_scheduled=is_scheduled, limit=limit, offset=offset, tags=tags, tags_match_mode=tags_match_mode, owners=owners, dag_id_pattern=dag_id_pattern, dag_id_prefix_pattern=dag_id_prefix_pattern, dag_display_name_pattern=dag_display_name_pattern, dag_display_name_prefix_pattern=dag_display_name_prefix_pattern, exclude_stale=exclude_stale, paused=paused, has_import_errors=has_import_errors, last_dag_run_state=last_dag_run_state, bundle_name=bundle_name, bundle_version=bundle_version, has_asset_schedule=has_asset_schedule, asset_dependency=asset_dependency, dag_run_start_date_gte=dag_run_start_date_gte, dag_run_start_date_gt=dag_run_start_date_gt, dag_run_start_date_lte=dag_run_start_date_lte, dag_run_start_date_lt=dag_run_start_date_lt, dag_run_end_date_gte=dag_run_end_date_gte, dag_run_end_date_gt=dag_run_end_date_gt, dag_run_end_date_lte=dag_run_end_date_lte, dag_run_end_date_lt=dag_run_end_date_lt, dag_run_state=dag_run_state, order_by=order_by, is_favorite=is_favorite, timetable_type=timetable_type) Get Dags @@ -487,6 +574,7 @@ configuration = airflow_client.client.Configuration( with airflow_client.client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = airflow_client.client.DAGApi(api_client) + is_scheduled = True # bool | Filter Dags by whether their timetable can create scheduled runs. (optional) limit = 50 # int | (optional) (default to 50) offset = 0 # int | (optional) (default to 0) tags = ['tags_example'] # List[str] | (optional) @@ -513,13 +601,13 @@ with airflow_client.client.ApiClient(configuration) as api_client: dag_run_end_date_lte = '2013-10-20T19:20:30+01:00' # datetime | (optional) dag_run_end_date_lt = '2013-10-20T19:20:30+01:00' # datetime | (optional) dag_run_state = ['dag_run_state_example'] # List[str] | (optional) - order_by = ["dag_id"] # List[str] | Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `dag_id, dag_display_name, next_dagrun, state, start_date, last_run_state, last_run_start_date` (optional) (default to ["dag_id"]) + order_by = ["dag_id"] # List[str] | Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `dag_id, dag_display_name, next_dagrun, last_run_state, last_run_start_date` (optional) (default to ["dag_id"]) is_favorite = True # bool | (optional) timetable_type = ['timetable_type_example'] # List[str] | (optional) try: # Get Dags - api_response = api_instance.get_dags(limit=limit, offset=offset, tags=tags, tags_match_mode=tags_match_mode, owners=owners, dag_id_pattern=dag_id_pattern, dag_id_prefix_pattern=dag_id_prefix_pattern, dag_display_name_pattern=dag_display_name_pattern, dag_display_name_prefix_pattern=dag_display_name_prefix_pattern, exclude_stale=exclude_stale, paused=paused, has_import_errors=has_import_errors, last_dag_run_state=last_dag_run_state, bundle_name=bundle_name, bundle_version=bundle_version, has_asset_schedule=has_asset_schedule, asset_dependency=asset_dependency, dag_run_start_date_gte=dag_run_start_date_gte, dag_run_start_date_gt=dag_run_start_date_gt, dag_run_start_date_lte=dag_run_start_date_lte, dag_run_start_date_lt=dag_run_start_date_lt, dag_run_end_date_gte=dag_run_end_date_gte, dag_run_end_date_gt=dag_run_end_date_gt, dag_run_end_date_lte=dag_run_end_date_lte, dag_run_end_date_lt=dag_run_end_date_lt, dag_run_state=dag_run_state, order_by=order_by, is_favorite=is_favorite, timetable_type=timetable_type) + api_response = api_instance.get_dags(is_scheduled=is_scheduled, limit=limit, offset=offset, tags=tags, tags_match_mode=tags_match_mode, owners=owners, dag_id_pattern=dag_id_pattern, dag_id_prefix_pattern=dag_id_prefix_pattern, dag_display_name_pattern=dag_display_name_pattern, dag_display_name_prefix_pattern=dag_display_name_prefix_pattern, exclude_stale=exclude_stale, paused=paused, has_import_errors=has_import_errors, last_dag_run_state=last_dag_run_state, bundle_name=bundle_name, bundle_version=bundle_version, has_asset_schedule=has_asset_schedule, asset_dependency=asset_dependency, dag_run_start_date_gte=dag_run_start_date_gte, dag_run_start_date_gt=dag_run_start_date_gt, dag_run_start_date_lte=dag_run_start_date_lte, dag_run_start_date_lt=dag_run_start_date_lt, dag_run_end_date_gte=dag_run_end_date_gte, dag_run_end_date_gt=dag_run_end_date_gt, dag_run_end_date_lte=dag_run_end_date_lte, dag_run_end_date_lt=dag_run_end_date_lt, dag_run_state=dag_run_state, order_by=order_by, is_favorite=is_favorite, timetable_type=timetable_type) print("The response of DAGApi->get_dags:\n") pprint(api_response) except Exception as e: @@ -533,6 +621,7 @@ with airflow_client.client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **is_scheduled** | **bool**| Filter Dags by whether their timetable can create scheduled runs. | [optional] **limit** | **int**| | [optional] [default to 50] **offset** | **int**| | [optional] [default to 0] **tags** | [**List[str]**](str.md)| | [optional] @@ -559,7 +648,7 @@ Name | Type | Description | Notes **dag_run_end_date_lte** | **datetime**| | [optional] **dag_run_end_date_lt** | **datetime**| | [optional] **dag_run_state** | [**List[str]**](str.md)| | [optional] - **order_by** | [**List[str]**](str.md)| Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `dag_id, dag_display_name, next_dagrun, state, start_date, last_run_state, last_run_start_date` | [optional] [default to ["dag_id"]] + **order_by** | [**List[str]**](str.md)| Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `dag_id, dag_display_name, next_dagrun, last_run_state, last_run_start_date` | [optional] [default to ["dag_id"]] **is_favorite** | **bool**| | [optional] **timetable_type** | [**List[str]**](str.md)| | [optional] diff --git a/docs/DAGDetailsResponse.md b/docs/DAGDetailsResponse.md index 3b2d068c..398d64e5 100644 --- a/docs/DAGDetailsResponse.md +++ b/docs/DAGDetailsResponse.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **active_runs_count** | **int** | | [optional] [default to 0] **allowed_run_types** | [**List[DagRunType]**](DagRunType.md) | | [optional] -**asset_expression** | **Dict[str, object]** | | [optional] +**asset_expression** | [**DAGDetailsResponseAssetExpression**](DAGDetailsResponseAssetExpression.md) | | [optional] **bundle_name** | **str** | | [optional] **bundle_version** | **str** | | [optional] **catchup** | **bool** | | @@ -21,7 +21,7 @@ Name | Type | Description | Notes **doc_md** | **str** | | [optional] **end_date** | **datetime** | | [optional] **file_token** | **str** | Return file token. | [readonly] -**fileloc** | **str** | | +**fileloc** | **str** | | [optional] **has_import_errors** | **bool** | | **has_task_concurrency_limits** | **bool** | | **is_backfillable** | **bool** | Whether this Dag's schedule supports backfilling. | [readonly] @@ -47,8 +47,10 @@ Name | Type | Description | Notes **relative_fileloc** | **str** | | [optional] **render_template_as_native_obj** | **bool** | | **rerun_with_latest_version** | **bool** | | [optional] +**scheduling_state** | [**DagSchedulingState**](DagSchedulingState.md) | | [optional] **start_date** | **datetime** | | [optional] **tags** | [**List[DagTagResponse]**](DagTagResponse.md) | | +**team_name** | **str** | | [optional] **template_search_path** | **List[str]** | | [optional] **timetable_description** | **str** | | [optional] **timetable_partitioned** | **bool** | | diff --git a/docs/DAGDetailsResponseAssetExpression.md b/docs/DAGDetailsResponseAssetExpression.md new file mode 100644 index 00000000..c30e0876 --- /dev/null +++ b/docs/DAGDetailsResponseAssetExpression.md @@ -0,0 +1,33 @@ +# DAGDetailsResponseAssetExpression + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset** | [**AssetExpressionAssetInfo**](AssetExpressionAssetInfo.md) | | +**alias** | [**AssetExpressionAliasInfo**](AssetExpressionAliasInfo.md) | | +**asset_ref** | **Dict[str, str]** | | +**any** | [**List[AllInner]**](AllInner.md) | | +**all** | [**List[AllInner]**](AllInner.md) | | + +## Example + +```python +from airflow_client.client.models.dag_details_response_asset_expression import DAGDetailsResponseAssetExpression + +# TODO update the JSON string below +json = "{}" +# create an instance of DAGDetailsResponseAssetExpression from a JSON string +dag_details_response_asset_expression_instance = DAGDetailsResponseAssetExpression.from_json(json) +# print the JSON string representation of the object +print(DAGDetailsResponseAssetExpression.to_json()) + +# convert the object into a dict +dag_details_response_asset_expression_dict = dag_details_response_asset_expression_instance.to_dict() +# create an instance of DAGDetailsResponseAssetExpression from a dict +dag_details_response_asset_expression_from_dict = DAGDetailsResponseAssetExpression.from_dict(dag_details_response_asset_expression_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DAGPatchBody.md b/docs/DAGPatchBody.md index ceed33e5..5cfd4e69 100644 --- a/docs/DAGPatchBody.md +++ b/docs/DAGPatchBody.md @@ -6,7 +6,8 @@ Dag Serializer for updatable bodies. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**is_paused** | **bool** | | +**is_paused** | **bool** | | [optional] +**scheduling_state** | [**DagSchedulingState**](DagSchedulingState.md) | | [optional] ## Example diff --git a/docs/DAGResponse.md b/docs/DAGResponse.md index 782b4467..0abf75ec 100644 --- a/docs/DAGResponse.md +++ b/docs/DAGResponse.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **dag_id** | **str** | | **description** | **str** | | [optional] **file_token** | **str** | Return file token. | [readonly] -**fileloc** | **str** | | +**fileloc** | **str** | | [optional] **has_import_errors** | **bool** | | **has_task_concurrency_limits** | **bool** | | **is_backfillable** | **bool** | Whether this Dag's schedule supports backfilling. | [readonly] @@ -31,6 +31,7 @@ Name | Type | Description | Notes **next_dagrun_run_after** | **datetime** | | [optional] **owners** | **List[str]** | | **relative_fileloc** | **str** | | [optional] +**scheduling_state** | [**DagSchedulingState**](DagSchedulingState.md) | | [optional] **tags** | [**List[DagTagResponse]**](DagTagResponse.md) | | **timetable_description** | **str** | | [optional] **timetable_partitioned** | **bool** | | diff --git a/docs/DAGRunResponse.md b/docs/DAGRunResponse.md index a4c88a9d..4521d6cd 100644 --- a/docs/DAGRunResponse.md +++ b/docs/DAGRunResponse.md @@ -26,6 +26,7 @@ Name | Type | Description | Notes **run_type** | [**DagRunType**](DagRunType.md) | | **start_date** | **datetime** | | [optional] **state** | [**DagRunState**](DagRunState.md) | | +**team_name** | **str** | | [optional] **triggered_by** | [**DagRunTriggeredByType**](DagRunTriggeredByType.md) | | [optional] **triggering_user_name** | **str** | | [optional] diff --git a/docs/DAGSourceResponse.md b/docs/DAGSourceResponse.md index 28bad04f..e514f985 100644 --- a/docs/DAGSourceResponse.md +++ b/docs/DAGSourceResponse.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **content** | **str** | | [optional] **dag_display_name** | **str** | | **dag_id** | **str** | | +**language** | **str** | | [optional] **version_number** | **int** | | [optional] ## Example diff --git a/docs/DAGWarningResponse.md b/docs/DAGWarningResponse.md index c2c5121c..d36c5e16 100644 --- a/docs/DAGWarningResponse.md +++ b/docs/DAGWarningResponse.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **dag_id** | **str** | | **message** | **str** | | **timestamp** | **datetime** | | -**warning_type** | [**DagWarningType**](DagWarningType.md) | | +**warning_type** | [**WarningType1**](WarningType1.md) | | ## Example diff --git a/docs/DagBundleApi.md b/docs/DagBundleApi.md new file mode 100644 index 00000000..7a8647a1 --- /dev/null +++ b/docs/DagBundleApi.md @@ -0,0 +1,296 @@ +# airflow_client.client.DagBundleApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_dag_bundle**](DagBundleApi.md#get_dag_bundle) | **GET** /api/v2/dagBundles/{bundle_name} | Get Dag Bundle +[**get_dag_bundle_files**](DagBundleApi.md#get_dag_bundle_files) | **GET** /api/v2/dagBundles/{bundle_name}/files | Get Dag Bundle Files +[**get_dag_bundles**](DagBundleApi.md#get_dag_bundles) | **GET** /api/v2/dagBundles | Get Dag Bundles + + +# **get_dag_bundle** +> DagBundleDetailResponse get_dag_bundle(bundle_name) + +Get Dag Bundle + +Get a Dag bundle. + +### Example + +* OAuth Authentication (OAuth2PasswordBearer): +* Bearer Authentication (HTTPBearer): + +```python +import airflow_client.client +from airflow_client.client.models.dag_bundle_detail_response import DagBundleDetailResponse +from airflow_client.client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = airflow_client.client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure Bearer authorization: HTTPBearer +configuration = airflow_client.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with airflow_client.client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = airflow_client.client.DagBundleApi(api_client) + bundle_name = 'bundle_name_example' # str | + + try: + # Get Dag Bundle + api_response = api_instance.get_dag_bundle(bundle_name) + print("The response of DagBundleApi->get_dag_bundle:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DagBundleApi->get_dag_bundle: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **bundle_name** | **str**| | + +### Return type + +[**DagBundleDetailResponse**](DagBundleDetailResponse.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_dag_bundle_files** +> DagBundleFileCollectionResponse get_dag_bundle_files(bundle_name, limit=limit, offset=offset) + +Get Dag Bundle Files + +List the files in a Dag bundle, ordered by path. + +A file is listed when the caller can read at least one Dag it defines. A file that recorded an +import error without registering any Dag is listed too, on the same admin-by-default terms as +``GET /importErrors`` -- a file that fails before defining a Dag has no Dag to authorize on, +and it is the case this page most needs to show. + +``dag_count`` counts live Dags only. Dag rows are never deleted: a file that fails to import +has every Dag in it marked stale, and so does a file dropped from the bundle. A file therefore +stays listed on the strength of a live Dag *or* an import error, so a file that has just broken +does not vanish from the page someone opened to find out why, while a file deleted long ago +drops out instead of lingering forever. + +Parse times come from the Dags in the file rather than the file itself, which is the only +record Airflow keeps: a file whose every Dag was removed keeps no parse time of its own. + +### Example + +* OAuth Authentication (OAuth2PasswordBearer): +* Bearer Authentication (HTTPBearer): + +```python +import airflow_client.client +from airflow_client.client.models.dag_bundle_file_collection_response import DagBundleFileCollectionResponse +from airflow_client.client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = airflow_client.client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure Bearer authorization: HTTPBearer +configuration = airflow_client.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with airflow_client.client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = airflow_client.client.DagBundleApi(api_client) + bundle_name = 'bundle_name_example' # str | + limit = 50 # int | (optional) (default to 50) + offset = 0 # int | (optional) (default to 0) + + try: + # Get Dag Bundle Files + api_response = api_instance.get_dag_bundle_files(bundle_name, limit=limit, offset=offset) + print("The response of DagBundleApi->get_dag_bundle_files:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DagBundleApi->get_dag_bundle_files: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **bundle_name** | **str**| | + **limit** | **int**| | [optional] [default to 50] + **offset** | **int**| | [optional] [default to 0] + +### Return type + +[**DagBundleFileCollectionResponse**](DagBundleFileCollectionResponse.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_dag_bundles** +> DagBundleCollectionResponse get_dag_bundles(limit=limit, offset=offset, order_by=order_by) + +Get Dag Bundles + +List the Dag bundles Airflow knows about. + +Reports the version of each bundle Airflow currently holds and when a Dag processor last +refreshed it, so whoever deployed the code can tell whether it has been picked up yet. + +A bundle is visible to a user who can read at least one Dag recorded against it. A bundle +holding no registered Dag at all has nothing to authorize against, so it is listed only for a +user holding the admin-by-default ``AccessView.IMPORT_ERRORS_ALL`` for that bundle's team -- +the same view, scoped the same way, that governs import errors for a file that never +registered a Dag. + +### Example + +* OAuth Authentication (OAuth2PasswordBearer): +* Bearer Authentication (HTTPBearer): + +```python +import airflow_client.client +from airflow_client.client.models.dag_bundle_collection_response import DagBundleCollectionResponse +from airflow_client.client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = airflow_client.client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure Bearer authorization: HTTPBearer +configuration = airflow_client.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with airflow_client.client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = airflow_client.client.DagBundleApi(api_client) + limit = 50 # int | (optional) (default to 50) + offset = 0 # int | (optional) (default to 0) + order_by = ["name"] # List[str] | Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `name, version, last_refreshed, active` (optional) (default to ["name"]) + + try: + # Get Dag Bundles + api_response = api_instance.get_dag_bundles(limit=limit, offset=offset, order_by=order_by) + print("The response of DagBundleApi->get_dag_bundles:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DagBundleApi->get_dag_bundles: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| | [optional] [default to 50] + **offset** | **int**| | [optional] [default to 0] + **order_by** | [**List[str]**](str.md)| Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `name, version, last_refreshed, active` | [optional] [default to ["name"]] + +### Return type + +[**DagBundleCollectionResponse**](DagBundleCollectionResponse.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/DagBundleCollectionResponse.md b/docs/DagBundleCollectionResponse.md new file mode 100644 index 00000000..19377521 --- /dev/null +++ b/docs/DagBundleCollectionResponse.md @@ -0,0 +1,31 @@ +# DagBundleCollectionResponse + +Dag bundle collection response. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dag_bundles** | [**List[DagBundleResponse]**](DagBundleResponse.md) | | +**total_entries** | **int** | | + +## Example + +```python +from airflow_client.client.models.dag_bundle_collection_response import DagBundleCollectionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DagBundleCollectionResponse from a JSON string +dag_bundle_collection_response_instance = DagBundleCollectionResponse.from_json(json) +# print the JSON string representation of the object +print(DagBundleCollectionResponse.to_json()) + +# convert the object into a dict +dag_bundle_collection_response_dict = dag_bundle_collection_response_instance.to_dict() +# create an instance of DagBundleCollectionResponse from a dict +dag_bundle_collection_response_from_dict = DagBundleCollectionResponse.from_dict(dag_bundle_collection_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DagBundleDetailResponse.md b/docs/DagBundleDetailResponse.md new file mode 100644 index 00000000..ca3256db --- /dev/null +++ b/docs/DagBundleDetailResponse.md @@ -0,0 +1,37 @@ +# DagBundleDetailResponse + +Dag bundle serializer for the single-bundle response. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **bool** | | [optional] +**bundle_url** | **str** | | [optional] +**dag_count** | **int** | Number of live Dags recorded against the bundle that the caller is permitted to see, counted on the same terms as ``GET /dags``. | +**import_error_count** | **int** | | [optional] +**last_refreshed** | **datetime** | | [optional] +**name** | **str** | | +**team_name** | **str** | | [optional] +**version** | **str** | | [optional] + +## Example + +```python +from airflow_client.client.models.dag_bundle_detail_response import DagBundleDetailResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DagBundleDetailResponse from a JSON string +dag_bundle_detail_response_instance = DagBundleDetailResponse.from_json(json) +# print the JSON string representation of the object +print(DagBundleDetailResponse.to_json()) + +# convert the object into a dict +dag_bundle_detail_response_dict = dag_bundle_detail_response_instance.to_dict() +# create an instance of DagBundleDetailResponse from a dict +dag_bundle_detail_response_from_dict = DagBundleDetailResponse.from_dict(dag_bundle_detail_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DagBundleFileCollectionResponse.md b/docs/DagBundleFileCollectionResponse.md new file mode 100644 index 00000000..513cc720 --- /dev/null +++ b/docs/DagBundleFileCollectionResponse.md @@ -0,0 +1,31 @@ +# DagBundleFileCollectionResponse + +Dag bundle file collection response. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dag_bundle_files** | [**List[DagBundleFileResponse]**](DagBundleFileResponse.md) | | +**total_entries** | **int** | | + +## Example + +```python +from airflow_client.client.models.dag_bundle_file_collection_response import DagBundleFileCollectionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DagBundleFileCollectionResponse from a JSON string +dag_bundle_file_collection_response_instance = DagBundleFileCollectionResponse.from_json(json) +# print the JSON string representation of the object +print(DagBundleFileCollectionResponse.to_json()) + +# convert the object into a dict +dag_bundle_file_collection_response_dict = dag_bundle_file_collection_response_instance.to_dict() +# create an instance of DagBundleFileCollectionResponse from a dict +dag_bundle_file_collection_response_from_dict = DagBundleFileCollectionResponse.from_dict(dag_bundle_file_collection_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DagBundleFileResponse.md b/docs/DagBundleFileResponse.md new file mode 100644 index 00000000..e06c07f6 --- /dev/null +++ b/docs/DagBundleFileResponse.md @@ -0,0 +1,34 @@ +# DagBundleFileResponse + +A file in a Dag bundle, as the Dag processor last saw it. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dag_count** | **int** | Number of live Dags the file defines that the caller may read. | +**import_error_count** | **int** | | [optional] +**last_parse_duration** | **float** | | [optional] +**last_parsed_time** | **datetime** | | [optional] +**relative_fileloc** | **str** | | + +## Example + +```python +from airflow_client.client.models.dag_bundle_file_response import DagBundleFileResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DagBundleFileResponse from a JSON string +dag_bundle_file_response_instance = DagBundleFileResponse.from_json(json) +# print the JSON string representation of the object +print(DagBundleFileResponse.to_json()) + +# convert the object into a dict +dag_bundle_file_response_dict = dag_bundle_file_response_instance.to_dict() +# create an instance of DagBundleFileResponse from a dict +dag_bundle_file_response_from_dict = DagBundleFileResponse.from_dict(dag_bundle_file_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DagBundleResponse.md b/docs/DagBundleResponse.md new file mode 100644 index 00000000..b2da6963 --- /dev/null +++ b/docs/DagBundleResponse.md @@ -0,0 +1,36 @@ +# DagBundleResponse + +Dag bundle serializer for responses. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **bool** | | [optional] +**bundle_url** | **str** | | [optional] +**import_error_count** | **int** | | [optional] +**last_refreshed** | **datetime** | | [optional] +**name** | **str** | | +**team_name** | **str** | | [optional] +**version** | **str** | | [optional] + +## Example + +```python +from airflow_client.client.models.dag_bundle_response import DagBundleResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DagBundleResponse from a JSON string +dag_bundle_response_instance = DagBundleResponse.from_json(json) +# print the JSON string representation of the object +print(DagBundleResponse.to_json()) + +# convert the object into a dict +dag_bundle_response_dict = dag_bundle_response_instance.to_dict() +# create an instance of DagBundleResponse from a dict +dag_bundle_response_from_dict = DagBundleResponse.from_dict(dag_bundle_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DagProcessorInfoResponse.md b/docs/DagProcessorInfoResponse.md index 89cb04ec..c670656e 100644 --- a/docs/DagProcessorInfoResponse.md +++ b/docs/DagProcessorInfoResponse.md @@ -6,8 +6,10 @@ DagProcessor info serializer for responses. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**detailed_status** | [**DetailedHealthStatus**](DetailedHealthStatus.md) | | [optional] +**instances** | [**List[DagProcessorInstanceInfoResponse]**](DagProcessorInstanceInfoResponse.md) | | [optional] **latest_dag_processor_heartbeat** | **str** | | [optional] -**status** | **str** | | [optional] +**status** | [**HealthStatus**](HealthStatus.md) | | [optional] ## Example diff --git a/docs/DagProcessorInstanceInfoResponse.md b/docs/DagProcessorInstanceInfoResponse.md new file mode 100644 index 00000000..962b2289 --- /dev/null +++ b/docs/DagProcessorInstanceInfoResponse.md @@ -0,0 +1,32 @@ +# DagProcessorInstanceInfoResponse + +Dag processor instance info serializer for responses. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bundle_names** | **List[str]** | | [optional] +**hostname** | **str** | | [optional] +**latest_dag_processor_heartbeat** | **str** | | [optional] + +## Example + +```python +from airflow_client.client.models.dag_processor_instance_info_response import DagProcessorInstanceInfoResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DagProcessorInstanceInfoResponse from a JSON string +dag_processor_instance_info_response_instance = DagProcessorInstanceInfoResponse.from_json(json) +# print the JSON string representation of the object +print(DagProcessorInstanceInfoResponse.to_json()) + +# convert the object into a dict +dag_processor_instance_info_response_dict = dag_processor_instance_info_response_instance.to_dict() +# create an instance of DagProcessorInstanceInfoResponse from a dict +dag_processor_instance_info_response_from_dict = DagProcessorInstanceInfoResponse.from_dict(dag_processor_instance_info_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DagRunApi.md b/docs/DagRunApi.md index def2cf1f..a6ef7c75 100644 --- a/docs/DagRunApi.md +++ b/docs/DagRunApi.md @@ -543,7 +543,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_dag_runs** -> DAGRunCollectionResponse get_dag_runs(dag_id, partition_date_gte=partition_date_gte, partition_date_lte=partition_date_lte, cursor=cursor, limit=limit, offset=offset, run_after_gte=run_after_gte, run_after_gt=run_after_gt, run_after_lte=run_after_lte, run_after_lt=run_after_lt, logical_date_gte=logical_date_gte, logical_date_gt=logical_date_gt, logical_date_lte=logical_date_lte, logical_date_lt=logical_date_lt, start_date_gte=start_date_gte, start_date_gt=start_date_gt, start_date_lte=start_date_lte, start_date_lt=start_date_lt, end_date_gte=end_date_gte, end_date_gt=end_date_gt, end_date_lte=end_date_lte, end_date_lt=end_date_lt, duration_gte=duration_gte, duration_gt=duration_gt, duration_lte=duration_lte, duration_lt=duration_lt, updated_at_gte=updated_at_gte, updated_at_gt=updated_at_gt, updated_at_lte=updated_at_lte, updated_at_lt=updated_at_lt, conf_contains=conf_contains, run_type=run_type, state=state, dag_version=dag_version, bundle_version=bundle_version, order_by=order_by, run_id_pattern=run_id_pattern, run_id_prefix_pattern=run_id_prefix_pattern, triggering_user_name_pattern=triggering_user_name_pattern, triggering_user_name_prefix_pattern=triggering_user_name_prefix_pattern, dag_id_pattern=dag_id_pattern, dag_id_prefix_pattern=dag_id_prefix_pattern, partition_key_pattern=partition_key_pattern, partition_key_prefix_pattern=partition_key_prefix_pattern, consuming_asset_pattern=consuming_asset_pattern) +> DAGRunCollectionResponse get_dag_runs(dag_id, partition_date_gte=partition_date_gte, partition_date_lte=partition_date_lte, cursor=cursor, limit=limit, offset=offset, run_after_gte=run_after_gte, run_after_gt=run_after_gt, run_after_lte=run_after_lte, run_after_lt=run_after_lt, logical_date_gte=logical_date_gte, logical_date_gt=logical_date_gt, logical_date_lte=logical_date_lte, logical_date_lt=logical_date_lt, start_date_gte=start_date_gte, start_date_gt=start_date_gt, start_date_lte=start_date_lte, start_date_lt=start_date_lt, end_date_gte=end_date_gte, end_date_gt=end_date_gt, end_date_lte=end_date_lte, end_date_lt=end_date_lt, duration_gte=duration_gte, duration_gt=duration_gt, duration_lte=duration_lte, duration_lt=duration_lt, updated_at_gte=updated_at_gte, updated_at_gt=updated_at_gt, updated_at_lte=updated_at_lte, updated_at_lt=updated_at_lt, conf_contains=conf_contains, run_type=run_type, state=state, dag_version=dag_version, bundle_version=bundle_version, teams=teams, tags=tags, tags_match_mode=tags_match_mode, order_by=order_by, run_id_pattern=run_id_pattern, run_id_prefix_pattern=run_id_prefix_pattern, triggering_user_name_pattern=triggering_user_name_pattern, triggering_user_name_prefix_pattern=triggering_user_name_prefix_pattern, dag_id_pattern=dag_id_pattern, dag_id_prefix_pattern=dag_id_prefix_pattern, partition_key_pattern=partition_key_pattern, partition_key_prefix_pattern=partition_key_prefix_pattern, consuming_asset_pattern=consuming_asset_pattern) Get Dag Runs @@ -629,6 +629,9 @@ with airflow_client.client.ApiClient(configuration) as api_client: state = ['state_example'] # List[str] | (optional) dag_version = [56] # List[int] | (optional) bundle_version = 'bundle_version_example' # str | (optional) + teams = ['teams_example'] # List[str] | (optional) + tags = ['tags_example'] # List[str] | (optional) + tags_match_mode = 'tags_match_mode_example' # str | (optional) order_by = ["id"] # List[str] | Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, state, dag_id, run_id, logical_date, partition_date, run_after, start_date, end_date, updated_at, conf, duration, dag_run_id` (optional) (default to ["id"]) run_id_pattern = 'run_id_pattern_example' # str | Case-insensitive substring match (SQL `ILIKE`). Slower than `run_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". (optional) run_id_prefix_pattern = 'run_id_prefix_pattern_example' # str | Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". (optional) @@ -642,7 +645,7 @@ with airflow_client.client.ApiClient(configuration) as api_client: try: # Get Dag Runs - api_response = api_instance.get_dag_runs(dag_id, partition_date_gte=partition_date_gte, partition_date_lte=partition_date_lte, cursor=cursor, limit=limit, offset=offset, run_after_gte=run_after_gte, run_after_gt=run_after_gt, run_after_lte=run_after_lte, run_after_lt=run_after_lt, logical_date_gte=logical_date_gte, logical_date_gt=logical_date_gt, logical_date_lte=logical_date_lte, logical_date_lt=logical_date_lt, start_date_gte=start_date_gte, start_date_gt=start_date_gt, start_date_lte=start_date_lte, start_date_lt=start_date_lt, end_date_gte=end_date_gte, end_date_gt=end_date_gt, end_date_lte=end_date_lte, end_date_lt=end_date_lt, duration_gte=duration_gte, duration_gt=duration_gt, duration_lte=duration_lte, duration_lt=duration_lt, updated_at_gte=updated_at_gte, updated_at_gt=updated_at_gt, updated_at_lte=updated_at_lte, updated_at_lt=updated_at_lt, conf_contains=conf_contains, run_type=run_type, state=state, dag_version=dag_version, bundle_version=bundle_version, order_by=order_by, run_id_pattern=run_id_pattern, run_id_prefix_pattern=run_id_prefix_pattern, triggering_user_name_pattern=triggering_user_name_pattern, triggering_user_name_prefix_pattern=triggering_user_name_prefix_pattern, dag_id_pattern=dag_id_pattern, dag_id_prefix_pattern=dag_id_prefix_pattern, partition_key_pattern=partition_key_pattern, partition_key_prefix_pattern=partition_key_prefix_pattern, consuming_asset_pattern=consuming_asset_pattern) + api_response = api_instance.get_dag_runs(dag_id, partition_date_gte=partition_date_gte, partition_date_lte=partition_date_lte, cursor=cursor, limit=limit, offset=offset, run_after_gte=run_after_gte, run_after_gt=run_after_gt, run_after_lte=run_after_lte, run_after_lt=run_after_lt, logical_date_gte=logical_date_gte, logical_date_gt=logical_date_gt, logical_date_lte=logical_date_lte, logical_date_lt=logical_date_lt, start_date_gte=start_date_gte, start_date_gt=start_date_gt, start_date_lte=start_date_lte, start_date_lt=start_date_lt, end_date_gte=end_date_gte, end_date_gt=end_date_gt, end_date_lte=end_date_lte, end_date_lt=end_date_lt, duration_gte=duration_gte, duration_gt=duration_gt, duration_lte=duration_lte, duration_lt=duration_lt, updated_at_gte=updated_at_gte, updated_at_gt=updated_at_gt, updated_at_lte=updated_at_lte, updated_at_lt=updated_at_lt, conf_contains=conf_contains, run_type=run_type, state=state, dag_version=dag_version, bundle_version=bundle_version, teams=teams, tags=tags, tags_match_mode=tags_match_mode, order_by=order_by, run_id_pattern=run_id_pattern, run_id_prefix_pattern=run_id_prefix_pattern, triggering_user_name_pattern=triggering_user_name_pattern, triggering_user_name_prefix_pattern=triggering_user_name_prefix_pattern, dag_id_pattern=dag_id_pattern, dag_id_prefix_pattern=dag_id_prefix_pattern, partition_key_pattern=partition_key_pattern, partition_key_prefix_pattern=partition_key_prefix_pattern, consuming_asset_pattern=consuming_asset_pattern) print("The response of DagRunApi->get_dag_runs:\n") pprint(api_response) except Exception as e: @@ -691,6 +694,9 @@ Name | Type | Description | Notes **state** | [**List[str]**](str.md)| | [optional] **dag_version** | [**List[int]**](int.md)| | [optional] **bundle_version** | **str**| | [optional] + **teams** | [**List[str]**](str.md)| | [optional] + **tags** | [**List[str]**](str.md)| | [optional] + **tags_match_mode** | **str**| | [optional] **order_by** | [**List[str]**](str.md)| Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, state, dag_id, run_id, logical_date, partition_date, run_after, start_date, end_date, updated_at, conf, duration, dag_run_id` | [optional] [default to ["id"]] **run_id_pattern** | **str**| Case-insensitive substring match (SQL `ILIKE`). Slower than `run_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". | [optional] **run_id_prefix_pattern** | **str**| Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". | [optional] @@ -1172,6 +1178,7 @@ Name | Type | Description | Notes **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/DagRunAssetReference.md b/docs/DagRunAssetReference.md index 41b16ed2..d1814a18 100644 --- a/docs/DagRunAssetReference.md +++ b/docs/DagRunAssetReference.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **logical_date** | **datetime** | | [optional] **partition_key** | **str** | | [optional] **run_id** | **str** | | -**start_date** | **datetime** | | +**start_date** | **datetime** | | [optional] **state** | **str** | | **triggering** | **bool** | Whether this asset event triggered the referenced dag run. Only a run's most recent consumed asset event triggers it; earlier consumed events are included in the run but did not trigger it. | diff --git a/docs/DagScheduleAssetReference.md b/docs/DagScheduleAssetReference.md index cb602af8..9e8e4a4e 100644 --- a/docs/DagScheduleAssetReference.md +++ b/docs/DagScheduleAssetReference.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **created_at** | **datetime** | | **dag_id** | **str** | | +**team_name** | **str** | | [optional] **updated_at** | **datetime** | | ## Example diff --git a/docs/DagSchedulingState.md b/docs/DagSchedulingState.md new file mode 100644 index 00000000..f6845bf6 --- /dev/null +++ b/docs/DagSchedulingState.md @@ -0,0 +1,15 @@ +# DagSchedulingState + +States controlling whether a Dag can create and schedule work. + +## Enum + +* `ACTIVE` (value: `'active'`) + +* `DRAINING` (value: `'draining'`) + +* `PAUSED` (value: `'paused'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DagVersionApi.md b/docs/DagVersionApi.md index 52ba851c..20d145fb 100644 --- a/docs/DagVersionApi.md +++ b/docs/DagVersionApi.md @@ -5,6 +5,7 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- [**get_dag_version**](DagVersionApi.md#get_dag_version) | **GET** /api/v2/dags/{dag_id}/dagVersions/{version_number} | Get Dag Version +[**get_dag_version_diff**](DagVersionApi.md#get_dag_version_diff) | **GET** /api/v2/dags/{dag_id}/dagVersions/diff | Experimental: Compare what two stored versions of a Dag currently hold. [**get_dag_versions**](DagVersionApi.md#get_dag_versions) | **GET** /api/v2/dags/{dag_id}/dagVersions | Get Dag Versions @@ -95,6 +96,100 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_dag_version_diff** +> DagVersionDiffResponse get_dag_version_diff(dag_id, base_version_number, target_version_number, max_changes=max_changes) + +Experimental: Compare what two stored versions of a Dag currently hold. + +🚧 This is an experimental endpoint and may change or be removed without notice. + +Reports observed state — what the two stored versions currently hold — not why a version was created. Version access returns the changed structure with identifying path components masked; the raw values behind those changes, and the paths that name them, are disclosed only to a caller who may also read the Dag's code. + +### Example + +* OAuth Authentication (OAuth2PasswordBearer): +* Bearer Authentication (HTTPBearer): + +```python +import airflow_client.client +from airflow_client.client.models.dag_version_diff_response import DagVersionDiffResponse +from airflow_client.client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = airflow_client.client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure Bearer authorization: HTTPBearer +configuration = airflow_client.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with airflow_client.client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = airflow_client.client.DagVersionApi(api_client) + dag_id = 'dag_id_example' # str | + base_version_number = 56 # int | Version to compare from. + target_version_number = 56 # int | Version to compare to. + max_changes = 500 # int | Largest number of records `changes` may hold. A repeat of a path already recorded does not count towards it, and `truncated` says whether the bound dropped anything. (optional) (default to 500) + + try: + # Experimental: Compare what two stored versions of a Dag currently hold. + api_response = api_instance.get_dag_version_diff(dag_id, base_version_number, target_version_number, max_changes=max_changes) + print("The response of DagVersionApi->get_dag_version_diff:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DagVersionApi->get_dag_version_diff: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dag_id** | **str**| | + **base_version_number** | **int**| Version to compare from. | + **target_version_number** | **int**| Version to compare to. | + **max_changes** | **int**| Largest number of records `changes` may hold. A repeat of a path already recorded does not count towards it, and `truncated` says whether the bound dropped anything. | [optional] [default to 500] + +### Return type + +[**DagVersionDiffResponse**](DagVersionDiffResponse.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_dag_versions** > DAGVersionCollectionResponse get_dag_versions(dag_id, limit=limit, offset=offset, version_number=version_number, bundle_name=bundle_name, bundle_version=bundle_version, order_by=order_by) diff --git a/docs/DagVersionDiffCategory.md b/docs/DagVersionDiffCategory.md new file mode 100644 index 00000000..41573b75 --- /dev/null +++ b/docs/DagVersionDiffCategory.md @@ -0,0 +1,31 @@ +# DagVersionDiffCategory + +What part of a Dag a difference belongs to. Mirrors ``DiffCategory``. + +## Enum + +* `ASSET` (value: `'asset'`) + +* `AUTHORIZATION` (value: `'authorization'`) + +* `CALLBACK` (value: `'callback'`) + +* `DEADLINE` (value: `'deadline'`) + +* `DEPENDENCY` (value: `'dependency'`) + +* `METADATA` (value: `'metadata'`) + +* `PARAM` (value: `'param'`) + +* `PROVENANCE` (value: `'provenance'`) + +* `SCHEDULE` (value: `'schedule'`) + +* `TASK` (value: `'task'`) + +* `UNKNOWN` (value: `'unknown'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DagVersionDiffChangeResponse.md b/docs/DagVersionDiffChangeResponse.md new file mode 100644 index 00000000..ba767248 --- /dev/null +++ b/docs/DagVersionDiffChangeResponse.md @@ -0,0 +1,38 @@ +# DagVersionDiffChangeResponse + +One structural difference between two stored Dag versions. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**after_digest** | **str** | | [optional] +**after_value** | **object** | The value this path holds in the target version. Present only when values are disclosed, and omitted entirely when the change has no after side — which is how an absent side is told apart from a stored null. | [optional] +**before_digest** | **str** | | [optional] +**before_value** | **object** | The value this path held in the base version. Present only when values are disclosed, and omitted entirely when the change has no before side — which is how an absent side is told apart from a stored null. | [optional] +**category** | [**DagVersionDiffCategory**](DagVersionDiffCategory.md) | | +**impact** | [**DagVersionDiffImpact**](DagVersionDiffImpact.md) | | +**occurrence_count** | **int** | How many underlying changes this record stands for. Always 1 when values are disclosed, since each change is then its own record; a redacted record merges every change sharing its path and operation. | +**operation** | [**DagVersionDiffOperation**](DagVersionDiffOperation.md) | | +**path** | **str** | | + +## Example + +```python +from airflow_client.client.models.dag_version_diff_change_response import DagVersionDiffChangeResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DagVersionDiffChangeResponse from a JSON string +dag_version_diff_change_response_instance = DagVersionDiffChangeResponse.from_json(json) +# print the JSON string representation of the object +print(DagVersionDiffChangeResponse.to_json()) + +# convert the object into a dict +dag_version_diff_change_response_dict = dag_version_diff_change_response_instance.to_dict() +# create an instance of DagVersionDiffChangeResponse from a dict +dag_version_diff_change_response_from_dict = DagVersionDiffChangeResponse.from_dict(dag_version_diff_change_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DagVersionDiffImpact.md b/docs/DagVersionDiffImpact.md new file mode 100644 index 00000000..8615a4ee --- /dev/null +++ b/docs/DagVersionDiffImpact.md @@ -0,0 +1,19 @@ +# DagVersionDiffImpact + +What a difference affects. Mirrors ``DiffImpact``. + +## Enum + +* `AUTHORIZATION` (value: `'authorization'`) + +* `EXECUTION` (value: `'execution'`) + +* `METADATA` (value: `'metadata'`) + +* `PROVENANCE` (value: `'provenance'`) + +* `UNKNOWN` (value: `'unknown'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DagVersionDiffMode.md b/docs/DagVersionDiffMode.md new file mode 100644 index 00000000..54ea0742 --- /dev/null +++ b/docs/DagVersionDiffMode.md @@ -0,0 +1,13 @@ +# DagVersionDiffMode + +Whether a comparison could be made at all. + +## Enum + +* `OBSERVED_STATE` (value: `'observed_state'`) + +* `UNAVAILABLE` (value: `'unavailable'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DagVersionDiffOperation.md b/docs/DagVersionDiffOperation.md new file mode 100644 index 00000000..7e686a82 --- /dev/null +++ b/docs/DagVersionDiffOperation.md @@ -0,0 +1,15 @@ +# DagVersionDiffOperation + +How a difference presents at its path. + +## Enum + +* `ADDED` (value: `'added'`) + +* `REMOVED` (value: `'removed'`) + +* `CHANGED` (value: `'changed'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DagVersionDiffResponse.md b/docs/DagVersionDiffResponse.md new file mode 100644 index 00000000..61831b41 --- /dev/null +++ b/docs/DagVersionDiffResponse.md @@ -0,0 +1,39 @@ +# DagVersionDiffResponse + +Observed-state difference between two stored Dag versions. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_version_number** | **int** | | +**changes** | [**List[DagVersionDiffChangeResponse]**](DagVersionDiffChangeResponse.md) | | +**diff_schema_version** | **int** | Wire format of this payload. Incremented when its shape changes. | +**mode** | [**DagVersionDiffMode**](DagVersionDiffMode.md) | | +**serializer_versions** | [**DagVersionDiffSerializerVersions**](DagVersionDiffSerializerVersions.md) | | +**target_version_number** | **int** | | +**total_changes** | **int** | Underlying changes across every disclosed path, not the number of records. Exact when `truncated` is false; a lower bound when it is true, because the changes at dropped paths are not counted. | +**truncated** | **bool** | Whether a change at a path not already in `changes` was dropped to stay within `max_changes`. Paths that are absent are absent, not unchanged. | +**unavailable_reason** | **str** | | [optional] +**values_status** | [**DagVersionDiffValuesStatus**](DagVersionDiffValuesStatus.md) | | + +## Example + +```python +from airflow_client.client.models.dag_version_diff_response import DagVersionDiffResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DagVersionDiffResponse from a JSON string +dag_version_diff_response_instance = DagVersionDiffResponse.from_json(json) +# print the JSON string representation of the object +print(DagVersionDiffResponse.to_json()) + +# convert the object into a dict +dag_version_diff_response_dict = dag_version_diff_response_instance.to_dict() +# create an instance of DagVersionDiffResponse from a dict +dag_version_diff_response_from_dict = DagVersionDiffResponse.from_dict(dag_version_diff_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DagVersionDiffSerializerVersions.md b/docs/DagVersionDiffSerializerVersions.md new file mode 100644 index 00000000..048dd7d7 --- /dev/null +++ b/docs/DagVersionDiffSerializerVersions.md @@ -0,0 +1,31 @@ +# DagVersionDiffSerializerVersions + +Which Dag serializer format each compared version was stored under. Unrelated to ``diff_schema_version``, which versions this payload rather than the serialized Dags it describes. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base** | **int** | | [optional] +**target** | **int** | | [optional] + +## Example + +```python +from airflow_client.client.models.dag_version_diff_serializer_versions import DagVersionDiffSerializerVersions + +# TODO update the JSON string below +json = "{}" +# create an instance of DagVersionDiffSerializerVersions from a JSON string +dag_version_diff_serializer_versions_instance = DagVersionDiffSerializerVersions.from_json(json) +# print the JSON string representation of the object +print(DagVersionDiffSerializerVersions.to_json()) + +# convert the object into a dict +dag_version_diff_serializer_versions_dict = dag_version_diff_serializer_versions_instance.to_dict() +# create an instance of DagVersionDiffSerializerVersions from a dict +dag_version_diff_serializer_versions_from_dict = DagVersionDiffSerializerVersions.from_dict(dag_version_diff_serializer_versions_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DagVersionDiffValuesStatus.md b/docs/DagVersionDiffValuesStatus.md new file mode 100644 index 00000000..18f36032 --- /dev/null +++ b/docs/DagVersionDiffValuesStatus.md @@ -0,0 +1,13 @@ +# DagVersionDiffValuesStatus + +Whether values were disclosed. Mirrors ``ValuesStatus``. + +## Enum + +* `AVAILABLE` (value: `'available'`) + +* `UNAVAILABLE` (value: `'unavailable'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DagWarningApi.md b/docs/DagWarningApi.md index 09e5aa50..078bd63c 100644 --- a/docs/DagWarningApi.md +++ b/docs/DagWarningApi.md @@ -48,7 +48,7 @@ with airflow_client.client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = airflow_client.client.DagWarningApi(api_client) dag_id = 'dag_id_example' # str | (optional) - warning_type = airflow_client.client.DagWarningType() # DagWarningType | (optional) + warning_type = airflow_client.client.WarningType() # WarningType | (optional) limit = 50 # int | (optional) (default to 50) offset = 0 # int | (optional) (default to 0) order_by = ["dag_id"] # List[str] | Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `dag_id, warning_type, message, timestamp` (optional) (default to ["dag_id"]) @@ -70,7 +70,7 @@ with airflow_client.client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **dag_id** | **str**| | [optional] - **warning_type** | [**DagWarningType**](.md)| | [optional] + **warning_type** | [**WarningType**](.md)| | [optional] **limit** | **int**| | [optional] [default to 50] **offset** | **int**| | [optional] [default to 0] **order_by** | [**List[str]**](str.md)| Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `dag_id, warning_type, message, timestamp` | [optional] [default to ["dag_id"]] diff --git a/docs/DagWarningType.md b/docs/DagWarningType.md index 11ec501c..4fb1dbd7 100644 --- a/docs/DagWarningType.md +++ b/docs/DagWarningType.md @@ -6,10 +6,14 @@ Enum for DAG warning types. This is the set of allowable values for the ``warni * `ASSET_CONFLICT` (value: `'asset conflict'`) +* `DUPLICATE_DAG_ID` (value: `'duplicate dag id'`) + * `NON_MINUS_EXISTENT_POOL` (value: `'non-existent pool'`) * `RUNTIME_VARYING_VALUE` (value: `'runtime varying value'`) +* `TASK_GROUP_CYCLE` (value: `'task group cycle'`) + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DetailedHealthStatus.md b/docs/DetailedHealthStatus.md new file mode 100644 index 00000000..8317dbec --- /dev/null +++ b/docs/DetailedHealthStatus.md @@ -0,0 +1,15 @@ +# DetailedHealthStatus + +How much of a component's work has a live instance covering it. + +## Enum + +* `HEALTHY` (value: `'healthy'`) + +* `DEGRADED` (value: `'degraded'`) + +* `DOWN` (value: `'down'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EntitiesInner.md b/docs/EntitiesInner.md index d53ca3bf..7b8c3b68 100644 --- a/docs/EntitiesInner.md +++ b/docs/EntitiesInner.md @@ -5,10 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**dag_id** | **str** | | [optional] -**dag_run_id** | **str** | | -**note** | **str** | | [optional] -**state** | [**DagRunMutableStates**](DagRunMutableStates.md) | | [optional] +**dag_id** | **str** | | +**is_paused** | **bool** | | [optional] +**scheduling_state** | [**DagSchedulingState**](DagSchedulingState.md) | | [optional] ## Example diff --git a/docs/EntitiesInner1.md b/docs/EntitiesInner1.md index ea1f4c98..3be8b53e 100644 --- a/docs/EntitiesInner1.md +++ b/docs/EntitiesInner1.md @@ -6,15 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **dag_id** | **str** | | [optional] -**dag_run_id** | **str** | | [optional] -**include_downstream** | **bool** | | [optional] [default to False] -**include_future** | **bool** | | [optional] [default to False] -**include_past** | **bool** | | [optional] [default to False] -**include_upstream** | **bool** | | [optional] [default to False] -**map_index** | **int** | | [optional] -**new_state** | [**TaskInstanceState**](TaskInstanceState.md) | | [optional] +**dag_run_id** | **str** | | **note** | **str** | | [optional] -**task_id** | **str** | | +**state** | [**DagRunMutableStates**](DagRunMutableStates.md) | | [optional] ## Example diff --git a/docs/EntitiesInner2.md b/docs/EntitiesInner2.md index 0869a483..95491fbb 100644 --- a/docs/EntitiesInner2.md +++ b/docs/EntitiesInner2.md @@ -5,16 +5,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**conn_type** | **str** | | -**connection_id** | **str** | | -**description** | **str** | | [optional] -**extra** | **str** | | [optional] -**host** | **str** | | [optional] -**login** | **str** | | [optional] -**password** | **str** | | [optional] -**port** | **int** | | [optional] -**var_schema** | **str** | | [optional] -**team_name** | **str** | | [optional] +**dag_id** | **str** | | [optional] +**dag_run_id** | **str** | | [optional] +**include_downstream** | **bool** | | [optional] [default to False] +**include_future** | **bool** | | [optional] [default to False] +**include_past** | **bool** | | [optional] [default to False] +**include_upstream** | **bool** | | [optional] [default to False] +**map_index** | **int** | | [optional] +**new_state** | [**TaskInstanceState**](TaskInstanceState.md) | | [optional] +**note** | **str** | | [optional] +**region_id** | **UUID** | | [optional] +**region_index** | **int** | | [optional] +**task_id** | **str** | | ## Example diff --git a/docs/EntitiesInner3.md b/docs/EntitiesInner3.md index f5cff9f7..2049b29e 100644 --- a/docs/EntitiesInner3.md +++ b/docs/EntitiesInner3.md @@ -5,10 +5,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**conn_type** | **str** | | +**connection_id** | **str** | | **description** | **str** | | [optional] -**include_deferred** | **bool** | | [optional] [default to False] -**name** | **str** | | -**slots** | **int** | Number of slots. Use -1 for unlimited. | +**extra** | **str** | | [optional] +**host** | **str** | | [optional] +**login** | **str** | | [optional] +**password** | **str** | | [optional] +**port** | **int** | | [optional] +**var_schema** | **str** | | [optional] **team_name** | **str** | | [optional] ## Example diff --git a/docs/EntitiesInner4.md b/docs/EntitiesInner4.md index d667b00e..2dd999a4 100644 --- a/docs/EntitiesInner4.md +++ b/docs/EntitiesInner4.md @@ -6,9 +6,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **description** | **str** | | [optional] -**key** | **str** | | +**include_deferred** | **bool** | | [optional] [default to False] +**name** | **str** | | +**slots** | **int** | Number of slots. Use -1 for unlimited. | **team_name** | **str** | | [optional] -**value** | **object** | | ## Example diff --git a/docs/EntitiesInner5.md b/docs/EntitiesInner5.md new file mode 100644 index 00000000..b51c5734 --- /dev/null +++ b/docs/EntitiesInner5.md @@ -0,0 +1,32 @@ +# EntitiesInner5 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**key** | **str** | | +**team_name** | **str** | | [optional] +**value** | **object** | | + +## Example + +```python +from airflow_client.client.models.entities_inner5 import EntitiesInner5 + +# TODO update the JSON string below +json = "{}" +# create an instance of EntitiesInner5 from a JSON string +entities_inner5_instance = EntitiesInner5.from_json(json) +# print the JSON string representation of the object +print(EntitiesInner5.to_json()) + +# convert the object into a dict +entities_inner5_dict = entities_inner5_instance.to_dict() +# create an instance of EntitiesInner5 from a dict +entities_inner5_from_dict = EntitiesInner5.from_dict(entities_inner5_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EventLogApi.md b/docs/EventLogApi.md index 3f756816..357b3078 100644 --- a/docs/EventLogApi.md +++ b/docs/EventLogApi.md @@ -92,7 +92,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_event_logs** -> EventLogCollectionResponse get_event_logs(limit=limit, offset=offset, order_by=order_by, dag_id=dag_id, task_id=task_id, run_id=run_id, map_index=map_index, try_number=try_number, owner=owner, event=event, excluded_events=excluded_events, included_events=included_events, before=before, after=after, dag_id_pattern=dag_id_pattern, task_id_pattern=task_id_pattern, run_id_pattern=run_id_pattern, owner_pattern=owner_pattern, event_pattern=event_pattern, dag_id_prefix_pattern=dag_id_prefix_pattern, task_id_prefix_pattern=task_id_prefix_pattern, run_id_prefix_pattern=run_id_prefix_pattern, owner_prefix_pattern=owner_prefix_pattern, event_prefix_pattern=event_prefix_pattern) +> EventLogCollectionResponse get_event_logs(region_id=region_id, region_index=region_index, limit=limit, offset=offset, order_by=order_by, dag_id=dag_id, task_id=task_id, task_instance_id=task_instance_id, run_id=run_id, map_index=map_index, try_number=try_number, owner=owner, event=event, excluded_events=excluded_events, included_events=included_events, before=before, after=after, dag_id_pattern=dag_id_pattern, task_id_pattern=task_id_pattern, run_id_pattern=run_id_pattern, owner_pattern=owner_pattern, owner_display_name_pattern=owner_display_name_pattern, event_pattern=event_pattern, dag_id_prefix_pattern=dag_id_prefix_pattern, task_id_prefix_pattern=task_id_prefix_pattern, run_id_prefix_pattern=run_id_prefix_pattern, owner_prefix_pattern=owner_prefix_pattern, owner_display_name_prefix_pattern=owner_display_name_prefix_pattern, event_prefix_pattern=event_prefix_pattern, teams=teams) Get Event Logs @@ -131,11 +131,14 @@ configuration = airflow_client.client.Configuration( with airflow_client.client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = airflow_client.client.EventLogApi(api_client) + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) limit = 50 # int | (optional) (default to 50) offset = 0 # int | (optional) (default to 0) - order_by = ["id"] # List[str] | Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, dttm, dag_id, task_id, run_id, event, logical_date, owner, extra, when, event_log_id` (optional) (default to ["id"]) + order_by = ["id"] # List[str] | Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, dttm, dag_id, task_id, run_id, event, logical_date, owner, owner_display_name, extra, when, event_log_id` (optional) (default to ["id"]) dag_id = 'dag_id_example' # str | (optional) task_id = 'task_id_example' # str | (optional) + task_instance_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) run_id = 'run_id_example' # str | (optional) map_index = 56 # int | (optional) try_number = 56 # int | (optional) @@ -149,16 +152,19 @@ with airflow_client.client.ApiClient(configuration) as api_client: task_id_pattern = 'task_id_pattern_example' # str | Case-insensitive substring match (SQL `ILIKE`). Slower than `task_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". (optional) run_id_pattern = 'run_id_pattern_example' # str | Case-insensitive substring match (SQL `ILIKE`). Slower than `run_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". (optional) owner_pattern = 'owner_pattern_example' # str | Case-insensitive substring match (SQL `ILIKE`). Slower than `owner_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". (optional) + owner_display_name_pattern = 'owner_display_name_pattern_example' # str | Case-insensitive substring match (SQL `ILIKE`). Slower than `owner_display_name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". (optional) event_pattern = 'event_pattern_example' # str | Case-insensitive substring match (SQL `ILIKE`). Slower than `event_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". (optional) dag_id_prefix_pattern = 'dag_id_prefix_pattern_example' # str | Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". (optional) task_id_prefix_pattern = 'task_id_prefix_pattern_example' # str | Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". (optional) run_id_prefix_pattern = 'run_id_prefix_pattern_example' # str | Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". (optional) owner_prefix_pattern = 'owner_prefix_pattern_example' # str | Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". (optional) + owner_display_name_prefix_pattern = 'owner_display_name_prefix_pattern_example' # str | Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". (optional) event_prefix_pattern = 'event_prefix_pattern_example' # str | Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". (optional) + teams = ['teams_example'] # List[str] | (optional) try: # Get Event Logs - api_response = api_instance.get_event_logs(limit=limit, offset=offset, order_by=order_by, dag_id=dag_id, task_id=task_id, run_id=run_id, map_index=map_index, try_number=try_number, owner=owner, event=event, excluded_events=excluded_events, included_events=included_events, before=before, after=after, dag_id_pattern=dag_id_pattern, task_id_pattern=task_id_pattern, run_id_pattern=run_id_pattern, owner_pattern=owner_pattern, event_pattern=event_pattern, dag_id_prefix_pattern=dag_id_prefix_pattern, task_id_prefix_pattern=task_id_prefix_pattern, run_id_prefix_pattern=run_id_prefix_pattern, owner_prefix_pattern=owner_prefix_pattern, event_prefix_pattern=event_prefix_pattern) + api_response = api_instance.get_event_logs(region_id=region_id, region_index=region_index, limit=limit, offset=offset, order_by=order_by, dag_id=dag_id, task_id=task_id, task_instance_id=task_instance_id, run_id=run_id, map_index=map_index, try_number=try_number, owner=owner, event=event, excluded_events=excluded_events, included_events=included_events, before=before, after=after, dag_id_pattern=dag_id_pattern, task_id_pattern=task_id_pattern, run_id_pattern=run_id_pattern, owner_pattern=owner_pattern, owner_display_name_pattern=owner_display_name_pattern, event_pattern=event_pattern, dag_id_prefix_pattern=dag_id_prefix_pattern, task_id_prefix_pattern=task_id_prefix_pattern, run_id_prefix_pattern=run_id_prefix_pattern, owner_prefix_pattern=owner_prefix_pattern, owner_display_name_prefix_pattern=owner_display_name_prefix_pattern, event_prefix_pattern=event_prefix_pattern, teams=teams) print("The response of EventLogApi->get_event_logs:\n") pprint(api_response) except Exception as e: @@ -172,11 +178,14 @@ with airflow_client.client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] **limit** | **int**| | [optional] [default to 50] **offset** | **int**| | [optional] [default to 0] - **order_by** | [**List[str]**](str.md)| Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, dttm, dag_id, task_id, run_id, event, logical_date, owner, extra, when, event_log_id` | [optional] [default to ["id"]] + **order_by** | [**List[str]**](str.md)| Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, dttm, dag_id, task_id, run_id, event, logical_date, owner, owner_display_name, extra, when, event_log_id` | [optional] [default to ["id"]] **dag_id** | **str**| | [optional] **task_id** | **str**| | [optional] + **task_instance_id** | **UUID**| | [optional] **run_id** | **str**| | [optional] **map_index** | **int**| | [optional] **try_number** | **int**| | [optional] @@ -190,12 +199,15 @@ Name | Type | Description | Notes **task_id_pattern** | **str**| Case-insensitive substring match (SQL `ILIKE`). Slower than `task_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". | [optional] **run_id_pattern** | **str**| Case-insensitive substring match (SQL `ILIKE`). Slower than `run_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". | [optional] **owner_pattern** | **str**| Case-insensitive substring match (SQL `ILIKE`). Slower than `owner_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". | [optional] + **owner_display_name_pattern** | **str**| Case-insensitive substring match (SQL `ILIKE`). Slower than `owner_display_name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". | [optional] **event_pattern** | **str**| Case-insensitive substring match (SQL `ILIKE`). Slower than `event_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". | [optional] **dag_id_prefix_pattern** | **str**| Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". | [optional] **task_id_prefix_pattern** | **str**| Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". | [optional] **run_id_prefix_pattern** | **str**| Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". | [optional] **owner_prefix_pattern** | **str**| Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". | [optional] + **owner_display_name_prefix_pattern** | **str**| Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". | [optional] **event_prefix_pattern** | **str**| Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". | [optional] + **teams** | [**List[str]**](str.md)| | [optional] ### Return type @@ -215,6 +227,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful Response | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **422** | Validation Error | - | diff --git a/docs/EventLogResponse.md b/docs/EventLogResponse.md index a519020c..805ee6e0 100644 --- a/docs/EventLogResponse.md +++ b/docs/EventLogResponse.md @@ -14,9 +14,12 @@ Name | Type | Description | Notes **logical_date** | **datetime** | | [optional] **map_index** | **int** | | [optional] **owner** | **str** | | [optional] +**owner_display_name** | **str** | | [optional] **run_id** | **str** | | [optional] **task_display_name** | **str** | | [optional] **task_id** | **str** | | [optional] +**task_instance_id** | **UUID** | | [optional] +**team_name** | **str** | | [optional] **try_number** | **int** | | [optional] **when** | **datetime** | | diff --git a/docs/ExperimentalApi.md b/docs/ExperimentalApi.md index 37e61ca4..4e01d871 100644 --- a/docs/ExperimentalApi.md +++ b/docs/ExperimentalApi.md @@ -4,9 +4,104 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- +[**get_dag_version_diff**](ExperimentalApi.md#get_dag_version_diff) | **GET** /api/v2/dags/{dag_id}/dagVersions/diff | Experimental: Compare what two stored versions of a Dag currently hold. [**wait_dag_run_until_finished**](ExperimentalApi.md#wait_dag_run_until_finished) | **GET** /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/wait | Experimental: Wait for a dag run to complete, and return task results if requested. +# **get_dag_version_diff** +> DagVersionDiffResponse get_dag_version_diff(dag_id, base_version_number, target_version_number, max_changes=max_changes) + +Experimental: Compare what two stored versions of a Dag currently hold. + +🚧 This is an experimental endpoint and may change or be removed without notice. + +Reports observed state — what the two stored versions currently hold — not why a version was created. Version access returns the changed structure with identifying path components masked; the raw values behind those changes, and the paths that name them, are disclosed only to a caller who may also read the Dag's code. + +### Example + +* OAuth Authentication (OAuth2PasswordBearer): +* Bearer Authentication (HTTPBearer): + +```python +import airflow_client.client +from airflow_client.client.models.dag_version_diff_response import DagVersionDiffResponse +from airflow_client.client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = airflow_client.client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Configure Bearer authorization: HTTPBearer +configuration = airflow_client.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with airflow_client.client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = airflow_client.client.ExperimentalApi(api_client) + dag_id = 'dag_id_example' # str | + base_version_number = 56 # int | Version to compare from. + target_version_number = 56 # int | Version to compare to. + max_changes = 500 # int | Largest number of records `changes` may hold. A repeat of a path already recorded does not count towards it, and `truncated` says whether the bound dropped anything. (optional) (default to 500) + + try: + # Experimental: Compare what two stored versions of a Dag currently hold. + api_response = api_instance.get_dag_version_diff(dag_id, base_version_number, target_version_number, max_changes=max_changes) + print("The response of ExperimentalApi->get_dag_version_diff:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ExperimentalApi->get_dag_version_diff: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dag_id** | **str**| | + **base_version_number** | **int**| Version to compare from. | + **target_version_number** | **int**| Version to compare to. | + **max_changes** | **int**| Largest number of records `changes` may hold. A repeat of a path already recorded does not count towards it, and `truncated` says whether the bound dropped anything. | [optional] [default to 500] + +### Return type + +[**DagVersionDiffResponse**](DagVersionDiffResponse.md) + +### Authorization + +[OAuth2PasswordBearer](../README.md#OAuth2PasswordBearer), [HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **wait_dag_run_until_finished** > object wait_dag_run_until_finished(dag_id, dag_run_id, interval, result=result) @@ -93,6 +188,7 @@ Name | Type | Description | Notes **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/ExternalViewResponse.md b/docs/ExternalViewResponse.md index 9f018f5c..391149ce 100644 --- a/docs/ExternalViewResponse.md +++ b/docs/ExternalViewResponse.md @@ -6,6 +6,7 @@ Serializer for External View Plugin responses. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**applies_to** | **Dict[str, List[str]]** | Serializer for the optional scoping criteria of a UI plugin. An open map of dotted field path to the values that path may take -- not a closed set of criteria. ``{\"state\": [\"failed\"], \"dag.tags.name\": [\"ml\"]}`` scopes to failed entities of ml-tagged Dags. An unqualified path is rooted at the entity the ``destination`` is about; a path may instead name a related record (``dag``, ``dag_run``, ``task``, ``task_instance``) as its first segment. Matching is equality against the listed values, OR within a path and AND across paths, and is evaluated client-side. | [optional] **category** | **str** | | [optional] **destination** | **str** | | [optional] [default to 'nav'] **href** | **str** | | diff --git a/docs/ExtraLinksApi.md b/docs/ExtraLinksApi.md index f793b629..1704cc0e 100644 --- a/docs/ExtraLinksApi.md +++ b/docs/ExtraLinksApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **get_extra_links** -> ExtraLinkCollectionResponse get_extra_links(dag_id, dag_run_id, task_id, map_index=map_index, try_number=try_number) +> ExtraLinkCollectionResponse get_extra_links(dag_id, dag_run_id, task_id, map_index=map_index, region_id=region_id, region_index=region_index, try_number=try_number) Get Extra Links @@ -51,11 +51,13 @@ with airflow_client.client.ApiClient(configuration) as api_client: dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | map_index = -1 # int | (optional) (default to -1) + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try_number = 56 # int | (optional) try: # Get Extra Links - api_response = api_instance.get_extra_links(dag_id, dag_run_id, task_id, map_index=map_index, try_number=try_number) + api_response = api_instance.get_extra_links(dag_id, dag_run_id, task_id, map_index=map_index, region_id=region_id, region_index=region_index, try_number=try_number) print("The response of ExtraLinksApi->get_extra_links:\n") pprint(api_response) except Exception as e: @@ -73,6 +75,8 @@ Name | Type | Description | Notes **dag_run_id** | **str**| | **task_id** | **str**| | **map_index** | **int**| | [optional] [default to -1] + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] **try_number** | **int**| | [optional] ### Return type @@ -93,9 +97,11 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful Response | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/HealthStatus.md b/docs/HealthStatus.md new file mode 100644 index 00000000..be734867 --- /dev/null +++ b/docs/HealthStatus.md @@ -0,0 +1,13 @@ +# HealthStatus + +Aggregate health of a component: whether it has at least one live instance. + +## Enum + +* `HEALTHY` (value: `'healthy'`) + +* `UNHEALTHY` (value: `'unhealthy'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImportErrorApi.md b/docs/ImportErrorApi.md index c28b5960..24cf251b 100644 --- a/docs/ImportErrorApi.md +++ b/docs/ImportErrorApi.md @@ -135,7 +135,7 @@ with airflow_client.client.ApiClient(configuration) as api_client: api_instance = airflow_client.client.ImportErrorApi(api_client) limit = 50 # int | (optional) (default to 50) offset = 0 # int | (optional) (default to 0) - order_by = ["id"] # List[str] | Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, timestamp, filename, bundle_name, stacktrace, import_error_id` (optional) (default to ["id"]) + order_by = ["id"] # List[str] | Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, timestamp, filename, source_reference, bundle_name, stacktrace, import_error_id` (optional) (default to ["id"]) filename_pattern = 'filename_pattern_example' # str | Case-insensitive substring match (SQL `ILIKE`). Slower than `filename_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". (optional) filename_prefix_pattern = 'filename_prefix_pattern_example' # str | Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". (optional) filename = 'filename_example' # str | Exact filename match. Returns only the import error for this specific file path. (optional) @@ -159,7 +159,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **int**| | [optional] [default to 50] **offset** | **int**| | [optional] [default to 0] - **order_by** | [**List[str]**](str.md)| Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, timestamp, filename, bundle_name, stacktrace, import_error_id` | [optional] [default to ["id"]] + **order_by** | [**List[str]**](str.md)| Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, timestamp, filename, source_reference, bundle_name, stacktrace, import_error_id` | [optional] [default to ["id"]] **filename_pattern** | **str**| Case-insensitive substring match (SQL `ILIKE`). Slower than `filename_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". | [optional] **filename_prefix_pattern** | **str**| Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". | [optional] **filename** | **str**| Exact filename match. Returns only the import error for this specific file path. | [optional] diff --git a/docs/ImportErrorResponse.md b/docs/ImportErrorResponse.md index c157091a..c7253949 100644 --- a/docs/ImportErrorResponse.md +++ b/docs/ImportErrorResponse.md @@ -7,8 +7,10 @@ Import Error Response. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **bundle_name** | **str** | | [optional] +**file_token** | **str** | Return a signed token identifying the file, used to request its reparse. | [readonly] **filename** | **str** | | **import_error_id** | **int** | | +**source_reference** | **str** | | [optional] **stack_trace** | **str** | | **timestamp** | **datetime** | | diff --git a/docs/JobApi.md b/docs/JobApi.md index 9efc2e8a..c0d9f794 100644 --- a/docs/JobApi.md +++ b/docs/JobApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **get_jobs** -> JobCollectionResponse get_jobs(is_alive=is_alive, start_date_gte=start_date_gte, start_date_gt=start_date_gt, start_date_lte=start_date_lte, start_date_lt=start_date_lt, end_date_gte=end_date_gte, end_date_gt=end_date_gt, end_date_lte=end_date_lte, end_date_lt=end_date_lt, limit=limit, offset=offset, order_by=order_by, job_state=job_state, job_type=job_type, hostname=hostname, executor_class=executor_class) +> JobCollectionResponse get_jobs(start_date_gte=start_date_gte, start_date_gt=start_date_gt, start_date_lte=start_date_lte, start_date_lt=start_date_lt, end_date_gte=end_date_gte, end_date_gt=end_date_gt, end_date_lte=end_date_lte, end_date_lt=end_date_lt, limit=limit, offset=offset, order_by=order_by, job_state=job_state, dag_id=dag_id, job_type=job_type, hostname=hostname, executor_class=executor_class, teams=teams, is_alive=is_alive) Get Jobs @@ -47,7 +47,6 @@ configuration = airflow_client.client.Configuration( with airflow_client.client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = airflow_client.client.JobApi(api_client) - is_alive = True # bool | (optional) start_date_gte = '2013-10-20T19:20:30+01:00' # datetime | (optional) start_date_gt = '2013-10-20T19:20:30+01:00' # datetime | (optional) start_date_lte = '2013-10-20T19:20:30+01:00' # datetime | (optional) @@ -60,13 +59,16 @@ with airflow_client.client.ApiClient(configuration) as api_client: offset = 0 # int | (optional) (default to 0) order_by = ["id"] # List[str] | Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, dag_id, state, job_type, start_date, end_date, latest_heartbeat, executor_class, hostname, unixname` (optional) (default to ["id"]) job_state = 'job_state_example' # str | (optional) + dag_id = 'dag_id_example' # str | (optional) job_type = 'job_type_example' # str | (optional) hostname = 'hostname_example' # str | (optional) executor_class = 'executor_class_example' # str | (optional) + teams = ['teams_example'] # List[str] | (optional) + is_alive = True # bool | (optional) try: # Get Jobs - api_response = api_instance.get_jobs(is_alive=is_alive, start_date_gte=start_date_gte, start_date_gt=start_date_gt, start_date_lte=start_date_lte, start_date_lt=start_date_lt, end_date_gte=end_date_gte, end_date_gt=end_date_gt, end_date_lte=end_date_lte, end_date_lt=end_date_lt, limit=limit, offset=offset, order_by=order_by, job_state=job_state, job_type=job_type, hostname=hostname, executor_class=executor_class) + api_response = api_instance.get_jobs(start_date_gte=start_date_gte, start_date_gt=start_date_gt, start_date_lte=start_date_lte, start_date_lt=start_date_lt, end_date_gte=end_date_gte, end_date_gt=end_date_gt, end_date_lte=end_date_lte, end_date_lt=end_date_lt, limit=limit, offset=offset, order_by=order_by, job_state=job_state, dag_id=dag_id, job_type=job_type, hostname=hostname, executor_class=executor_class, teams=teams, is_alive=is_alive) print("The response of JobApi->get_jobs:\n") pprint(api_response) except Exception as e: @@ -80,7 +82,6 @@ with airflow_client.client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **is_alive** | **bool**| | [optional] **start_date_gte** | **datetime**| | [optional] **start_date_gt** | **datetime**| | [optional] **start_date_lte** | **datetime**| | [optional] @@ -93,9 +94,12 @@ Name | Type | Description | Notes **offset** | **int**| | [optional] [default to 0] **order_by** | [**List[str]**](str.md)| Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, dag_id, state, job_type, start_date, end_date, latest_heartbeat, executor_class, hostname, unixname` | [optional] [default to ["id"]] **job_state** | **str**| | [optional] + **dag_id** | **str**| | [optional] **job_type** | **str**| | [optional] **hostname** | **str**| | [optional] **executor_class** | **str**| | [optional] + **teams** | [**List[str]**](str.md)| | [optional] + **is_alive** | **bool**| | [optional] ### Return type diff --git a/docs/JobResponse.md b/docs/JobResponse.md index 74cb3d8f..42450eae 100644 --- a/docs/JobResponse.md +++ b/docs/JobResponse.md @@ -6,6 +6,7 @@ Job serializer for responses. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**bundle_names** | **List[str]** | | [optional] **dag_display_name** | **str** | | [optional] **dag_id** | **str** | | [optional] **end_date** | **datetime** | | [optional] @@ -16,6 +17,7 @@ Name | Type | Description | Notes **latest_heartbeat** | **datetime** | | [optional] **start_date** | **datetime** | | [optional] **state** | **str** | | [optional] +**team_names** | **List[str]** | | [optional] **unixname** | **str** | | [optional] ## Example diff --git a/docs/LoopIterationResponse.md b/docs/LoopIterationResponse.md new file mode 100644 index 00000000..30a497ae --- /dev/null +++ b/docs/LoopIterationResponse.md @@ -0,0 +1,31 @@ +# LoopIterationResponse + +A task execution's position in an enclosing loop. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**iteration** | **int** | Position in the enclosing loop, counting from one. | +**loop_id** | **str** | | + +## Example + +```python +from airflow_client.client.models.loop_iteration_response import LoopIterationResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of LoopIterationResponse from a JSON string +loop_iteration_response_instance = LoopIterationResponse.from_json(json) +# print the JSON string representation of the object +print(LoopIterationResponse.to_json()) + +# convert the object into a dict +loop_iteration_response_dict = loop_iteration_response_instance.to_dict() +# create an instance of LoopIterationResponse from a dict +loop_iteration_response_from_dict = LoopIterationResponse.from_dict(loop_iteration_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MaterializeAssetBody.md b/docs/MaterializeAssetBody.md index 240a33ed..42527c6c 100644 --- a/docs/MaterializeAssetBody.md +++ b/docs/MaterializeAssetBody.md @@ -6,10 +6,12 @@ Materialize asset request. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**bundle_version** | **str** | | [optional] **conf** | **Dict[str, object]** | | [optional] **dag_run_id** | **str** | | [optional] **data_interval_end** | **datetime** | | [optional] **data_interval_start** | **datetime** | | [optional] +**drain_dag** | **bool** | Drain the Dag together with this run. Draining changes the whole Dag: unfinished runs can start or resume except those held by paused backfills. No scheduled runs are created, and the Dag pauses once all unfinished runs finish. Paused backfills must be resumed for draining to complete. Requires the same permission as pausing the Dag. | [optional] [default to False] **logical_date** | **datetime** | | [optional] **note** | **str** | | [optional] **partition_key** | **str** | | [optional] diff --git a/docs/PatchTaskInstanceBody.md b/docs/PatchTaskInstanceBody.md index 2a7b185d..d4824ebf 100644 --- a/docs/PatchTaskInstanceBody.md +++ b/docs/PatchTaskInstanceBody.md @@ -12,6 +12,8 @@ Name | Type | Description | Notes **include_upstream** | **bool** | | [optional] [default to False] **new_state** | [**TaskInstanceState**](TaskInstanceState.md) | | [optional] **note** | **str** | | [optional] +**region_id** | **UUID** | | [optional] +**region_index** | **int** | | [optional] ## Example diff --git a/docs/PluginLinkActionResponse.md b/docs/PluginLinkActionResponse.md new file mode 100644 index 00000000..7fb4feb2 --- /dev/null +++ b/docs/PluginLinkActionResponse.md @@ -0,0 +1,36 @@ +# PluginLinkActionResponse + +Serializer for a UI action that opens a URL. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action_type** | **str** | | +**applies_to** | **Dict[str, List[str]]** | Serializer for the optional scoping criteria of a UI plugin. An open map of dotted field path to the values that path may take -- not a closed set of criteria. ``{\"state\": [\"failed\"], \"dag.tags.name\": [\"ml\"]}`` scopes to failed entities of ml-tagged Dags. An unqualified path is rooted at the entity the ``destination`` is about; a path may instead name a related record (``dag``, ``dag_run``, ``task``, ``task_instance``) as its first segment. Matching is equality against the listed values, OR within a path and AND across paths, and is evaluated client-side. | [optional] +**destination** | **str** | | +**href** | **str** | | +**icon** | **str** | | [optional] +**icon_dark_mode** | **str** | | [optional] +**name** | **str** | | + +## Example + +```python +from airflow_client.client.models.plugin_link_action_response import PluginLinkActionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PluginLinkActionResponse from a JSON string +plugin_link_action_response_instance = PluginLinkActionResponse.from_json(json) +# print the JSON string representation of the object +print(PluginLinkActionResponse.to_json()) + +# convert the object into a dict +plugin_link_action_response_dict = plugin_link_action_response_instance.to_dict() +# create an instance of PluginLinkActionResponse from a dict +plugin_link_action_response_from_dict = PluginLinkActionResponse.from_dict(plugin_link_action_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PluginReactActionResponse.md b/docs/PluginReactActionResponse.md new file mode 100644 index 00000000..ece7befc --- /dev/null +++ b/docs/PluginReactActionResponse.md @@ -0,0 +1,36 @@ +# PluginReactActionResponse + +Serializer for a UI action that mounts a React component behind a button. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action_type** | **str** | | +**applies_to** | **Dict[str, List[str]]** | Serializer for the optional scoping criteria of a UI plugin. An open map of dotted field path to the values that path may take -- not a closed set of criteria. ``{\"state\": [\"failed\"], \"dag.tags.name\": [\"ml\"]}`` scopes to failed entities of ml-tagged Dags. An unqualified path is rooted at the entity the ``destination`` is about; a path may instead name a related record (``dag``, ``dag_run``, ``task``, ``task_instance``) as its first segment. Matching is equality against the listed values, OR within a path and AND across paths, and is evaluated client-side. | [optional] +**bundle_url** | **str** | | +**destination** | **str** | | +**icon** | **str** | | [optional] +**icon_dark_mode** | **str** | | [optional] +**name** | **str** | | + +## Example + +```python +from airflow_client.client.models.plugin_react_action_response import PluginReactActionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PluginReactActionResponse from a JSON string +plugin_react_action_response_instance = PluginReactActionResponse.from_json(json) +# print the JSON string representation of the object +print(PluginReactActionResponse.to_json()) + +# convert the object into a dict +plugin_react_action_response_dict = plugin_react_action_response_instance.to_dict() +# create an instance of PluginReactActionResponse from a dict +plugin_react_action_response_from_dict = PluginReactActionResponse.from_dict(plugin_react_action_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PluginResponse.md b/docs/PluginResponse.md index ad9c6a97..30c1d302 100644 --- a/docs/PluginResponse.md +++ b/docs/PluginResponse.md @@ -19,7 +19,9 @@ Name | Type | Description | Notes **operator_extra_links** | **List[str]** | | **react_apps** | [**List[ReactAppResponse]**](ReactAppResponse.md) | | **source** | **str** | | +**team_name** | **str** | | [optional] **timetables** | **List[str]** | | +**ui_actions** | [**List[UiActionsInner]**](UiActionsInner.md) | User-defined actions rendered on Dag, Dag Run, and Task Instance table rows and header cards. | [optional] ## Example diff --git a/docs/ReactAppResponse.md b/docs/ReactAppResponse.md index 30f1a425..5927538b 100644 --- a/docs/ReactAppResponse.md +++ b/docs/ReactAppResponse.md @@ -6,6 +6,7 @@ Serializer for React App Plugin responses. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**applies_to** | **Dict[str, List[str]]** | Serializer for the optional scoping criteria of a UI plugin. An open map of dotted field path to the values that path may take -- not a closed set of criteria. ``{\"state\": [\"failed\"], \"dag.tags.name\": [\"ml\"]}`` scopes to failed entities of ml-tagged Dags. An unqualified path is rooted at the entity the ``destination`` is about; a path may instead name a related record (``dag``, ``dag_run``, ``task``, ``task_instance``) as its first segment. Matching is equality against the listed values, OR within a path and AND across paths, and is evaluated client-side. | [optional] **bundle_url** | **str** | | **category** | **str** | | [optional] **destination** | **str** | | [optional] [default to 'nav'] diff --git a/docs/ResponseClearDagRun.md b/docs/ResponseClearDagRun.md index 9da5ae4f..e3513463 100644 --- a/docs/ResponseClearDagRun.md +++ b/docs/ResponseClearDagRun.md @@ -27,6 +27,7 @@ Name | Type | Description | Notes **run_type** | [**DagRunType**](DagRunType.md) | | **start_date** | **datetime** | | [optional] **state** | [**DagRunState**](DagRunState.md) | | +**team_name** | **str** | | [optional] **triggered_by** | [**DagRunTriggeredByType**](DagRunTriggeredByType.md) | | [optional] **triggering_user_name** | **str** | | [optional] diff --git a/docs/ResponseGetXcomEntry.md b/docs/ResponseGetXcomEntry.md index b3a8d645..d6810bcd 100644 --- a/docs/ResponseGetXcomEntry.md +++ b/docs/ResponseGetXcomEntry.md @@ -10,10 +10,13 @@ Name | Type | Description | Notes **key** | **str** | | **logical_date** | **datetime** | | [optional] **map_index** | **int** | | +**region_id** | **UUID** | | [optional] +**region_index** | **int** | | [optional] **run_after** | **datetime** | | **run_id** | **str** | | **task_display_name** | **str** | | **task_id** | **str** | | +**team_name** | **str** | | [optional] **timestamp** | **datetime** | | **value** | **str** | | diff --git a/docs/SchedulerInfoResponse.md b/docs/SchedulerInfoResponse.md index 48a77f6d..c80cb830 100644 --- a/docs/SchedulerInfoResponse.md +++ b/docs/SchedulerInfoResponse.md @@ -6,8 +6,10 @@ Scheduler info serializer for responses. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**detailed_status** | [**DetailedHealthStatus**](DetailedHealthStatus.md) | | [optional] +**instances** | [**List[SchedulerInstanceInfoResponse]**](SchedulerInstanceInfoResponse.md) | | [optional] **latest_scheduler_heartbeat** | **str** | | [optional] -**status** | **str** | | [optional] +**status** | [**HealthStatus**](HealthStatus.md) | | [optional] ## Example diff --git a/docs/SchedulerInstanceInfoResponse.md b/docs/SchedulerInstanceInfoResponse.md new file mode 100644 index 00000000..9b6b899b --- /dev/null +++ b/docs/SchedulerInstanceInfoResponse.md @@ -0,0 +1,31 @@ +# SchedulerInstanceInfoResponse + +Scheduler instance info serializer for responses. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hostname** | **str** | | [optional] +**latest_scheduler_heartbeat** | **str** | | [optional] + +## Example + +```python +from airflow_client.client.models.scheduler_instance_info_response import SchedulerInstanceInfoResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of SchedulerInstanceInfoResponse from a JSON string +scheduler_instance_info_response_instance = SchedulerInstanceInfoResponse.from_json(json) +# print the JSON string representation of the object +print(SchedulerInstanceInfoResponse.to_json()) + +# convert the object into a dict +scheduler_instance_info_response_dict = scheduler_instance_info_response_instance.to_dict() +# create an instance of SchedulerInstanceInfoResponse from a dict +scheduler_instance_info_response_from_dict = SchedulerInstanceInfoResponse.from_dict(scheduler_instance_info_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TaskApi.md b/docs/TaskApi.md index 3eaa41a1..6379f70d 100644 --- a/docs/TaskApi.md +++ b/docs/TaskApi.md @@ -9,12 +9,16 @@ Method | HTTP request | Description # **get_task** -> TaskResponse get_task(dag_id, task_id) +> TaskResponse get_task(dag_id, task_id, version_number=version_number) Get Task Get simplified representation of a task. +Pass ``version_number`` (e.g. a task instance's ``dag_version.version_number``) to get the task +as defined in that Dag version. Without it the latest version is used. Returns 404 if that +version of the Dag does not exist. + ### Example * OAuth Authentication (OAuth2PasswordBearer): @@ -50,10 +54,11 @@ with airflow_client.client.ApiClient(configuration) as api_client: api_instance = airflow_client.client.TaskApi(api_client) dag_id = 'dag_id_example' # str | task_id = None # object | + version_number = 56 # int | (optional) try: # Get Task - api_response = api_instance.get_task(dag_id, task_id) + api_response = api_instance.get_task(dag_id, task_id, version_number=version_number) print("The response of TaskApi->get_task:\n") pprint(api_response) except Exception as e: @@ -69,6 +74,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **dag_id** | **str**| | **task_id** | [**object**](.md)| | + **version_number** | **int**| | [optional] ### Return type diff --git a/docs/TaskInstanceApi.md b/docs/TaskInstanceApi.md index 2f214c59..89d4139f 100644 --- a/docs/TaskInstanceApi.md +++ b/docs/TaskInstanceApi.md @@ -123,7 +123,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **delete_task_instance** -> object delete_task_instance(dag_id, dag_run_id, task_id, map_index=map_index) +> object delete_task_instance(dag_id, dag_run_id, task_id, map_index=map_index, region_id=region_id, region_index=region_index) Delete Task Instance @@ -165,10 +165,12 @@ with airflow_client.client.ApiClient(configuration) as api_client: dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | map_index = -1 # int | (optional) (default to -1) + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try: # Delete Task Instance - api_response = api_instance.delete_task_instance(dag_id, dag_run_id, task_id, map_index=map_index) + api_response = api_instance.delete_task_instance(dag_id, dag_run_id, task_id, map_index=map_index, region_id=region_id, region_index=region_index) print("The response of TaskInstanceApi->delete_task_instance:\n") pprint(api_response) except Exception as e: @@ -186,6 +188,8 @@ Name | Type | Description | Notes **dag_run_id** | **str**| | **task_id** | **str**| | **map_index** | **int**| | [optional] [default to -1] + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] ### Return type @@ -205,15 +209,17 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful Response | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_external_log_url** -> ExternalLogUrlResponse get_external_log_url(dag_id, dag_run_id, task_id, try_number, map_index=map_index) +> ExternalLogUrlResponse get_external_log_url(dag_id, dag_run_id, task_id, try_number, map_index=map_index, region_id=region_id, region_index=region_index) Get External Log Url @@ -257,10 +263,12 @@ with airflow_client.client.ApiClient(configuration) as api_client: task_id = 'task_id_example' # str | try_number = 56 # int | map_index = -1 # int | (optional) (default to -1) + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try: # Get External Log Url - api_response = api_instance.get_external_log_url(dag_id, dag_run_id, task_id, try_number, map_index=map_index) + api_response = api_instance.get_external_log_url(dag_id, dag_run_id, task_id, try_number, map_index=map_index, region_id=region_id, region_index=region_index) print("The response of TaskInstanceApi->get_external_log_url:\n") pprint(api_response) except Exception as e: @@ -279,6 +287,8 @@ Name | Type | Description | Notes **task_id** | **str**| | **try_number** | **int**| | **map_index** | **int**| | [optional] [default to -1] + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] ### Return type @@ -302,12 +312,13 @@ Name | Type | Description | Notes **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_extra_links** -> ExtraLinkCollectionResponse get_extra_links(dag_id, dag_run_id, task_id, map_index=map_index, try_number=try_number) +> ExtraLinkCollectionResponse get_extra_links(dag_id, dag_run_id, task_id, map_index=map_index, region_id=region_id, region_index=region_index, try_number=try_number) Get Extra Links @@ -350,11 +361,13 @@ with airflow_client.client.ApiClient(configuration) as api_client: dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | map_index = -1 # int | (optional) (default to -1) + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try_number = 56 # int | (optional) try: # Get Extra Links - api_response = api_instance.get_extra_links(dag_id, dag_run_id, task_id, map_index=map_index, try_number=try_number) + api_response = api_instance.get_extra_links(dag_id, dag_run_id, task_id, map_index=map_index, region_id=region_id, region_index=region_index, try_number=try_number) print("The response of TaskInstanceApi->get_extra_links:\n") pprint(api_response) except Exception as e: @@ -372,6 +385,8 @@ Name | Type | Description | Notes **dag_run_id** | **str**| | **task_id** | **str**| | **map_index** | **int**| | [optional] [default to -1] + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] **try_number** | **int**| | [optional] ### Return type @@ -392,15 +407,17 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful Response | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_hitl_detail** -> HITLDetail get_hitl_detail(dag_id, dag_run_id, task_id, map_index) +> HITLDetail get_hitl_detail(dag_id, dag_run_id, task_id, map_index, region_id=region_id, region_index=region_index) Get Hitl Detail @@ -443,10 +460,12 @@ with airflow_client.client.ApiClient(configuration) as api_client: dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | map_index = 56 # int | + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try: # Get Hitl Detail - api_response = api_instance.get_hitl_detail(dag_id, dag_run_id, task_id, map_index) + api_response = api_instance.get_hitl_detail(dag_id, dag_run_id, task_id, map_index, region_id=region_id, region_index=region_index) print("The response of TaskInstanceApi->get_hitl_detail:\n") pprint(api_response) except Exception as e: @@ -464,6 +483,8 @@ Name | Type | Description | Notes **dag_run_id** | **str**| | **task_id** | **str**| | **map_index** | **int**| | + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] ### Return type @@ -483,15 +504,17 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful Response | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_hitl_detail_try_detail** -> HITLDetailHistory get_hitl_detail_try_detail(dag_id, dag_run_id, task_id, map_index, try_number) +> HITLDetailHistory get_hitl_detail_try_detail(dag_id, dag_run_id, task_id, map_index, try_number, region_id=region_id, region_index=region_index) Get Hitl Detail Try Detail @@ -535,10 +558,12 @@ with airflow_client.client.ApiClient(configuration) as api_client: task_id = 'task_id_example' # str | map_index = 56 # int | try_number = 56 # int | + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try: # Get Hitl Detail Try Detail - api_response = api_instance.get_hitl_detail_try_detail(dag_id, dag_run_id, task_id, map_index, try_number) + api_response = api_instance.get_hitl_detail_try_detail(dag_id, dag_run_id, task_id, map_index, try_number, region_id=region_id, region_index=region_index) print("The response of TaskInstanceApi->get_hitl_detail_try_detail:\n") pprint(api_response) except Exception as e: @@ -557,6 +582,8 @@ Name | Type | Description | Notes **task_id** | **str**| | **map_index** | **int**| | **try_number** | **int**| | + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] ### Return type @@ -576,15 +603,17 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful Response | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_hitl_details** -> HITLDetailCollection get_hitl_details(dag_id, dag_run_id, limit=limit, offset=offset, order_by=order_by, dag_id_pattern=dag_id_pattern, dag_id_prefix_pattern=dag_id_prefix_pattern, task_id=task_id, task_id_pattern=task_id_pattern, task_id_prefix_pattern=task_id_prefix_pattern, map_index=map_index, state=state, response_received=response_received, responded_by_user_id=responded_by_user_id, responded_by_user_name=responded_by_user_name, subject_search=subject_search, body_search=body_search, created_at_gte=created_at_gte, created_at_gt=created_at_gt, created_at_lte=created_at_lte, created_at_lt=created_at_lt) +> HITLDetailCollection get_hitl_details(dag_id, dag_run_id, region_id=region_id, region_index=region_index, limit=limit, offset=offset, order_by=order_by, dag_id_pattern=dag_id_pattern, dag_id_prefix_pattern=dag_id_prefix_pattern, task_id=task_id, task_id_pattern=task_id_pattern, task_id_prefix_pattern=task_id_prefix_pattern, map_index=map_index, state=state, teams=teams, response_received=response_received, responded_by_user_id=responded_by_user_id, responded_by_user_name=responded_by_user_name, subject_search=subject_search, body_search=body_search, created_at_gte=created_at_gte, created_at_gt=created_at_gt, created_at_lte=created_at_lte, created_at_lt=created_at_lt) Get Hitl Details @@ -625,6 +654,8 @@ with airflow_client.client.ApiClient(configuration) as api_client: api_instance = airflow_client.client.TaskInstanceApi(api_client) dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) limit = 50 # int | (optional) (default to 50) offset = 0 # int | (optional) (default to 0) order_by = ["ti_id"] # List[str] | Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `ti_id, subject, responded_at, created_at, responded_by_user_id, responded_by_user_name, dag_id, run_id, task_display_name, run_after, rendered_map_index, task_instance_operator, task_instance_state` (optional) (default to ["ti_id"]) @@ -635,6 +666,7 @@ with airflow_client.client.ApiClient(configuration) as api_client: task_id_prefix_pattern = 'task_id_prefix_pattern_example' # str | Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". (optional) map_index = 56 # int | (optional) state = ['state_example'] # List[str] | (optional) + teams = ['teams_example'] # List[str] | (optional) response_received = True # bool | (optional) responded_by_user_id = ['responded_by_user_id_example'] # List[str] | (optional) responded_by_user_name = ['responded_by_user_name_example'] # List[str] | (optional) @@ -647,7 +679,7 @@ with airflow_client.client.ApiClient(configuration) as api_client: try: # Get Hitl Details - api_response = api_instance.get_hitl_details(dag_id, dag_run_id, limit=limit, offset=offset, order_by=order_by, dag_id_pattern=dag_id_pattern, dag_id_prefix_pattern=dag_id_prefix_pattern, task_id=task_id, task_id_pattern=task_id_pattern, task_id_prefix_pattern=task_id_prefix_pattern, map_index=map_index, state=state, response_received=response_received, responded_by_user_id=responded_by_user_id, responded_by_user_name=responded_by_user_name, subject_search=subject_search, body_search=body_search, created_at_gte=created_at_gte, created_at_gt=created_at_gt, created_at_lte=created_at_lte, created_at_lt=created_at_lt) + api_response = api_instance.get_hitl_details(dag_id, dag_run_id, region_id=region_id, region_index=region_index, limit=limit, offset=offset, order_by=order_by, dag_id_pattern=dag_id_pattern, dag_id_prefix_pattern=dag_id_prefix_pattern, task_id=task_id, task_id_pattern=task_id_pattern, task_id_prefix_pattern=task_id_prefix_pattern, map_index=map_index, state=state, teams=teams, response_received=response_received, responded_by_user_id=responded_by_user_id, responded_by_user_name=responded_by_user_name, subject_search=subject_search, body_search=body_search, created_at_gte=created_at_gte, created_at_gt=created_at_gt, created_at_lte=created_at_lte, created_at_lt=created_at_lt) print("The response of TaskInstanceApi->get_hitl_details:\n") pprint(api_response) except Exception as e: @@ -663,6 +695,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **dag_id** | **str**| | **dag_run_id** | **str**| | + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] **limit** | **int**| | [optional] [default to 50] **offset** | **int**| | [optional] [default to 0] **order_by** | [**List[str]**](str.md)| Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `ti_id, subject, responded_at, created_at, responded_by_user_id, responded_by_user_name, dag_id, run_id, task_display_name, run_after, rendered_map_index, task_instance_operator, task_instance_state` | [optional] [default to ["ti_id"]] @@ -673,6 +707,7 @@ Name | Type | Description | Notes **task_id_prefix_pattern** | **str**| Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". | [optional] **map_index** | **int**| | [optional] **state** | [**List[str]**](str.md)| | [optional] + **teams** | [**List[str]**](str.md)| | [optional] **response_received** | **bool**| | [optional] **responded_by_user_id** | [**List[str]**](str.md)| | [optional] **responded_by_user_name** | [**List[str]**](str.md)| | [optional] @@ -701,6 +736,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful Response | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **422** | Validation Error | - | @@ -708,7 +744,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_log** -> TaskInstancesLogResponse get_log(dag_id, dag_run_id, task_id, try_number, full_content=full_content, map_index=map_index, token=token, accept=accept) +> TaskInstancesLogResponse get_log(dag_id, dag_run_id, task_id, try_number, full_content=full_content, token=token, map_index=map_index, region_id=region_id, region_index=region_index, accept=accept) Get Log @@ -752,13 +788,15 @@ with airflow_client.client.ApiClient(configuration) as api_client: task_id = 'task_id_example' # str | try_number = 56 # int | full_content = False # bool | (optional) (default to False) - map_index = -1 # int | (optional) (default to -1) token = 'token_example' # str | (optional) + map_index = -1 # int | (optional) (default to -1) + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) accept = '*/*' # str | (optional) (default to '*/*') try: # Get Log - api_response = api_instance.get_log(dag_id, dag_run_id, task_id, try_number, full_content=full_content, map_index=map_index, token=token, accept=accept) + api_response = api_instance.get_log(dag_id, dag_run_id, task_id, try_number, full_content=full_content, token=token, map_index=map_index, region_id=region_id, region_index=region_index, accept=accept) print("The response of TaskInstanceApi->get_log:\n") pprint(api_response) except Exception as e: @@ -777,8 +815,10 @@ Name | Type | Description | Notes **task_id** | **str**| | **try_number** | **int**| | **full_content** | **bool**| | [optional] [default to False] - **map_index** | **int**| | [optional] [default to -1] **token** | **str**| | [optional] + **map_index** | **int**| | [optional] [default to -1] + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] **accept** | **str**| | [optional] [default to '*/*'] ### Return type @@ -799,15 +839,17 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful Response | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_mapped_task_instance** -> TaskInstanceResponse get_mapped_task_instance(dag_id, dag_run_id, task_id, map_index) +> TaskInstanceResponse get_mapped_task_instance(dag_id, dag_run_id, task_id, map_index, region_id=region_id, region_index=region_index) Get Mapped Task Instance @@ -850,10 +892,12 @@ with airflow_client.client.ApiClient(configuration) as api_client: dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | map_index = 56 # int | + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try: # Get Mapped Task Instance - api_response = api_instance.get_mapped_task_instance(dag_id, dag_run_id, task_id, map_index) + api_response = api_instance.get_mapped_task_instance(dag_id, dag_run_id, task_id, map_index, region_id=region_id, region_index=region_index) print("The response of TaskInstanceApi->get_mapped_task_instance:\n") pprint(api_response) except Exception as e: @@ -871,6 +915,8 @@ Name | Type | Description | Notes **dag_run_id** | **str**| | **task_id** | **str**| | **map_index** | **int**| | + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] ### Return type @@ -890,18 +936,24 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful Response | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_mapped_task_instance_tries** -> TaskInstanceHistoryCollectionResponse get_mapped_task_instance_tries(dag_id, dag_run_id, task_id, map_index) +> TaskInstanceHistoryCollectionResponse get_mapped_task_instance_tries(dag_id, dag_run_id, task_id, map_index, region_id=region_id, region_index=region_index) Get Mapped Task Instance Tries +Get list of task instances history for a mapped task instance. + +Tries recorded before the task had regions are not included once it has them. + ### Example * OAuth Authentication (OAuth2PasswordBearer): @@ -939,10 +991,12 @@ with airflow_client.client.ApiClient(configuration) as api_client: dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | map_index = 56 # int | + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try: # Get Mapped Task Instance Tries - api_response = api_instance.get_mapped_task_instance_tries(dag_id, dag_run_id, task_id, map_index) + api_response = api_instance.get_mapped_task_instance_tries(dag_id, dag_run_id, task_id, map_index, region_id=region_id, region_index=region_index) print("The response of TaskInstanceApi->get_mapped_task_instance_tries:\n") pprint(api_response) except Exception as e: @@ -960,6 +1014,8 @@ Name | Type | Description | Notes **dag_run_id** | **str**| | **task_id** | **str**| | **map_index** | **int**| | + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] ### Return type @@ -979,15 +1035,17 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful Response | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_mapped_task_instance_try_details** -> TaskInstanceHistoryResponse get_mapped_task_instance_try_details(dag_id, dag_run_id, task_id, task_try_number, map_index) +> TaskInstanceHistoryResponse get_mapped_task_instance_try_details(dag_id, dag_run_id, task_id, task_try_number, map_index, region_id=region_id, region_index=region_index) Get Mapped Task Instance Try Details @@ -1029,10 +1087,12 @@ with airflow_client.client.ApiClient(configuration) as api_client: task_id = 'task_id_example' # str | task_try_number = 56 # int | map_index = 56 # int | + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try: # Get Mapped Task Instance Try Details - api_response = api_instance.get_mapped_task_instance_try_details(dag_id, dag_run_id, task_id, task_try_number, map_index) + api_response = api_instance.get_mapped_task_instance_try_details(dag_id, dag_run_id, task_id, task_try_number, map_index, region_id=region_id, region_index=region_index) print("The response of TaskInstanceApi->get_mapped_task_instance_try_details:\n") pprint(api_response) except Exception as e: @@ -1051,6 +1111,8 @@ Name | Type | Description | Notes **task_id** | **str**| | **task_try_number** | **int**| | **map_index** | **int**| | + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] ### Return type @@ -1070,15 +1132,17 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful Response | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_mapped_task_instances** -> TaskInstanceCollectionResponse get_mapped_task_instances(dag_id, dag_run_id, task_id, run_after_gte=run_after_gte, run_after_gt=run_after_gt, run_after_lte=run_after_lte, run_after_lt=run_after_lt, logical_date_gte=logical_date_gte, logical_date_gt=logical_date_gt, logical_date_lte=logical_date_lte, logical_date_lt=logical_date_lt, start_date_gte=start_date_gte, start_date_gt=start_date_gt, start_date_lte=start_date_lte, start_date_lt=start_date_lt, end_date_gte=end_date_gte, end_date_gt=end_date_gt, end_date_lte=end_date_lte, end_date_lt=end_date_lt, updated_at_gte=updated_at_gte, updated_at_gt=updated_at_gt, updated_at_lte=updated_at_lte, updated_at_lt=updated_at_lt, duration_gte=duration_gte, duration_gt=duration_gt, duration_lte=duration_lte, duration_lt=duration_lt, state=state, pool=pool, pool_name_pattern=pool_name_pattern, pool_name_prefix_pattern=pool_name_prefix_pattern, queue=queue, queue_name_pattern=queue_name_pattern, queue_name_prefix_pattern=queue_name_prefix_pattern, executor=executor, version_number=version_number, try_number=try_number, operator=operator, operator_name_pattern=operator_name_pattern, operator_name_prefix_pattern=operator_name_prefix_pattern, map_index=map_index, rendered_map_index_pattern=rendered_map_index_pattern, rendered_map_index_prefix_pattern=rendered_map_index_prefix_pattern, limit=limit, offset=offset, order_by=order_by) +> TaskInstanceCollectionResponse get_mapped_task_instances(dag_id, dag_run_id, task_id, region_id=region_id, region_index=region_index, run_after_gte=run_after_gte, run_after_gt=run_after_gt, run_after_lte=run_after_lte, run_after_lt=run_after_lt, logical_date_gte=logical_date_gte, logical_date_gt=logical_date_gt, logical_date_lte=logical_date_lte, logical_date_lt=logical_date_lt, start_date_gte=start_date_gte, start_date_gt=start_date_gt, start_date_lte=start_date_lte, start_date_lt=start_date_lt, end_date_gte=end_date_gte, end_date_gt=end_date_gt, end_date_lte=end_date_lte, end_date_lt=end_date_lt, updated_at_gte=updated_at_gte, updated_at_gt=updated_at_gt, updated_at_lte=updated_at_lte, updated_at_lt=updated_at_lt, duration_gte=duration_gte, duration_gt=duration_gt, duration_lte=duration_lte, duration_lt=duration_lt, state=state, pool=pool, pool_name_pattern=pool_name_pattern, pool_name_prefix_pattern=pool_name_prefix_pattern, queue=queue, queue_name_pattern=queue_name_pattern, queue_name_prefix_pattern=queue_name_prefix_pattern, executor=executor, version_number=version_number, try_number=try_number, operator=operator, operator_name_pattern=operator_name_pattern, operator_name_prefix_pattern=operator_name_prefix_pattern, map_index=map_index, rendered_map_index_pattern=rendered_map_index_pattern, rendered_map_index_prefix_pattern=rendered_map_index_prefix_pattern, limit=limit, offset=offset, order_by=order_by) Get Mapped Task Instances @@ -1120,6 +1184,8 @@ with airflow_client.client.ApiClient(configuration) as api_client: dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) run_after_gte = '2013-10-20T19:20:30+01:00' # datetime | (optional) run_after_gt = '2013-10-20T19:20:30+01:00' # datetime | (optional) run_after_lte = '2013-10-20T19:20:30+01:00' # datetime | (optional) @@ -1166,7 +1232,7 @@ with airflow_client.client.ApiClient(configuration) as api_client: try: # Get Mapped Task Instances - api_response = api_instance.get_mapped_task_instances(dag_id, dag_run_id, task_id, run_after_gte=run_after_gte, run_after_gt=run_after_gt, run_after_lte=run_after_lte, run_after_lt=run_after_lt, logical_date_gte=logical_date_gte, logical_date_gt=logical_date_gt, logical_date_lte=logical_date_lte, logical_date_lt=logical_date_lt, start_date_gte=start_date_gte, start_date_gt=start_date_gt, start_date_lte=start_date_lte, start_date_lt=start_date_lt, end_date_gte=end_date_gte, end_date_gt=end_date_gt, end_date_lte=end_date_lte, end_date_lt=end_date_lt, updated_at_gte=updated_at_gte, updated_at_gt=updated_at_gt, updated_at_lte=updated_at_lte, updated_at_lt=updated_at_lt, duration_gte=duration_gte, duration_gt=duration_gt, duration_lte=duration_lte, duration_lt=duration_lt, state=state, pool=pool, pool_name_pattern=pool_name_pattern, pool_name_prefix_pattern=pool_name_prefix_pattern, queue=queue, queue_name_pattern=queue_name_pattern, queue_name_prefix_pattern=queue_name_prefix_pattern, executor=executor, version_number=version_number, try_number=try_number, operator=operator, operator_name_pattern=operator_name_pattern, operator_name_prefix_pattern=operator_name_prefix_pattern, map_index=map_index, rendered_map_index_pattern=rendered_map_index_pattern, rendered_map_index_prefix_pattern=rendered_map_index_prefix_pattern, limit=limit, offset=offset, order_by=order_by) + api_response = api_instance.get_mapped_task_instances(dag_id, dag_run_id, task_id, region_id=region_id, region_index=region_index, run_after_gte=run_after_gte, run_after_gt=run_after_gt, run_after_lte=run_after_lte, run_after_lt=run_after_lt, logical_date_gte=logical_date_gte, logical_date_gt=logical_date_gt, logical_date_lte=logical_date_lte, logical_date_lt=logical_date_lt, start_date_gte=start_date_gte, start_date_gt=start_date_gt, start_date_lte=start_date_lte, start_date_lt=start_date_lt, end_date_gte=end_date_gte, end_date_gt=end_date_gt, end_date_lte=end_date_lte, end_date_lt=end_date_lt, updated_at_gte=updated_at_gte, updated_at_gt=updated_at_gt, updated_at_lte=updated_at_lte, updated_at_lt=updated_at_lt, duration_gte=duration_gte, duration_gt=duration_gt, duration_lte=duration_lte, duration_lt=duration_lt, state=state, pool=pool, pool_name_pattern=pool_name_pattern, pool_name_prefix_pattern=pool_name_prefix_pattern, queue=queue, queue_name_pattern=queue_name_pattern, queue_name_prefix_pattern=queue_name_prefix_pattern, executor=executor, version_number=version_number, try_number=try_number, operator=operator, operator_name_pattern=operator_name_pattern, operator_name_prefix_pattern=operator_name_prefix_pattern, map_index=map_index, rendered_map_index_pattern=rendered_map_index_pattern, rendered_map_index_prefix_pattern=rendered_map_index_prefix_pattern, limit=limit, offset=offset, order_by=order_by) print("The response of TaskInstanceApi->get_mapped_task_instances:\n") pprint(api_response) except Exception as e: @@ -1183,6 +1249,8 @@ Name | Type | Description | Notes **dag_id** | **str**| | **dag_run_id** | **str**| | **task_id** | **str**| | + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] **run_after_gte** | **datetime**| | [optional] **run_after_gt** | **datetime**| | [optional] **run_after_lte** | **datetime**| | [optional] @@ -1245,6 +1313,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful Response | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | @@ -1253,7 +1322,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_task_instance** -> TaskInstanceResponse get_task_instance(dag_id, dag_run_id, task_id) +> TaskInstanceResponse get_task_instance(dag_id, dag_run_id, task_id, region_id=region_id, region_index=region_index) Get Task Instance @@ -1295,10 +1364,12 @@ with airflow_client.client.ApiClient(configuration) as api_client: dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try: # Get Task Instance - api_response = api_instance.get_task_instance(dag_id, dag_run_id, task_id) + api_response = api_instance.get_task_instance(dag_id, dag_run_id, task_id, region_id=region_id, region_index=region_index) print("The response of TaskInstanceApi->get_task_instance:\n") pprint(api_response) except Exception as e: @@ -1315,6 +1386,8 @@ Name | Type | Description | Notes **dag_id** | **str**| | **dag_run_id** | **str**| | **task_id** | **str**| | + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] ### Return type @@ -1334,15 +1407,17 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful Response | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_task_instance_dependencies** -> TaskDependencyCollectionResponse get_task_instance_dependencies(dag_id, dag_run_id, task_id, map_index=map_index) +> TaskDependencyCollectionResponse get_task_instance_dependencies(dag_id, dag_run_id, task_id, map_index=map_index, region_id=region_id, region_index=region_index) Get Task Instance Dependencies @@ -1385,10 +1460,12 @@ with airflow_client.client.ApiClient(configuration) as api_client: dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | map_index = -1 # int | (optional) (default to -1) + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try: # Get Task Instance Dependencies - api_response = api_instance.get_task_instance_dependencies(dag_id, dag_run_id, task_id, map_index=map_index) + api_response = api_instance.get_task_instance_dependencies(dag_id, dag_run_id, task_id, map_index=map_index, region_id=region_id, region_index=region_index) print("The response of TaskInstanceApi->get_task_instance_dependencies:\n") pprint(api_response) except Exception as e: @@ -1406,6 +1483,8 @@ Name | Type | Description | Notes **dag_run_id** | **str**| | **task_id** | **str**| | **map_index** | **int**| | [optional] [default to -1] + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] ### Return type @@ -1425,15 +1504,17 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful Response | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_task_instance_dependencies_by_map_index** -> TaskDependencyCollectionResponse get_task_instance_dependencies_by_map_index(dag_id, dag_run_id, task_id, map_index) +> TaskDependencyCollectionResponse get_task_instance_dependencies_by_map_index(dag_id, dag_run_id, task_id, map_index, region_id=region_id, region_index=region_index) Get Task Instance Dependencies @@ -1476,10 +1557,12 @@ with airflow_client.client.ApiClient(configuration) as api_client: dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | map_index = 56 # int | + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try: # Get Task Instance Dependencies - api_response = api_instance.get_task_instance_dependencies_by_map_index(dag_id, dag_run_id, task_id, map_index) + api_response = api_instance.get_task_instance_dependencies_by_map_index(dag_id, dag_run_id, task_id, map_index, region_id=region_id, region_index=region_index) print("The response of TaskInstanceApi->get_task_instance_dependencies_by_map_index:\n") pprint(api_response) except Exception as e: @@ -1497,6 +1580,8 @@ Name | Type | Description | Notes **dag_run_id** | **str**| | **task_id** | **str**| | **map_index** | **int**| | + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] ### Return type @@ -1516,20 +1601,24 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful Response | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_task_instance_tries** -> TaskInstanceHistoryCollectionResponse get_task_instance_tries(dag_id, dag_run_id, task_id, map_index=map_index) +> TaskInstanceHistoryCollectionResponse get_task_instance_tries(dag_id, dag_run_id, task_id, map_index=map_index, region_id=region_id, region_index=region_index) Get Task Instance Tries Get list of task instances history. +Tries recorded before the task had regions are not included once it has them. + ### Example * OAuth Authentication (OAuth2PasswordBearer): @@ -1567,10 +1656,12 @@ with airflow_client.client.ApiClient(configuration) as api_client: dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | map_index = -1 # int | (optional) (default to -1) + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try: # Get Task Instance Tries - api_response = api_instance.get_task_instance_tries(dag_id, dag_run_id, task_id, map_index=map_index) + api_response = api_instance.get_task_instance_tries(dag_id, dag_run_id, task_id, map_index=map_index, region_id=region_id, region_index=region_index) print("The response of TaskInstanceApi->get_task_instance_tries:\n") pprint(api_response) except Exception as e: @@ -1588,6 +1679,8 @@ Name | Type | Description | Notes **dag_run_id** | **str**| | **task_id** | **str**| | **map_index** | **int**| | [optional] [default to -1] + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] ### Return type @@ -1607,15 +1700,17 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful Response | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_task_instance_try_details** -> TaskInstanceHistoryResponse get_task_instance_try_details(dag_id, dag_run_id, task_id, task_try_number, map_index=map_index) +> TaskInstanceHistoryResponse get_task_instance_try_details(dag_id, dag_run_id, task_id, task_try_number, map_index=map_index, region_id=region_id, region_index=region_index) Get Task Instance Try Details @@ -1659,10 +1754,12 @@ with airflow_client.client.ApiClient(configuration) as api_client: task_id = 'task_id_example' # str | task_try_number = 56 # int | map_index = -1 # int | (optional) (default to -1) + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try: # Get Task Instance Try Details - api_response = api_instance.get_task_instance_try_details(dag_id, dag_run_id, task_id, task_try_number, map_index=map_index) + api_response = api_instance.get_task_instance_try_details(dag_id, dag_run_id, task_id, task_try_number, map_index=map_index, region_id=region_id, region_index=region_index) print("The response of TaskInstanceApi->get_task_instance_try_details:\n") pprint(api_response) except Exception as e: @@ -1681,6 +1778,8 @@ Name | Type | Description | Notes **task_id** | **str**| | **task_try_number** | **int**| | **map_index** | **int**| | [optional] [default to -1] + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] ### Return type @@ -1700,15 +1799,17 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful Response | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_task_instances** -> TaskInstanceCollectionResponse get_task_instances(dag_id, dag_run_id, cursor=cursor, task_id=task_id, run_after_gte=run_after_gte, run_after_gt=run_after_gt, run_after_lte=run_after_lte, run_after_lt=run_after_lt, logical_date_gte=logical_date_gte, logical_date_gt=logical_date_gt, logical_date_lte=logical_date_lte, logical_date_lt=logical_date_lt, start_date_gte=start_date_gte, start_date_gt=start_date_gt, start_date_lte=start_date_lte, start_date_lt=start_date_lt, end_date_gte=end_date_gte, end_date_gt=end_date_gt, end_date_lte=end_date_lte, end_date_lt=end_date_lt, updated_at_gte=updated_at_gte, updated_at_gt=updated_at_gt, updated_at_lte=updated_at_lte, updated_at_lt=updated_at_lt, duration_gte=duration_gte, duration_gt=duration_gt, duration_lte=duration_lte, duration_lt=duration_lt, task_display_name_pattern=task_display_name_pattern, task_display_name_prefix_pattern=task_display_name_prefix_pattern, task_group_id=task_group_id, dag_id_pattern=dag_id_pattern, dag_id_prefix_pattern=dag_id_prefix_pattern, run_id_pattern=run_id_pattern, run_id_prefix_pattern=run_id_prefix_pattern, state=state, pool=pool, pool_name_pattern=pool_name_pattern, pool_name_prefix_pattern=pool_name_prefix_pattern, queue=queue, queue_name_pattern=queue_name_pattern, queue_name_prefix_pattern=queue_name_prefix_pattern, executor=executor, version_number=version_number, try_number=try_number, operator=operator, operator_name_pattern=operator_name_pattern, operator_name_prefix_pattern=operator_name_prefix_pattern, map_index=map_index, rendered_map_index_pattern=rendered_map_index_pattern, rendered_map_index_prefix_pattern=rendered_map_index_prefix_pattern, limit=limit, offset=offset, order_by=order_by) +> TaskInstanceCollectionResponse get_task_instances(dag_id, dag_run_id, region_id=region_id, region_index=region_index, loop_id=loop_id, iteration=iteration, cursor=cursor, task_id=task_id, run_after_gte=run_after_gte, run_after_gt=run_after_gt, run_after_lte=run_after_lte, run_after_lt=run_after_lt, logical_date_gte=logical_date_gte, logical_date_gt=logical_date_gt, logical_date_lte=logical_date_lte, logical_date_lt=logical_date_lt, start_date_gte=start_date_gte, start_date_gt=start_date_gt, start_date_lte=start_date_lte, start_date_lt=start_date_lt, end_date_gte=end_date_gte, end_date_gt=end_date_gt, end_date_lte=end_date_lte, end_date_lt=end_date_lt, updated_at_gte=updated_at_gte, updated_at_gt=updated_at_gt, updated_at_lte=updated_at_lte, updated_at_lt=updated_at_lt, duration_gte=duration_gte, duration_gt=duration_gt, duration_lte=duration_lte, duration_lt=duration_lt, task_display_name_pattern=task_display_name_pattern, task_display_name_prefix_pattern=task_display_name_prefix_pattern, task_group_id=task_group_id, dag_id_pattern=dag_id_pattern, dag_id_prefix_pattern=dag_id_prefix_pattern, run_id_pattern=run_id_pattern, run_id_prefix_pattern=run_id_prefix_pattern, state=state, pool=pool, pool_name_pattern=pool_name_pattern, pool_name_prefix_pattern=pool_name_prefix_pattern, queue=queue, queue_name_pattern=queue_name_pattern, queue_name_prefix_pattern=queue_name_prefix_pattern, executor=executor, version_number=version_number, teams=teams, try_number=try_number, operator=operator, operator_name_pattern=operator_name_pattern, operator_name_prefix_pattern=operator_name_prefix_pattern, map_index=map_index, rendered_map_index_pattern=rendered_map_index_pattern, rendered_map_index_prefix_pattern=rendered_map_index_prefix_pattern, limit=limit, offset=offset, order_by=order_by) Get Task Instances @@ -1762,6 +1863,10 @@ with airflow_client.client.ApiClient(configuration) as api_client: api_instance = airflow_client.client.TaskInstanceApi(api_client) dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) + loop_id = 'loop_id_example' # str | Task group id of a loop; matches every instance it produced. (optional) + iteration = 56 # int | Narrow ``loop_id`` to a single pass of that loop. Iterations count from one. (optional) cursor = 'cursor_example' # str | Cursor for keyset-based pagination. Pass an empty string for the first page, then use ``next_cursor`` from the response. When ``cursor`` is provided, ``offset`` is ignored. (optional) task_id = 'task_id_example' # str | (optional) run_after_gte = '2013-10-20T19:20:30+01:00' # datetime | (optional) @@ -1804,6 +1909,7 @@ with airflow_client.client.ApiClient(configuration) as api_client: queue_name_prefix_pattern = 'queue_name_prefix_pattern_example' # str | Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". (optional) executor = ['executor_example'] # List[str] | (optional) version_number = [56] # List[int] | (optional) + teams = ['teams_example'] # List[str] | (optional) try_number = [56] # List[int] | (optional) operator = ['operator_example'] # List[str] | (optional) operator_name_pattern = 'operator_name_pattern_example' # str | Case-insensitive substring match (SQL `ILIKE`). Slower than `operator_name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". (optional) @@ -1817,7 +1923,7 @@ with airflow_client.client.ApiClient(configuration) as api_client: try: # Get Task Instances - api_response = api_instance.get_task_instances(dag_id, dag_run_id, cursor=cursor, task_id=task_id, run_after_gte=run_after_gte, run_after_gt=run_after_gt, run_after_lte=run_after_lte, run_after_lt=run_after_lt, logical_date_gte=logical_date_gte, logical_date_gt=logical_date_gt, logical_date_lte=logical_date_lte, logical_date_lt=logical_date_lt, start_date_gte=start_date_gte, start_date_gt=start_date_gt, start_date_lte=start_date_lte, start_date_lt=start_date_lt, end_date_gte=end_date_gte, end_date_gt=end_date_gt, end_date_lte=end_date_lte, end_date_lt=end_date_lt, updated_at_gte=updated_at_gte, updated_at_gt=updated_at_gt, updated_at_lte=updated_at_lte, updated_at_lt=updated_at_lt, duration_gte=duration_gte, duration_gt=duration_gt, duration_lte=duration_lte, duration_lt=duration_lt, task_display_name_pattern=task_display_name_pattern, task_display_name_prefix_pattern=task_display_name_prefix_pattern, task_group_id=task_group_id, dag_id_pattern=dag_id_pattern, dag_id_prefix_pattern=dag_id_prefix_pattern, run_id_pattern=run_id_pattern, run_id_prefix_pattern=run_id_prefix_pattern, state=state, pool=pool, pool_name_pattern=pool_name_pattern, pool_name_prefix_pattern=pool_name_prefix_pattern, queue=queue, queue_name_pattern=queue_name_pattern, queue_name_prefix_pattern=queue_name_prefix_pattern, executor=executor, version_number=version_number, try_number=try_number, operator=operator, operator_name_pattern=operator_name_pattern, operator_name_prefix_pattern=operator_name_prefix_pattern, map_index=map_index, rendered_map_index_pattern=rendered_map_index_pattern, rendered_map_index_prefix_pattern=rendered_map_index_prefix_pattern, limit=limit, offset=offset, order_by=order_by) + api_response = api_instance.get_task_instances(dag_id, dag_run_id, region_id=region_id, region_index=region_index, loop_id=loop_id, iteration=iteration, cursor=cursor, task_id=task_id, run_after_gte=run_after_gte, run_after_gt=run_after_gt, run_after_lte=run_after_lte, run_after_lt=run_after_lt, logical_date_gte=logical_date_gte, logical_date_gt=logical_date_gt, logical_date_lte=logical_date_lte, logical_date_lt=logical_date_lt, start_date_gte=start_date_gte, start_date_gt=start_date_gt, start_date_lte=start_date_lte, start_date_lt=start_date_lt, end_date_gte=end_date_gte, end_date_gt=end_date_gt, end_date_lte=end_date_lte, end_date_lt=end_date_lt, updated_at_gte=updated_at_gte, updated_at_gt=updated_at_gt, updated_at_lte=updated_at_lte, updated_at_lt=updated_at_lt, duration_gte=duration_gte, duration_gt=duration_gt, duration_lte=duration_lte, duration_lt=duration_lt, task_display_name_pattern=task_display_name_pattern, task_display_name_prefix_pattern=task_display_name_prefix_pattern, task_group_id=task_group_id, dag_id_pattern=dag_id_pattern, dag_id_prefix_pattern=dag_id_prefix_pattern, run_id_pattern=run_id_pattern, run_id_prefix_pattern=run_id_prefix_pattern, state=state, pool=pool, pool_name_pattern=pool_name_pattern, pool_name_prefix_pattern=pool_name_prefix_pattern, queue=queue, queue_name_pattern=queue_name_pattern, queue_name_prefix_pattern=queue_name_prefix_pattern, executor=executor, version_number=version_number, teams=teams, try_number=try_number, operator=operator, operator_name_pattern=operator_name_pattern, operator_name_prefix_pattern=operator_name_prefix_pattern, map_index=map_index, rendered_map_index_pattern=rendered_map_index_pattern, rendered_map_index_prefix_pattern=rendered_map_index_prefix_pattern, limit=limit, offset=offset, order_by=order_by) print("The response of TaskInstanceApi->get_task_instances:\n") pprint(api_response) except Exception as e: @@ -1833,6 +1939,10 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **dag_id** | **str**| | **dag_run_id** | **str**| | + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] + **loop_id** | **str**| Task group id of a loop; matches every instance it produced. | [optional] + **iteration** | **int**| Narrow ``loop_id`` to a single pass of that loop. Iterations count from one. | [optional] **cursor** | **str**| Cursor for keyset-based pagination. Pass an empty string for the first page, then use ``next_cursor`` from the response. When ``cursor`` is provided, ``offset`` is ignored. | [optional] **task_id** | **str**| | [optional] **run_after_gte** | **datetime**| | [optional] @@ -1875,6 +1985,7 @@ Name | Type | Description | Notes **queue_name_prefix_pattern** | **str**| Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". | [optional] **executor** | [**List[str]**](str.md)| | [optional] **version_number** | [**List[int]**](int.md)| | [optional] + **teams** | [**List[str]**](str.md)| | [optional] **try_number** | [**List[int]**](int.md)| | [optional] **operator** | [**List[str]**](str.md)| | [optional] **operator_name_pattern** | **str**| Case-insensitive substring match (SQL `ILIKE`). Slower than `operator_name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". | [optional] @@ -2003,7 +2114,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **patch_task_group_instances** -> TaskInstanceCollectionResponse patch_task_group_instances(dag_id, dag_run_id, group_id, patch_task_instance_body, update_mask=update_mask) +> TaskInstanceCollectionResponse patch_task_group_instances(dag_id, dag_run_id, group_id, patch_task_instance_body, update_mask=update_mask, region_id=region_id, region_index=region_index) Patch Task Group Instances @@ -2048,10 +2159,12 @@ with airflow_client.client.ApiClient(configuration) as api_client: group_id = 'group_id_example' # str | patch_task_instance_body = airflow_client.client.PatchTaskInstanceBody() # PatchTaskInstanceBody | update_mask = ['update_mask_example'] # List[str] | (optional) + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try: # Patch Task Group Instances - api_response = api_instance.patch_task_group_instances(dag_id, dag_run_id, group_id, patch_task_instance_body, update_mask=update_mask) + api_response = api_instance.patch_task_group_instances(dag_id, dag_run_id, group_id, patch_task_instance_body, update_mask=update_mask, region_id=region_id, region_index=region_index) print("The response of TaskInstanceApi->patch_task_group_instances:\n") pprint(api_response) except Exception as e: @@ -2070,6 +2183,8 @@ Name | Type | Description | Notes **group_id** | **str**| | **patch_task_instance_body** | [**PatchTaskInstanceBody**](PatchTaskInstanceBody.md)| | **update_mask** | [**List[str]**](str.md)| | [optional] + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] ### Return type @@ -2099,7 +2214,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **patch_task_group_instances_dry_run** -> TaskInstanceCollectionResponse patch_task_group_instances_dry_run(dag_id, dag_run_id, group_id, patch_task_instance_body) +> TaskInstanceCollectionResponse patch_task_group_instances_dry_run(dag_id, dag_run_id, group_id, patch_task_instance_body, region_id=region_id, region_index=region_index) Patch Task Group Instances Dry Run @@ -2143,10 +2258,12 @@ with airflow_client.client.ApiClient(configuration) as api_client: dag_run_id = 'dag_run_id_example' # str | group_id = 'group_id_example' # str | patch_task_instance_body = airflow_client.client.PatchTaskInstanceBody() # PatchTaskInstanceBody | + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try: # Patch Task Group Instances Dry Run - api_response = api_instance.patch_task_group_instances_dry_run(dag_id, dag_run_id, group_id, patch_task_instance_body) + api_response = api_instance.patch_task_group_instances_dry_run(dag_id, dag_run_id, group_id, patch_task_instance_body, region_id=region_id, region_index=region_index) print("The response of TaskInstanceApi->patch_task_group_instances_dry_run:\n") pprint(api_response) except Exception as e: @@ -2164,6 +2281,8 @@ Name | Type | Description | Notes **dag_run_id** | **str**| | **group_id** | **str**| | **patch_task_instance_body** | [**PatchTaskInstanceBody**](PatchTaskInstanceBody.md)| | + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] ### Return type @@ -2187,12 +2306,13 @@ Name | Type | Description | Notes **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **patch_task_instance** -> TaskInstanceCollectionResponse patch_task_instance(dag_id, dag_run_id, task_id, patch_task_instance_body, map_index=map_index, update_mask=update_mask) +> TaskInstanceCollectionResponse patch_task_instance(dag_id, dag_run_id, task_id, patch_task_instance_body, map_index=map_index, update_mask=update_mask, region_id=region_id, region_index=region_index) Patch Task Instance @@ -2238,10 +2358,12 @@ with airflow_client.client.ApiClient(configuration) as api_client: patch_task_instance_body = airflow_client.client.PatchTaskInstanceBody() # PatchTaskInstanceBody | map_index = 56 # int | (optional) update_mask = ['update_mask_example'] # List[str] | (optional) + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try: # Patch Task Instance - api_response = api_instance.patch_task_instance(dag_id, dag_run_id, task_id, patch_task_instance_body, map_index=map_index, update_mask=update_mask) + api_response = api_instance.patch_task_instance(dag_id, dag_run_id, task_id, patch_task_instance_body, map_index=map_index, update_mask=update_mask, region_id=region_id, region_index=region_index) print("The response of TaskInstanceApi->patch_task_instance:\n") pprint(api_response) except Exception as e: @@ -2261,6 +2383,8 @@ Name | Type | Description | Notes **patch_task_instance_body** | [**PatchTaskInstanceBody**](PatchTaskInstanceBody.md)| | **map_index** | **int**| | [optional] **update_mask** | [**List[str]**](str.md)| | [optional] + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] ### Return type @@ -2290,7 +2414,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **patch_task_instance_by_map_index** -> TaskInstanceCollectionResponse patch_task_instance_by_map_index(dag_id, dag_run_id, task_id, map_index, patch_task_instance_body, update_mask=update_mask) +> TaskInstanceCollectionResponse patch_task_instance_by_map_index(dag_id, dag_run_id, task_id, map_index, patch_task_instance_body, update_mask=update_mask, region_id=region_id, region_index=region_index) Patch Task Instance @@ -2336,10 +2460,12 @@ with airflow_client.client.ApiClient(configuration) as api_client: map_index = 56 # int | patch_task_instance_body = airflow_client.client.PatchTaskInstanceBody() # PatchTaskInstanceBody | update_mask = ['update_mask_example'] # List[str] | (optional) + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try: # Patch Task Instance - api_response = api_instance.patch_task_instance_by_map_index(dag_id, dag_run_id, task_id, map_index, patch_task_instance_body, update_mask=update_mask) + api_response = api_instance.patch_task_instance_by_map_index(dag_id, dag_run_id, task_id, map_index, patch_task_instance_body, update_mask=update_mask, region_id=region_id, region_index=region_index) print("The response of TaskInstanceApi->patch_task_instance_by_map_index:\n") pprint(api_response) except Exception as e: @@ -2359,6 +2485,8 @@ Name | Type | Description | Notes **map_index** | **int**| | **patch_task_instance_body** | [**PatchTaskInstanceBody**](PatchTaskInstanceBody.md)| | **update_mask** | [**List[str]**](str.md)| | [optional] + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] ### Return type @@ -2388,7 +2516,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **patch_task_instance_dry_run** -> TaskInstanceCollectionResponse patch_task_instance_dry_run(dag_id, dag_run_id, task_id, patch_task_instance_body, map_index=map_index, update_mask=update_mask) +> TaskInstanceCollectionResponse patch_task_instance_dry_run(dag_id, dag_run_id, task_id, patch_task_instance_body, map_index=map_index, update_mask=update_mask, region_id=region_id, region_index=region_index) Patch Task Instance Dry Run @@ -2434,10 +2562,12 @@ with airflow_client.client.ApiClient(configuration) as api_client: patch_task_instance_body = airflow_client.client.PatchTaskInstanceBody() # PatchTaskInstanceBody | map_index = 56 # int | (optional) update_mask = ['update_mask_example'] # List[str] | (optional) + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try: # Patch Task Instance Dry Run - api_response = api_instance.patch_task_instance_dry_run(dag_id, dag_run_id, task_id, patch_task_instance_body, map_index=map_index, update_mask=update_mask) + api_response = api_instance.patch_task_instance_dry_run(dag_id, dag_run_id, task_id, patch_task_instance_body, map_index=map_index, update_mask=update_mask, region_id=region_id, region_index=region_index) print("The response of TaskInstanceApi->patch_task_instance_dry_run:\n") pprint(api_response) except Exception as e: @@ -2457,6 +2587,8 @@ Name | Type | Description | Notes **patch_task_instance_body** | [**PatchTaskInstanceBody**](PatchTaskInstanceBody.md)| | **map_index** | **int**| | [optional] **update_mask** | [**List[str]**](str.md)| | [optional] + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] ### Return type @@ -2480,12 +2612,13 @@ Name | Type | Description | Notes **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **patch_task_instance_dry_run_by_map_index** -> TaskInstanceCollectionResponse patch_task_instance_dry_run_by_map_index(dag_id, dag_run_id, task_id, map_index, patch_task_instance_body, update_mask=update_mask) +> TaskInstanceCollectionResponse patch_task_instance_dry_run_by_map_index(dag_id, dag_run_id, task_id, map_index, patch_task_instance_body, update_mask=update_mask, region_id=region_id, region_index=region_index) Patch Task Instance Dry Run @@ -2531,10 +2664,12 @@ with airflow_client.client.ApiClient(configuration) as api_client: map_index = 56 # int | patch_task_instance_body = airflow_client.client.PatchTaskInstanceBody() # PatchTaskInstanceBody | update_mask = ['update_mask_example'] # List[str] | (optional) + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try: # Patch Task Instance Dry Run - api_response = api_instance.patch_task_instance_dry_run_by_map_index(dag_id, dag_run_id, task_id, map_index, patch_task_instance_body, update_mask=update_mask) + api_response = api_instance.patch_task_instance_dry_run_by_map_index(dag_id, dag_run_id, task_id, map_index, patch_task_instance_body, update_mask=update_mask, region_id=region_id, region_index=region_index) print("The response of TaskInstanceApi->patch_task_instance_dry_run_by_map_index:\n") pprint(api_response) except Exception as e: @@ -2554,6 +2689,8 @@ Name | Type | Description | Notes **map_index** | **int**| | **patch_task_instance_body** | [**PatchTaskInstanceBody**](PatchTaskInstanceBody.md)| | **update_mask** | [**List[str]**](str.md)| | [optional] + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] ### Return type @@ -2577,6 +2714,7 @@ Name | Type | Description | Notes **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2672,7 +2810,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_hitl_detail** -> HITLDetailResponse update_hitl_detail(dag_id, dag_run_id, task_id, map_index, update_hitl_detail_payload) +> HITLDetailResponse update_hitl_detail(dag_id, dag_run_id, task_id, map_index, update_hitl_detail_payload, region_id=region_id, region_index=region_index) Update Hitl Detail @@ -2717,10 +2855,12 @@ with airflow_client.client.ApiClient(configuration) as api_client: task_id = 'task_id_example' # str | map_index = 56 # int | update_hitl_detail_payload = airflow_client.client.UpdateHITLDetailPayload() # UpdateHITLDetailPayload | + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try: # Update Hitl Detail - api_response = api_instance.update_hitl_detail(dag_id, dag_run_id, task_id, map_index, update_hitl_detail_payload) + api_response = api_instance.update_hitl_detail(dag_id, dag_run_id, task_id, map_index, update_hitl_detail_payload, region_id=region_id, region_index=region_index) print("The response of TaskInstanceApi->update_hitl_detail:\n") pprint(api_response) except Exception as e: @@ -2739,6 +2879,8 @@ Name | Type | Description | Notes **task_id** | **str**| | **map_index** | **int**| | **update_hitl_detail_payload** | [**UpdateHITLDetailPayload**](UpdateHITLDetailPayload.md)| | + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] ### Return type diff --git a/docs/TaskInstanceHistoryResponse.md b/docs/TaskInstanceHistoryResponse.md index cfe2ce2e..7f2f6eab 100644 --- a/docs/TaskInstanceHistoryResponse.md +++ b/docs/TaskInstanceHistoryResponse.md @@ -15,8 +15,11 @@ Name | Type | Description | Notes **executor** | **str** | | [optional] **executor_config** | **str** | | **hostname** | **str** | | [optional] +**id** | **UUID** | | +**loop_iteration** | [**LoopIterationResponse**](LoopIterationResponse.md) | | [optional] **map_index** | **int** | | **max_tries** | **int** | | +**note** | **str** | | [optional] **operator** | **str** | | [optional] **operator_name** | **str** | | [optional] **pid** | **int** | | [optional] @@ -25,9 +28,13 @@ Name | Type | Description | Notes **priority_weight** | **int** | | [optional] **queue** | **str** | | [optional] **queued_when** | **datetime** | | [optional] +**region_id** | **UUID** | | [optional] +**region_index** | **int** | | [optional] +**retry_at** | **datetime** | | [optional] **scheduled_when** | **datetime** | | [optional] **start_date** | **datetime** | | [optional] **state** | [**TaskInstanceState**](TaskInstanceState.md) | | [optional] +**state_reason** | **str** | | [optional] **task_display_name** | **str** | | **task_id** | **str** | | **try_number** | **int** | | diff --git a/docs/TaskInstanceResponse.md b/docs/TaskInstanceResponse.md index 0f955256..5d34bd53 100644 --- a/docs/TaskInstanceResponse.md +++ b/docs/TaskInstanceResponse.md @@ -16,7 +16,9 @@ Name | Type | Description | Notes **executor_config** | **str** | | **hostname** | **str** | | [optional] **id** | **UUID** | | +**in_loop** | **bool** | | **logical_date** | **datetime** | | [optional] +**loop_iteration** | [**LoopIterationResponse**](LoopIterationResponse.md) | | [optional] **map_index** | **int** | | **max_tries** | **int** | | **note** | **str** | | [optional] @@ -28,14 +30,19 @@ Name | Type | Description | Notes **priority_weight** | **int** | | [optional] **queue** | **str** | | [optional] **queued_when** | **datetime** | | [optional] +**region_id** | **UUID** | | [optional] +**region_index** | **int** | | [optional] **rendered_fields** | **Dict[str, object]** | | [optional] **rendered_map_index** | **str** | | [optional] +**retry_at** | **datetime** | | [optional] **run_after** | **datetime** | | **scheduled_when** | **datetime** | | [optional] **start_date** | **datetime** | | [optional] **state** | [**TaskInstanceState**](TaskInstanceState.md) | | [optional] +**state_reason** | **str** | | [optional] **task_display_name** | **str** | | **task_id** | **str** | | +**team_name** | **str** | | [optional] **trigger** | [**TriggerResponse**](TriggerResponse.md) | | [optional] **triggerer_job** | [**JobResponse**](JobResponse.md) | | [optional] **try_number** | **int** | | diff --git a/docs/TaskInstancesInner.md b/docs/TaskInstancesInner.md index 5d60a972..9cf37158 100644 --- a/docs/TaskInstancesInner.md +++ b/docs/TaskInstancesInner.md @@ -15,7 +15,9 @@ Name | Type | Description | Notes **executor_config** | **str** | | **hostname** | **str** | | [optional] **id** | **UUID** | | +**in_loop** | **bool** | | **logical_date** | **datetime** | | [optional] +**loop_iteration** | [**LoopIterationResponse**](LoopIterationResponse.md) | | [optional] **map_index** | **int** | | **max_tries** | **int** | | **note** | **str** | | [optional] @@ -27,14 +29,19 @@ Name | Type | Description | Notes **priority_weight** | **int** | | [optional] **queue** | **str** | | [optional] **queued_when** | **datetime** | | [optional] +**region_id** | **UUID** | | [optional] +**region_index** | **int** | | [optional] **rendered_fields** | **Dict[str, object]** | | [optional] **rendered_map_index** | **str** | | [optional] +**retry_at** | **datetime** | | [optional] **run_after** | **datetime** | | **scheduled_when** | **datetime** | | [optional] **start_date** | **datetime** | | [optional] **state** | [**TaskInstanceState**](TaskInstanceState.md) | | [optional] +**state_reason** | **str** | | [optional] **task_display_name** | **str** | | **task_id** | **str** | | +**team_name** | **str** | | [optional] **trigger** | [**TriggerResponse**](TriggerResponse.md) | | [optional] **triggerer_job** | [**JobResponse**](JobResponse.md) | | [optional] **try_number** | **int** | | diff --git a/docs/TaskOutletAssetReference.md b/docs/TaskOutletAssetReference.md index 0306c5b4..3fde5dd1 100644 --- a/docs/TaskOutletAssetReference.md +++ b/docs/TaskOutletAssetReference.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **created_at** | **datetime** | | **dag_id** | **str** | | **task_id** | **str** | | +**team_name** | **str** | | [optional] **updated_at** | **datetime** | | ## Example diff --git a/docs/TaskStateStoreApi.md b/docs/TaskStateStoreApi.md index d3289b8a..425d986d 100644 --- a/docs/TaskStateStoreApi.md +++ b/docs/TaskStateStoreApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **clear_task_state_store** -> clear_task_state_store(dag_id, dag_run_id, task_id, all_map_indices=all_map_indices, map_index=map_index) +> clear_task_state_store(dag_id, dag_run_id, task_id, map_index=map_index, region_id=region_id, region_index=region_index, all_map_indices=all_map_indices) Clear Task State Store @@ -57,12 +57,14 @@ with airflow_client.client.ApiClient(configuration) as api_client: dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | - all_map_indices = False # bool | (optional) (default to False) map_index = -1 # int | (optional) (default to -1) + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) + all_map_indices = False # bool | (optional) (default to False) try: # Clear Task State Store - api_instance.clear_task_state_store(dag_id, dag_run_id, task_id, all_map_indices=all_map_indices, map_index=map_index) + api_instance.clear_task_state_store(dag_id, dag_run_id, task_id, map_index=map_index, region_id=region_id, region_index=region_index, all_map_indices=all_map_indices) except Exception as e: print("Exception when calling TaskStateStoreApi->clear_task_state_store: %s\n" % e) ``` @@ -77,8 +79,10 @@ Name | Type | Description | Notes **dag_id** | **str**| | **dag_run_id** | **str**| | **task_id** | **str**| | - **all_map_indices** | **bool**| | [optional] [default to False] **map_index** | **int**| | [optional] [default to -1] + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] + **all_map_indices** | **bool**| | [optional] [default to False] ### Return type @@ -98,15 +102,17 @@ void (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful Response | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **delete_task_state_store** -> delete_task_state_store(key, dag_id, dag_run_id, task_id, map_index=map_index) +> delete_task_state_store(key, dag_id, dag_run_id, task_id, map_index=map_index, region_id=region_id, region_index=region_index) Delete Task State Store @@ -149,10 +155,12 @@ with airflow_client.client.ApiClient(configuration) as api_client: dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | map_index = -1 # int | (optional) (default to -1) + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try: # Delete Task State Store - api_instance.delete_task_state_store(key, dag_id, dag_run_id, task_id, map_index=map_index) + api_instance.delete_task_state_store(key, dag_id, dag_run_id, task_id, map_index=map_index, region_id=region_id, region_index=region_index) except Exception as e: print("Exception when calling TaskStateStoreApi->delete_task_state_store: %s\n" % e) ``` @@ -169,6 +177,8 @@ Name | Type | Description | Notes **dag_run_id** | **str**| | **task_id** | **str**| | **map_index** | **int**| | [optional] [default to -1] + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] ### Return type @@ -188,15 +198,17 @@ void (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful Response | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_task_state_store** -> TaskStateStoreResponse get_task_state_store(key, dag_id, dag_run_id, task_id, map_index=map_index) +> TaskStateStoreResponse get_task_state_store(key, dag_id, dag_run_id, task_id, map_index=map_index, region_id=region_id, region_index=region_index) Get Task State Store @@ -240,10 +252,12 @@ with airflow_client.client.ApiClient(configuration) as api_client: dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | map_index = -1 # int | (optional) (default to -1) + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try: # Get Task State Store - api_response = api_instance.get_task_state_store(key, dag_id, dag_run_id, task_id, map_index=map_index) + api_response = api_instance.get_task_state_store(key, dag_id, dag_run_id, task_id, map_index=map_index, region_id=region_id, region_index=region_index) print("The response of TaskStateStoreApi->get_task_state_store:\n") pprint(api_response) except Exception as e: @@ -262,6 +276,8 @@ Name | Type | Description | Notes **dag_run_id** | **str**| | **task_id** | **str**| | **map_index** | **int**| | [optional] [default to -1] + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] ### Return type @@ -281,15 +297,17 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful Response | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_task_state_store** -> TaskStateStoreCollectionResponse list_task_state_store(dag_id, dag_run_id, task_id, map_index=map_index, limit=limit, offset=offset) +> TaskStateStoreCollectionResponse list_task_state_store(dag_id, dag_run_id, task_id, map_index=map_index, region_id=region_id, region_index=region_index, limit=limit, offset=offset) List Task State Store @@ -332,12 +350,14 @@ with airflow_client.client.ApiClient(configuration) as api_client: dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | map_index = -1 # int | (optional) (default to -1) + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) limit = 50 # int | (optional) (default to 50) offset = 0 # int | (optional) (default to 0) try: # List Task State Store - api_response = api_instance.list_task_state_store(dag_id, dag_run_id, task_id, map_index=map_index, limit=limit, offset=offset) + api_response = api_instance.list_task_state_store(dag_id, dag_run_id, task_id, map_index=map_index, region_id=region_id, region_index=region_index, limit=limit, offset=offset) print("The response of TaskStateStoreApi->list_task_state_store:\n") pprint(api_response) except Exception as e: @@ -355,6 +375,8 @@ Name | Type | Description | Notes **dag_run_id** | **str**| | **task_id** | **str**| | **map_index** | **int**| | [optional] [default to -1] + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] **limit** | **int**| | [optional] [default to 50] **offset** | **int**| | [optional] [default to 0] @@ -376,14 +398,17 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful Response | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | +**404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **patch_task_state_store** -> object patch_task_state_store(key, dag_id, dag_run_id, task_id, task_state_store_patch_body, map_index=map_index) +> object patch_task_state_store(key, dag_id, dag_run_id, task_id, task_state_store_patch_body, map_index=map_index, region_id=region_id, region_index=region_index) Patch Task State Store @@ -428,10 +453,12 @@ with airflow_client.client.ApiClient(configuration) as api_client: task_id = 'task_id_example' # str | task_state_store_patch_body = airflow_client.client.TaskStateStorePatchBody() # TaskStateStorePatchBody | map_index = -1 # int | (optional) (default to -1) + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try: # Patch Task State Store - api_response = api_instance.patch_task_state_store(key, dag_id, dag_run_id, task_id, task_state_store_patch_body, map_index=map_index) + api_response = api_instance.patch_task_state_store(key, dag_id, dag_run_id, task_id, task_state_store_patch_body, map_index=map_index, region_id=region_id, region_index=region_index) print("The response of TaskStateStoreApi->patch_task_state_store:\n") pprint(api_response) except Exception as e: @@ -451,6 +478,8 @@ Name | Type | Description | Notes **task_id** | **str**| | **task_state_store_patch_body** | [**TaskStateStorePatchBody**](TaskStateStorePatchBody.md)| | **map_index** | **int**| | [optional] [default to -1] + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] ### Return type @@ -470,15 +499,17 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful Response | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **set_task_state_store** -> set_task_state_store(key, dag_id, dag_run_id, task_id, task_state_store_body, map_index=map_index) +> set_task_state_store(key, dag_id, dag_run_id, task_id, task_state_store_body, map_index=map_index, region_id=region_id, region_index=region_index) Set Task State Store @@ -523,10 +554,12 @@ with airflow_client.client.ApiClient(configuration) as api_client: task_id = 'task_id_example' # str | task_state_store_body = airflow_client.client.TaskStateStoreBody() # TaskStateStoreBody | map_index = -1 # int | (optional) (default to -1) + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try: # Set Task State Store - api_instance.set_task_state_store(key, dag_id, dag_run_id, task_id, task_state_store_body, map_index=map_index) + api_instance.set_task_state_store(key, dag_id, dag_run_id, task_id, task_state_store_body, map_index=map_index, region_id=region_id, region_index=region_index) except Exception as e: print("Exception when calling TaskStateStoreApi->set_task_state_store: %s\n" % e) ``` @@ -544,6 +577,8 @@ Name | Type | Description | Notes **task_id** | **str**| | **task_state_store_body** | [**TaskStateStoreBody**](TaskStateStoreBody.md)| | **map_index** | **int**| | [optional] [default to -1] + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] ### Return type @@ -563,9 +598,11 @@ void (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | Successful Response | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/TriggerDAGRunPostBody.md b/docs/TriggerDAGRunPostBody.md index 03cde0af..ed8aee40 100644 --- a/docs/TriggerDAGRunPostBody.md +++ b/docs/TriggerDAGRunPostBody.md @@ -6,10 +6,12 @@ Trigger Dag Run Serializer for POST body. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**bundle_version** | **str** | | [optional] **conf** | **Dict[str, object]** | | [optional] **dag_run_id** | **str** | | [optional] **data_interval_end** | **datetime** | | [optional] **data_interval_start** | **datetime** | | [optional] +**drain_dag** | **bool** | Drain the Dag together with this run. Draining changes the whole Dag: unfinished runs can start or resume except those held by paused backfills. No scheduled runs are created, and the Dag pauses once all unfinished runs finish. Paused backfills must be resumed for draining to complete. Requires the same permission as pausing the Dag. | [optional] [default to False] **logical_date** | **datetime** | | [optional] **note** | **str** | | [optional] **partition_key** | **str** | | [optional] diff --git a/docs/TriggererInfoResponse.md b/docs/TriggererInfoResponse.md index 00a70acf..2d1cfd0b 100644 --- a/docs/TriggererInfoResponse.md +++ b/docs/TriggererInfoResponse.md @@ -6,8 +6,10 @@ Triggerer info serializer for responses. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**detailed_status** | [**DetailedHealthStatus**](DetailedHealthStatus.md) | | [optional] +**instances** | [**List[TriggererInstanceInfoResponse]**](TriggererInstanceInfoResponse.md) | | [optional] **latest_triggerer_heartbeat** | **str** | | [optional] -**status** | **str** | | [optional] +**status** | [**HealthStatus**](HealthStatus.md) | | [optional] ## Example diff --git a/docs/TriggererInstanceInfoResponse.md b/docs/TriggererInstanceInfoResponse.md new file mode 100644 index 00000000..f01621fe --- /dev/null +++ b/docs/TriggererInstanceInfoResponse.md @@ -0,0 +1,32 @@ +# TriggererInstanceInfoResponse + +Triggerer instance info serializer for responses. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hostname** | **str** | | [optional] +**latest_triggerer_heartbeat** | **str** | | [optional] +**team_names** | **List[str]** | | + +## Example + +```python +from airflow_client.client.models.triggerer_instance_info_response import TriggererInstanceInfoResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of TriggererInstanceInfoResponse from a JSON string +triggerer_instance_info_response_instance = TriggererInstanceInfoResponse.from_json(json) +# print the JSON string representation of the object +print(TriggererInstanceInfoResponse.to_json()) + +# convert the object into a dict +triggerer_instance_info_response_dict = triggerer_instance_info_response_instance.to_dict() +# create an instance of TriggererInstanceInfoResponse from a dict +triggerer_instance_info_response_from_dict = TriggererInstanceInfoResponse.from_dict(triggerer_instance_info_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UiActionsInner.md b/docs/UiActionsInner.md new file mode 100644 index 00000000..00e7ad2b --- /dev/null +++ b/docs/UiActionsInner.md @@ -0,0 +1,36 @@ +# UiActionsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action_type** | **str** | | +**applies_to** | **Dict[str, List[str]]** | Serializer for the optional scoping criteria of a UI plugin. An open map of dotted field path to the values that path may take -- not a closed set of criteria. ``{\"state\": [\"failed\"], \"dag.tags.name\": [\"ml\"]}`` scopes to failed entities of ml-tagged Dags. An unqualified path is rooted at the entity the ``destination`` is about; a path may instead name a related record (``dag``, ``dag_run``, ``task``, ``task_instance``) as its first segment. Matching is equality against the listed values, OR within a path and AND across paths, and is evaluated client-side. | [optional] +**destination** | **str** | | +**href** | **str** | | +**icon** | **str** | | [optional] +**icon_dark_mode** | **str** | | [optional] +**name** | **str** | | +**bundle_url** | **str** | | + +## Example + +```python +from airflow_client.client.models.ui_actions_inner import UiActionsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of UiActionsInner from a JSON string +ui_actions_inner_instance = UiActionsInner.from_json(json) +# print the JSON string representation of the object +print(UiActionsInner.to_json()) + +# convert the object into a dict +ui_actions_inner_dict = ui_actions_inner_instance.to_dict() +# create an instance of UiActionsInner from a dict +ui_actions_inner_from_dict = UiActionsInner.from_dict(ui_actions_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateHITLDetailPayload.md b/docs/UpdateHITLDetailPayload.md index 1746a714..235f6492 100644 --- a/docs/UpdateHITLDetailPayload.md +++ b/docs/UpdateHITLDetailPayload.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **chosen_options** | **List[str]** | | **params_input** | **Dict[str, object]** | | [optional] +**request_created_at** | **datetime** | | [optional] ## Example diff --git a/docs/VariableApi.md b/docs/VariableApi.md index 7e5c711f..e1821315 100644 --- a/docs/VariableApi.md +++ b/docs/VariableApi.md @@ -528,6 +528,7 @@ Name | Type | Description | Notes **201** | Successful Response | - | **401** | Unauthorized | - | **403** | Forbidden | - | +**404** | Not Found | - | **409** | Conflict | - | **422** | Validation Error | - | diff --git a/docs/WarningType.md b/docs/WarningType.md new file mode 100644 index 00000000..f6ad1c67 --- /dev/null +++ b/docs/WarningType.md @@ -0,0 +1,28 @@ +# WarningType + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from airflow_client.client.models.warning_type import WarningType + +# TODO update the JSON string below +json = "{}" +# create an instance of WarningType from a JSON string +warning_type_instance = WarningType.from_json(json) +# print the JSON string representation of the object +print(WarningType.to_json()) + +# convert the object into a dict +warning_type_dict = warning_type_instance.to_dict() +# create an instance of WarningType from a dict +warning_type_from_dict = WarningType.from_dict(warning_type_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WarningType1.md b/docs/WarningType1.md new file mode 100644 index 00000000..8d1165f4 --- /dev/null +++ b/docs/WarningType1.md @@ -0,0 +1,28 @@ +# WarningType1 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from airflow_client.client.models.warning_type1 import WarningType1 + +# TODO update the JSON string below +json = "{}" +# create an instance of WarningType1 from a JSON string +warning_type1_instance = WarningType1.from_json(json) +# print the JSON string representation of the object +print(WarningType1.to_json()) + +# convert the object into a dict +warning_type1_dict = warning_type1_instance.to_dict() +# create an instance of WarningType1 from a dict +warning_type1_from_dict = WarningType1.from_dict(warning_type1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/XComApi.md b/docs/XComApi.md index c26d10db..55449086 100644 --- a/docs/XComApi.md +++ b/docs/XComApi.md @@ -106,7 +106,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **delete_xcom_entry** -> delete_xcom_entry(dag_id, task_id, dag_run_id, xcom_key, map_index=map_index) +> delete_xcom_entry(dag_id, task_id, dag_run_id, xcom_key, map_index=map_index, region_id=region_id, region_index=region_index) Delete Xcom Entry @@ -149,10 +149,12 @@ with airflow_client.client.ApiClient(configuration) as api_client: dag_run_id = 'dag_run_id_example' # str | xcom_key = 'xcom_key_example' # str | map_index = -1 # int | (optional) (default to -1) + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) try: # Delete Xcom Entry - api_instance.delete_xcom_entry(dag_id, task_id, dag_run_id, xcom_key, map_index=map_index) + api_instance.delete_xcom_entry(dag_id, task_id, dag_run_id, xcom_key, map_index=map_index, region_id=region_id, region_index=region_index) except Exception as e: print("Exception when calling XComApi->delete_xcom_entry: %s\n" % e) ``` @@ -169,6 +171,8 @@ Name | Type | Description | Notes **dag_run_id** | **str**| | **xcom_key** | **str**| | **map_index** | **int**| | [optional] [default to -1] + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] ### Return type @@ -192,12 +196,13 @@ void (empty response body) **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_xcom_entries** -> XComCollectionResponse get_xcom_entries(dag_id, dag_run_id, task_id, xcom_key=xcom_key, map_index=map_index, limit=limit, offset=offset, xcom_key_pattern=xcom_key_pattern, xcom_key_prefix_pattern=xcom_key_prefix_pattern, dag_display_name_pattern=dag_display_name_pattern, dag_display_name_prefix_pattern=dag_display_name_prefix_pattern, run_id_pattern=run_id_pattern, run_id_prefix_pattern=run_id_prefix_pattern, task_id_pattern=task_id_pattern, task_id_prefix_pattern=task_id_prefix_pattern, map_index_filter=map_index_filter, logical_date_gte=logical_date_gte, logical_date_gt=logical_date_gt, logical_date_lte=logical_date_lte, logical_date_lt=logical_date_lt, run_after_gte=run_after_gte, run_after_gt=run_after_gt, run_after_lte=run_after_lte, run_after_lt=run_after_lt, order_by=order_by) +> XComCollectionResponse get_xcom_entries(dag_id, dag_run_id, task_id, xcom_key=xcom_key, map_index=map_index, region_id=region_id, region_index=region_index, exclude_internal_keys=exclude_internal_keys, limit=limit, offset=offset, xcom_key_pattern=xcom_key_pattern, xcom_key_prefix_pattern=xcom_key_prefix_pattern, dag_display_name_pattern=dag_display_name_pattern, dag_display_name_prefix_pattern=dag_display_name_prefix_pattern, run_id_pattern=run_id_pattern, run_id_prefix_pattern=run_id_prefix_pattern, task_id_pattern=task_id_pattern, task_id_prefix_pattern=task_id_prefix_pattern, map_index_filter=map_index_filter, logical_date_gte=logical_date_gte, logical_date_gt=logical_date_gt, logical_date_lte=logical_date_lte, logical_date_lt=logical_date_lt, run_after_gte=run_after_gte, run_after_gt=run_after_gt, run_after_lte=run_after_lte, run_after_lt=run_after_lt, teams=teams, order_by=order_by) Get Xcom Entries @@ -243,6 +248,9 @@ with airflow_client.client.ApiClient(configuration) as api_client: task_id = 'task_id_example' # str | xcom_key = 'xcom_key_example' # str | (optional) map_index = 56 # int | (optional) + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) + exclude_internal_keys = False # bool | Leave out XComs whose keys Airflow reserves for itself, such as loop decision reasons. (optional) (default to False) limit = 50 # int | (optional) (default to 50) offset = 0 # int | (optional) (default to 0) xcom_key_pattern = 'xcom_key_pattern_example' # str | Case-insensitive substring match (SQL `ILIKE`). Slower than `xcom_key_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". (optional) @@ -262,11 +270,12 @@ with airflow_client.client.ApiClient(configuration) as api_client: run_after_gt = '2013-10-20T19:20:30+01:00' # datetime | (optional) run_after_lte = '2013-10-20T19:20:30+01:00' # datetime | (optional) run_after_lt = '2013-10-20T19:20:30+01:00' # datetime | (optional) - order_by = ["dag_id","task_id","run_id","map_index","key"] # List[str] | Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `key, dag_id, run_id, task_id, map_index, timestamp, run_after` (optional) (default to ["dag_id","task_id","run_id","map_index","key"]) + teams = ['teams_example'] # List[str] | (optional) + order_by = ["dag_id","task_id","run_id","region_id","region_index","key"] # List[str] | Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `key, dag_id, run_id, task_id, map_index, region_id, region_index, timestamp, run_after` (optional) (default to ["dag_id","task_id","run_id","region_id","region_index","key"]) try: # Get Xcom Entries - api_response = api_instance.get_xcom_entries(dag_id, dag_run_id, task_id, xcom_key=xcom_key, map_index=map_index, limit=limit, offset=offset, xcom_key_pattern=xcom_key_pattern, xcom_key_prefix_pattern=xcom_key_prefix_pattern, dag_display_name_pattern=dag_display_name_pattern, dag_display_name_prefix_pattern=dag_display_name_prefix_pattern, run_id_pattern=run_id_pattern, run_id_prefix_pattern=run_id_prefix_pattern, task_id_pattern=task_id_pattern, task_id_prefix_pattern=task_id_prefix_pattern, map_index_filter=map_index_filter, logical_date_gte=logical_date_gte, logical_date_gt=logical_date_gt, logical_date_lte=logical_date_lte, logical_date_lt=logical_date_lt, run_after_gte=run_after_gte, run_after_gt=run_after_gt, run_after_lte=run_after_lte, run_after_lt=run_after_lt, order_by=order_by) + api_response = api_instance.get_xcom_entries(dag_id, dag_run_id, task_id, xcom_key=xcom_key, map_index=map_index, region_id=region_id, region_index=region_index, exclude_internal_keys=exclude_internal_keys, limit=limit, offset=offset, xcom_key_pattern=xcom_key_pattern, xcom_key_prefix_pattern=xcom_key_prefix_pattern, dag_display_name_pattern=dag_display_name_pattern, dag_display_name_prefix_pattern=dag_display_name_prefix_pattern, run_id_pattern=run_id_pattern, run_id_prefix_pattern=run_id_prefix_pattern, task_id_pattern=task_id_pattern, task_id_prefix_pattern=task_id_prefix_pattern, map_index_filter=map_index_filter, logical_date_gte=logical_date_gte, logical_date_gt=logical_date_gt, logical_date_lte=logical_date_lte, logical_date_lt=logical_date_lt, run_after_gte=run_after_gte, run_after_gt=run_after_gt, run_after_lte=run_after_lte, run_after_lt=run_after_lt, teams=teams, order_by=order_by) print("The response of XComApi->get_xcom_entries:\n") pprint(api_response) except Exception as e: @@ -285,6 +294,9 @@ Name | Type | Description | Notes **task_id** | **str**| | **xcom_key** | **str**| | [optional] **map_index** | **int**| | [optional] + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] + **exclude_internal_keys** | **bool**| Leave out XComs whose keys Airflow reserves for itself, such as loop decision reasons. | [optional] [default to False] **limit** | **int**| | [optional] [default to 50] **offset** | **int**| | [optional] [default to 0] **xcom_key_pattern** | **str**| Case-insensitive substring match (SQL `ILIKE`). Slower than `xcom_key_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". | [optional] @@ -304,7 +316,8 @@ Name | Type | Description | Notes **run_after_gt** | **datetime**| | [optional] **run_after_lte** | **datetime**| | [optional] **run_after_lt** | **datetime**| | [optional] - **order_by** | [**List[str]**](str.md)| Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `key, dag_id, run_id, task_id, map_index, timestamp, run_after` | [optional] [default to ["dag_id","task_id","run_id","map_index","key"]] + **teams** | [**List[str]**](str.md)| | [optional] + **order_by** | [**List[str]**](str.md)| Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `key, dag_id, run_id, task_id, map_index, region_id, region_index, timestamp, run_after` | [optional] [default to ["dag_id","task_id","run_id","region_id","region_index","key"]] ### Return type @@ -333,7 +346,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_xcom_entry** -> ResponseGetXcomEntry get_xcom_entry(dag_id, task_id, dag_run_id, xcom_key, map_index=map_index, deserialize=deserialize, stringify=stringify) +> ResponseGetXcomEntry get_xcom_entry(dag_id, task_id, dag_run_id, xcom_key, map_index=map_index, region_id=region_id, region_index=region_index, deserialize=deserialize, stringify=stringify) Get Xcom Entry @@ -377,12 +390,14 @@ with airflow_client.client.ApiClient(configuration) as api_client: dag_run_id = 'dag_run_id_example' # str | xcom_key = 'xcom_key_example' # str | map_index = -1 # int | (optional) (default to -1) + region_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | (optional) + region_index = 56 # int | (optional) deserialize = False # bool | (optional) (default to False) stringify = False # bool | (optional) (default to False) try: # Get Xcom Entry - api_response = api_instance.get_xcom_entry(dag_id, task_id, dag_run_id, xcom_key, map_index=map_index, deserialize=deserialize, stringify=stringify) + api_response = api_instance.get_xcom_entry(dag_id, task_id, dag_run_id, xcom_key, map_index=map_index, region_id=region_id, region_index=region_index, deserialize=deserialize, stringify=stringify) print("The response of XComApi->get_xcom_entry:\n") pprint(api_response) except Exception as e: @@ -401,6 +416,8 @@ Name | Type | Description | Notes **dag_run_id** | **str**| | **xcom_key** | **str**| | **map_index** | **int**| | [optional] [default to -1] + **region_id** | **UUID**| | [optional] + **region_index** | **int**| | [optional] **deserialize** | **bool**| | [optional] [default to False] **stringify** | **bool**| | [optional] [default to False] @@ -426,6 +443,7 @@ Name | Type | Description | Notes **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -521,6 +539,7 @@ Name | Type | Description | Notes **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/XComCreateBody.md b/docs/XComCreateBody.md index c13c4156..68024faf 100644 --- a/docs/XComCreateBody.md +++ b/docs/XComCreateBody.md @@ -8,6 +8,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **key** | **str** | | **map_index** | **int** | | [optional] [default to -1] +**region_id** | **UUID** | | [optional] +**region_index** | **int** | | [optional] **value** | **object** | | ## Example diff --git a/docs/XComResponse.md b/docs/XComResponse.md index c1ba251c..0584aeb5 100644 --- a/docs/XComResponse.md +++ b/docs/XComResponse.md @@ -11,10 +11,13 @@ Name | Type | Description | Notes **key** | **str** | | **logical_date** | **datetime** | | [optional] **map_index** | **int** | | +**region_id** | **UUID** | | [optional] +**region_index** | **int** | | [optional] **run_after** | **datetime** | | **run_id** | **str** | | **task_display_name** | **str** | | **task_id** | **str** | | +**team_name** | **str** | | [optional] **timestamp** | **datetime** | | ## Example diff --git a/docs/XComResponseNative.md b/docs/XComResponseNative.md index 3d795f33..1d06bfb6 100644 --- a/docs/XComResponseNative.md +++ b/docs/XComResponseNative.md @@ -11,10 +11,13 @@ Name | Type | Description | Notes **key** | **str** | | **logical_date** | **datetime** | | [optional] **map_index** | **int** | | +**region_id** | **UUID** | | [optional] +**region_index** | **int** | | [optional] **run_after** | **datetime** | | **run_id** | **str** | | **task_display_name** | **str** | | **task_id** | **str** | | +**team_name** | **str** | | [optional] **timestamp** | **datetime** | | **value** | **object** | | diff --git a/docs/XComResponseString.md b/docs/XComResponseString.md index ea3d916b..791dc453 100644 --- a/docs/XComResponseString.md +++ b/docs/XComResponseString.md @@ -11,10 +11,13 @@ Name | Type | Description | Notes **key** | **str** | | **logical_date** | **datetime** | | [optional] **map_index** | **int** | | +**region_id** | **UUID** | | [optional] +**region_index** | **int** | | [optional] **run_after** | **datetime** | | **run_id** | **str** | | **task_display_name** | **str** | | **task_id** | **str** | | +**team_name** | **str** | | [optional] **timestamp** | **datetime** | | **value** | **str** | | [optional] diff --git a/docs/XComUpdateBody.md b/docs/XComUpdateBody.md index d7e89ef0..c2425877 100644 --- a/docs/XComUpdateBody.md +++ b/docs/XComUpdateBody.md @@ -7,6 +7,8 @@ Payload serializer for updating an XCom entry. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **map_index** | **int** | | [optional] [default to -1] +**region_id** | **UUID** | | [optional] +**region_index** | **int** | | [optional] **value** | **object** | | ## Example diff --git a/pyproject.toml b/pyproject.toml index 65740206..d14f487b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,13 +17,12 @@ [build-system] requires = [ - "hatchling==1.32.0", + "hatchling==1.33.0", "packaging==26.3", "pathspec==1.1.1", - "pluggy==1.6.0", - "tomli==2.4.1; python_version < '3.11'", - "tomlkit==0.15.1", - "trove-classifiers==2026.6.1.19", + "pluggy==1.7.0", + "tomlkit==0.15.2", + "trove-classifiers==2026.9.21.13", ] build-backend = "hatchling.build" @@ -34,7 +33,7 @@ description = "Apache Airflow API (Stable)" readme = "README.md" license = "Apache-2.0" license-files = ["LICENSE", "NOTICE"] -requires-python = ">=3.10,!=3.15" +requires-python = ">=3.11,!=3.15" authors = [ { name = "Apache Software Foundation", email = "dev@airflow.apache.org" }, ] @@ -50,7 +49,6 @@ classifiers = [ "Framework :: Apache Airflow", "Intended Audience :: Developers", "Intended Audience :: System Administrators", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", @@ -60,7 +58,7 @@ classifiers = [ dependencies = [ "pydantic >= 2.11.0", - "python-dateutil", + "python-dateutil>=2.7.0", "urllib3>=2.1.0,!=2.6.0", ] @@ -82,7 +80,7 @@ run-coverage = "pytest test" run = "run-coverage --no-cov" [[tool.hatch.envs.test.matrix]] -python = ["3.10", "3.11"] +python = ["3.11", "3.12"] [tool.hatch.version] path = "./version.txt" diff --git a/spec/v2.yaml b/spec/v2.yaml index 1f0a4340..51cf74c4 100644 --- a/spec/v2.yaml +++ b/spec/v2.yaml @@ -157,6 +157,10 @@ components: source_task_id: nullable: true type: string + source_task_instance_id: + format: uuid + nullable: true + type: string timestamp: format: date-time title: Timestamp @@ -172,6 +176,132 @@ components: - timestamp title: AssetEventResponse type: object + AssetExpressionAlias: + description: 'An asset alias leaf: ``{"alias": {"name": ..., "group": ...}}``.' + properties: + alias: + $ref: '#/components/schemas/AssetExpressionAliasInfo' + required: + - alias + title: AssetExpressionAlias + type: object + AssetExpressionAliasInfo: + description: Body of an ``alias`` leaf node. + properties: + group: + title: Group + type: string + name: + title: Name + type: string + required: + - name + - group + title: AssetExpressionAliasInfo + type: object + AssetExpressionAll: + description: 'An "and" node: ``{"all": [...]}`` -- satisfied when all children + are satisfied.' + properties: + all: + items: + oneOf: + - $ref: '#/components/schemas/AssetExpressionAsset' + - $ref: '#/components/schemas/AssetExpressionAlias' + - $ref: '#/components/schemas/AssetExpressionRef' + - $ref: '#/components/schemas/AssetExpressionAny' + - $ref: '#/components/schemas/AssetExpressionAll' + title: All + type: array + required: + - all + title: AssetExpressionAll + type: object + AssetExpressionAny: + description: 'An "or" node: ``{"any": [...]}`` -- satisfied when any child is + satisfied.' + properties: + any: + items: + oneOf: + - $ref: '#/components/schemas/AssetExpressionAsset' + - $ref: '#/components/schemas/AssetExpressionAlias' + - $ref: '#/components/schemas/AssetExpressionRef' + - $ref: '#/components/schemas/AssetExpressionAny' + - $ref: '#/components/schemas/AssetExpressionAll' + title: Any + type: array + required: + - any + title: AssetExpressionAny + type: object + AssetExpressionAsset: + description: 'An asset leaf: ``{"asset": {"uri": ..., "name": ..., "group": + ...}}``.' + properties: + asset: + $ref: '#/components/schemas/AssetExpressionAssetInfo' + required: + - asset + title: AssetExpressionAsset + type: object + AssetExpressionAssetInfo: + description: 'Body of an ``asset`` leaf node. + + + ``id`` is injected by ``DagModelOperation.update_dag_asset_expression`` when + the expression is + + persisted; ``BaseAsset.as_expression()`` itself only emits ``uri``/``name``/``group``. + It is left + + optional so a row persisted before id-enrichment (or migrated from the pre-3.0 + dataset format) + + degrades gracefully instead of failing response validation. + + + A leaf the caller is not authorized to read is served with ``hidden`` set + and ``uri``, ``name`` + + and ``id`` blanked (see ``airflow.api_fastapi.common.asset_expression``), + so the shape of the + + schedule stays visible without revealing which asset it waits on.' + properties: + group: + title: Group + type: string + hidden: + default: false + title: Hidden + type: boolean + id: + nullable: true + type: integer + name: + nullable: true + type: string + uri: + nullable: true + type: string + required: + - group + title: AssetExpressionAssetInfo + type: object + AssetExpressionRef: + description: 'An unresolved asset reference leaf: ``{"asset_ref": {"name": ...}}`` + or ``{"asset_ref": {"uri": ...}}``.' + properties: + asset_ref: + additionalProperties: + type: string + title: Asset Ref + type: object + required: + - asset_ref + title: AssetExpressionRef + type: object AssetResponse: description: Asset serializer for responses. properties: @@ -279,12 +409,26 @@ components: map_index: nullable: true type: integer + region_id: + format: uuid + title: Region Id + type: string + region_index: + title: Region Index + type: integer run_id: nullable: true type: string task_id: nullable: true type: string + task_instance_id: + format: uuid + nullable: true + type: string + try_number: + nullable: true + type: integer required: - kind title: AssetStateStoreLastUpdatedBy @@ -383,6 +527,63 @@ components: - total_entries title: BackfillCollectionResponse type: object + BackfillDagRunCollectionResponse: + description: BackfillDagRun Collection serializer for responses. + properties: + backfill_dag_runs: + items: + $ref: '#/components/schemas/BackfillDagRunResponse' + title: Backfill Dag Runs + type: array + total_entries: + title: Total Entries + type: integer + required: + - backfill_dag_runs + - total_entries + title: BackfillDagRunCollectionResponse + type: object + BackfillDagRunResponse: + description: Serializer for a single BackfillDagRun entry with joined DagRun + state. + properties: + backfill_id: + minimum: 0.0 + title: Backfill Id + type: integer + dag_id: + title: Dag Id + type: string + dag_run_id: + nullable: true + type: string + dag_run_state: + $ref: '#/components/schemas/DagRunState' + nullable: true + exception_reason: + nullable: true + type: string + id: + minimum: 0.0 + title: Id + type: integer + logical_date: + format: date-time + nullable: true + type: string + partition_key: + nullable: true + type: string + sort_ordinal: + title: Sort Ordinal + type: integer + required: + - id + - backfill_id + - dag_id + - sort_ordinal + title: BackfillDagRunResponse + type: object BackfillPostBody: additionalProperties: false description: Object used for create backfill request. @@ -394,12 +595,23 @@ components: additionalProperties: true nullable: true type: object + drain_dag: + default: false + description: 'Drain the Dag together with the backfill. Draining changes + the whole Dag: unfinished runs can start or resume except those held by + paused backfills. No scheduled runs are created, and the Dag pauses once + all unfinished runs finish. Paused backfills must be resumed for draining + to complete. Requires the same permission as pausing the Dag. Ignored + by the dry-run endpoint.' + title: Drain Dag + type: boolean from_date: format: date-time title: From Date type: string max_active_runs: default: 10 + minimum: 1.0 title: Max Active Runs type: integer reprocess_behavior: @@ -484,8 +696,8 @@ components: description: Base info serializer for responses. properties: status: + $ref: '#/components/schemas/HealthStatus' nullable: true - type: string required: [] title: BaseInfoResponse type: object @@ -534,6 +746,21 @@ components: type: array title: BulkActionResponse type: object + BulkBody_BulkDAGBody_: + additionalProperties: false + properties: + actions: + items: + oneOf: + - $ref: '#/components/schemas/BulkCreateAction_BulkDAGBody_' + - $ref: '#/components/schemas/BulkUpdateAction_BulkDAGBody_' + - $ref: '#/components/schemas/BulkDeleteAction_BulkDAGBody_' + title: Actions + type: array + required: + - actions + title: BulkBody[BulkDAGBody] + type: object BulkBody_BulkDAGRunBody_: additionalProperties: false properties: @@ -609,6 +836,28 @@ components: - actions title: BulkBody[VariableBody] type: object + BulkCreateAction_BulkDAGBody_: + additionalProperties: false + properties: + action: + const: create + description: The action to be performed on the entities. + title: Action + type: string + action_on_existence: + $ref: '#/components/schemas/BulkActionOnExistence' + default: fail + entities: + description: A list of entities to be created. + items: + $ref: '#/components/schemas/BulkDAGBody' + title: Entities + type: array + required: + - action + - entities + title: BulkCreateAction[BulkDAGBody] + type: object BulkCreateAction_BulkDAGRunBody_: additionalProperties: false properties: @@ -719,6 +968,23 @@ components: - entities title: BulkCreateAction[VariableBody] type: object + BulkDAGBody: + additionalProperties: false + description: Request body for bulk update of Dags. + properties: + dag_id: + title: Dag Id + type: string + is_paused: + nullable: true + type: boolean + scheduling_state: + $ref: '#/components/schemas/DagSchedulingState' + nullable: true + required: + - dag_id + title: BulkDAGBody + type: object BulkDAGRunBody: additionalProperties: false description: Request body for bulk operations on Dag Runs. @@ -783,6 +1049,30 @@ components: type: boolean title: BulkDAGRunClearBody type: object + BulkDeleteAction_BulkDAGBody_: + additionalProperties: false + properties: + action: + const: delete + description: The action to be performed on the entities. + title: Action + type: string + action_on_non_existence: + $ref: '#/components/schemas/BulkActionNotOnExistence' + default: fail + entities: + description: A list of entity id/key or entity objects to be deleted. + items: + anyOf: + - type: string + - $ref: '#/components/schemas/BulkDAGBody' + title: Entities + type: array + required: + - action + - entities + title: BulkDeleteAction[BulkDAGBody] + type: object BulkDeleteAction_BulkDAGRunBody_: additionalProperties: false properties: @@ -963,6 +1253,13 @@ components: maxLength: 1000 nullable: true type: string + region_id: + format: uuid + nullable: true + type: string + region_index: + nullable: true + type: integer task_id: title: Task Id type: string @@ -970,6 +1267,33 @@ components: - task_id title: BulkTaskInstanceBody type: object + BulkUpdateAction_BulkDAGBody_: + additionalProperties: false + properties: + action: + const: update + description: The action to be performed on the entities. + title: Action + type: string + action_on_non_existence: + $ref: '#/components/schemas/BulkActionNotOnExistence' + default: fail + entities: + description: A list of entities to be updated. + items: + $ref: '#/components/schemas/BulkDAGBody' + title: Entities + type: array + update_mask: + items: + type: string + nullable: true + type: array + required: + - action + - entities + title: BulkUpdateAction[BulkDAGBody] + type: object BulkUpdateAction_BulkDAGRunBody_: additionalProperties: false properties: @@ -1196,6 +1520,11 @@ components: default: false title: Include Future type: boolean + include_later_loop_iterations: + default: true + description: Clear later iterations when the selection includes a loop gate. + title: Include Later Loop Iterations + type: boolean include_past: default: false title: Include Past @@ -1204,6 +1533,13 @@ components: default: false title: Include Upstream type: boolean + keep_task_state: + default: false + description: Keep the task state store entries of the cleared task instances + so the next attempt resumes from them. By default they are discarded, + so the task starts over. + title: Keep Task State + type: boolean note: maxLength: 1000 nullable: true @@ -1231,6 +1567,9 @@ components: format: date-time nullable: true type: string + task_group_id: + nullable: true + type: string task_ids: items: anyOf: @@ -1243,6 +1582,21 @@ components: type: array nullable: true type: array + task_instance_ids: + items: + format: uuid + type: string + minItems: 1 + nullable: true + type: array + whole_expansion_ids: + description: Selected execution IDs whose entire mapped expansion should + be cleared. + items: + format: uuid + type: string + title: Whole Expansion Ids + type: array title: ClearTaskInstancesBody type: object Config: @@ -1539,9 +1893,13 @@ components: nullable: true type: array asset_expression: - additionalProperties: true nullable: true - type: object + oneOf: + - $ref: '#/components/schemas/AssetExpressionAsset' + - $ref: '#/components/schemas/AssetExpressionAlias' + - $ref: '#/components/schemas/AssetExpressionRef' + - $ref: '#/components/schemas/AssetExpressionAny' + - $ref: '#/components/schemas/AssetExpressionAll' bundle_name: nullable: true type: string @@ -1590,7 +1948,7 @@ components: title: File Token type: string fileloc: - title: Fileloc + nullable: true type: string has_import_errors: title: Has Import Errors @@ -1682,6 +2040,9 @@ components: rerun_with_latest_version: nullable: true type: boolean + scheduling_state: + $ref: '#/components/schemas/DagSchedulingState' + default: active start_date: format: date-time nullable: true @@ -1691,6 +2052,9 @@ components: $ref: '#/components/schemas/DagTagResponse' title: Tags type: array + team_name: + nullable: true + type: string template_search_path: items: type: string @@ -1716,7 +2080,6 @@ components: - dag_display_name - is_paused - is_stale - - fileloc - timetable_partitioned - timetable_periodic - tags @@ -1737,10 +2100,11 @@ components: description: Dag Serializer for updatable bodies. properties: is_paused: - title: Is Paused + nullable: true type: boolean - required: - - is_paused + scheduling_state: + $ref: '#/components/schemas/DagSchedulingState' + nullable: true title: DAGPatchBody type: object DAGResponse: @@ -1772,7 +2136,7 @@ components: title: File Token type: string fileloc: - title: Fileloc + nullable: true type: string has_import_errors: title: Has Import Errors @@ -1835,6 +2199,9 @@ components: relative_fileloc: nullable: true type: string + scheduling_state: + $ref: '#/components/schemas/DagSchedulingState' + default: active tags: items: $ref: '#/components/schemas/DagTagResponse' @@ -1857,7 +2224,6 @@ components: - dag_display_name - is_paused - is_stale - - fileloc - timetable_partitioned - timetable_periodic - tags @@ -2021,6 +2387,9 @@ components: type: string state: $ref: '#/components/schemas/DagRunState' + team_name: + nullable: true + type: string triggered_by: $ref: '#/components/schemas/DagRunTriggeredByType' nullable: true @@ -2159,6 +2528,9 @@ components: dag_id: title: Dag Id type: string + language: + nullable: true + type: string version_number: nullable: true type: integer @@ -2232,7 +2604,12 @@ components: title: Timestamp type: string warning_type: - $ref: '#/components/schemas/DagWarningType' + anyOf: + - $ref: '#/components/schemas/DagWarningType' + - maxLength: 50 + pattern: ^[a-z][a-z0-9_]*:[a-z0-9_.\-]+$ + type: string + title: Warning Type required: - dag_id - warning_type @@ -2241,18 +2618,164 @@ components: - dag_display_name title: DAGWarningResponse type: object - DagProcessorInfoResponse: - description: DagProcessor info serializer for responses. + DagBundleCollectionResponse: + description: Dag bundle collection response. properties: - latest_dag_processor_heartbeat: + dag_bundles: + items: + $ref: '#/components/schemas/DagBundleResponse' + title: Dag Bundles + type: array + total_entries: + title: Total Entries + type: integer + required: + - dag_bundles + - total_entries + title: DagBundleCollectionResponse + type: object + DagBundleDetailResponse: + description: Dag bundle serializer for the single-bundle response. + properties: + active: + nullable: true + type: boolean + bundle_url: nullable: true type: string - status: + dag_count: + description: Number of live Dags recorded against the bundle that the caller + is permitted to see, counted on the same terms as ``GET /dags``. + title: Dag Count + type: integer + import_error_count: + nullable: true + type: integer + last_refreshed: + format: date-time + nullable: true + type: string + name: + title: Name + type: string + team_name: + nullable: true + type: string + version: + nullable: true + type: string + required: + - name + - dag_count + title: DagBundleDetailResponse + type: object + DagBundleFileCollectionResponse: + description: Dag bundle file collection response. + properties: + dag_bundle_files: + items: + $ref: '#/components/schemas/DagBundleFileResponse' + title: Dag Bundle Files + type: array + total_entries: + title: Total Entries + type: integer + required: + - dag_bundle_files + - total_entries + title: DagBundleFileCollectionResponse + type: object + DagBundleFileResponse: + description: A file in a Dag bundle, as the Dag processor last saw it. + properties: + dag_count: + description: Number of live Dags the file defines that the caller may read. + title: Dag Count + type: integer + import_error_count: + nullable: true + type: integer + last_parse_duration: + nullable: true + type: number + last_parsed_time: + format: date-time + nullable: true + type: string + relative_fileloc: + title: Relative Fileloc + type: string + required: + - relative_fileloc + - dag_count + title: DagBundleFileResponse + type: object + DagBundleResponse: + description: Dag bundle serializer for responses. + properties: + active: + nullable: true + type: boolean + bundle_url: + nullable: true + type: string + import_error_count: + nullable: true + type: integer + last_refreshed: + format: date-time + nullable: true + type: string + name: + title: Name + type: string + team_name: + nullable: true + type: string + version: + nullable: true + type: string + required: + - name + title: DagBundleResponse + type: object + DagProcessorInfoResponse: + description: DagProcessor info serializer for responses. + properties: + detailed_status: + $ref: '#/components/schemas/DetailedHealthStatus' + nullable: true + instances: + items: + $ref: '#/components/schemas/DagProcessorInstanceInfoResponse' + nullable: true + type: array + latest_dag_processor_heartbeat: nullable: true type: string + status: + $ref: '#/components/schemas/HealthStatus' + nullable: true required: [] title: DagProcessorInfoResponse type: object + DagProcessorInstanceInfoResponse: + description: Dag processor instance info serializer for responses. + properties: + bundle_names: + items: + type: string + nullable: true + type: array + hostname: + nullable: true + type: string + latest_dag_processor_heartbeat: + nullable: true + type: string + required: [] + title: DagProcessorInstanceInfoResponse + type: object DagRunAssetReference: additionalProperties: false description: DagRun serializer for asset responses. @@ -2284,7 +2807,7 @@ components: type: string start_date: format: date-time - title: Start Date + nullable: true type: string state: title: State @@ -2298,7 +2821,6 @@ components: required: - run_id - dag_id - - start_date - state - triggering title: DagRunAssetReference @@ -2362,6 +2884,9 @@ components: dag_id: title: Dag Id type: string + team_name: + nullable: true + type: string updated_at: format: date-time title: Updated At @@ -2372,6 +2897,14 @@ components: - updated_at title: DagScheduleAssetReference type: object + DagSchedulingState: + description: States controlling whether a Dag can create and schedule work. + enum: + - active + - draining + - paused + title: DagSchedulingState + type: string DagStatsCollectionResponse: description: Dag Stats Collection serializer for responses. properties: @@ -2439,6 +2972,166 @@ components: - dag_display_name title: DagTagResponse type: object + DagVersionDiffCategory: + description: What part of a Dag a difference belongs to. Mirrors ``DiffCategory``. + enum: + - asset + - authorization + - callback + - deadline + - dependency + - metadata + - param + - provenance + - schedule + - task + - unknown + title: DagVersionDiffCategory + type: string + DagVersionDiffChangeResponse: + description: One structural difference between two stored Dag versions. + properties: + after_digest: + nullable: true + type: string + after_value: + description: "The value this path holds in the target version. Present only\ + \ when values are disclosed, and omitted entirely when the change has\ + \ no after side \u2014 which is how an absent side is told apart from\ + \ a stored null." + title: After Value + before_digest: + nullable: true + type: string + before_value: + description: "The value this path held in the base version. Present only\ + \ when values are disclosed, and omitted entirely when the change has\ + \ no before side \u2014 which is how an absent side is told apart from\ + \ a stored null." + title: Before Value + category: + $ref: '#/components/schemas/DagVersionDiffCategory' + impact: + $ref: '#/components/schemas/DagVersionDiffImpact' + occurrence_count: + description: How many underlying changes this record stands for. Always + 1 when values are disclosed, since each change is then its own record; + a redacted record merges every change sharing its path and operation. + title: Occurrence Count + type: integer + operation: + $ref: '#/components/schemas/DagVersionDiffOperation' + path: + title: Path + type: string + required: + - path + - operation + - category + - impact + - occurrence_count + title: DagVersionDiffChangeResponse + type: object + DagVersionDiffImpact: + description: What a difference affects. Mirrors ``DiffImpact``. + enum: + - authorization + - execution + - metadata + - provenance + - unknown + title: DagVersionDiffImpact + type: string + DagVersionDiffMode: + description: Whether a comparison could be made at all. + enum: + - observed_state + - unavailable + title: DagVersionDiffMode + type: string + DagVersionDiffOperation: + description: How a difference presents at its path. + enum: + - added + - removed + - changed + title: DagVersionDiffOperation + type: string + DagVersionDiffResponse: + description: Observed-state difference between two stored Dag versions. + properties: + base_version_number: + title: Base Version Number + type: integer + changes: + items: + $ref: '#/components/schemas/DagVersionDiffChangeResponse' + title: Changes + type: array + diff_schema_version: + description: Wire format of this payload. Incremented when its shape changes. + title: Diff Schema Version + type: integer + mode: + $ref: '#/components/schemas/DagVersionDiffMode' + serializer_versions: + $ref: '#/components/schemas/DagVersionDiffSerializerVersions' + target_version_number: + title: Target Version Number + type: integer + total_changes: + description: Underlying changes across every disclosed path, not the number + of records. Exact when `truncated` is false; a lower bound when it is + true, because the changes at dropped paths are not counted. + title: Total Changes + type: integer + truncated: + description: Whether a change at a path not already in `changes` was dropped + to stay within `max_changes`. Paths that are absent are absent, not unchanged. + title: Truncated + type: boolean + unavailable_reason: + nullable: true + type: string + values_status: + $ref: '#/components/schemas/DagVersionDiffValuesStatus' + required: + - diff_schema_version + - base_version_number + - target_version_number + - serializer_versions + - mode + - values_status + - truncated + - total_changes + - changes + title: DagVersionDiffResponse + type: object + DagVersionDiffSerializerVersions: + description: 'Which Dag serializer format each compared version was stored under. + + + Unrelated to ``diff_schema_version``, which versions this payload rather than + the + + serialized Dags it describes.' + properties: + base: + nullable: true + type: integer + target: + nullable: true + type: integer + required: [] + title: DagVersionDiffSerializerVersions + type: object + DagVersionDiffValuesStatus: + description: Whether values were disclosed. Mirrors ``ValuesStatus``. + enum: + - available + - unavailable + title: DagVersionDiffValuesStatus + type: string DagVersionResponse: description: Dag Version serializer for responses. properties: @@ -2485,10 +3178,20 @@ components: in the DagWarning model.' enum: - asset conflict + - duplicate dag id - non-existent pool - runtime varying value + - task group cycle title: DagWarningType type: string + DetailedHealthStatus: + description: How much of a component's work has a live instance covering it. + enum: + - healthy + - degraded + - down + title: DetailedHealthStatus + type: string DryRunBackfillCollectionResponse: description: Backfill collection serializer for responses in dry-run mode. properties: @@ -2566,6 +3269,9 @@ components: owner: nullable: true type: string + owner_display_name: + nullable: true + type: string run_id: nullable: true type: string @@ -2575,6 +3281,13 @@ components: task_id: nullable: true type: string + task_instance_id: + format: uuid + nullable: true + type: string + team_name: + nullable: true + type: string try_number: nullable: true type: integer @@ -2602,6 +3315,9 @@ components: additionalProperties: true description: Serializer for External View Plugin responses. properties: + applies_to: + $ref: '#/components/schemas/PluginAppliesToResponse' + nullable: true category: nullable: true type: string @@ -2613,6 +3329,7 @@ components: - dag_run - task - task_instance + - asset - base title: Destination type: string @@ -2917,6 +3634,14 @@ components: - triggerer title: HealthInfoResponse type: object + HealthStatus: + description: 'Aggregate health of a component: whether it has at least one live + instance.' + enum: + - healthy + - unhealthy + title: HealthStatus + type: string ImportErrorCollectionResponse: description: Import Error Collection Response. properties: @@ -2939,12 +3664,21 @@ components: bundle_name: nullable: true type: string + file_token: + description: Return a signed token identifying the file, used to request + its reparse. + readOnly: true + title: File Token + type: string filename: title: Filename type: string import_error_id: title: Import Error Id type: integer + source_reference: + nullable: true + type: string stack_trace: title: Stack Trace type: string @@ -2957,6 +3691,7 @@ components: - timestamp - filename - stack_trace + - file_token title: ImportErrorResponse type: object JobCollectionResponse: @@ -2978,6 +3713,11 @@ components: JobResponse: description: Job serializer for responses. properties: + bundle_names: + items: + type: string + nullable: true + type: array dag_display_name: nullable: true type: string @@ -3011,6 +3751,11 @@ components: state: nullable: true type: string + team_names: + items: + type: string + title: Team Names + type: array unixname: nullable: true type: string @@ -3032,10 +3777,29 @@ components: type: string title: LastAssetEventResponse type: object + LoopIterationResponse: + description: A task execution's position in an enclosing loop. + properties: + iteration: + description: Position in the enclosing loop, counting from one. + minimum: 1.0 + title: Iteration + type: integer + loop_id: + title: Loop Id + type: string + required: + - loop_id + - iteration + title: LoopIterationResponse + type: object MaterializeAssetBody: additionalProperties: false description: Materialize asset request. properties: + bundle_version: + nullable: true + type: string conf: additionalProperties: true nullable: true @@ -3051,6 +3815,15 @@ components: format: date-time nullable: true type: string + drain_dag: + default: false + description: 'Drain the Dag together with this run. Draining changes the + whole Dag: unfinished runs can start or resume except those held by paused + backfills. No scheduled runs are created, and the Dag pauses once all + unfinished runs finish. Paused backfills must be resumed for draining + to complete. Requires the same permission as pausing the Dag.' + title: Drain Dag + type: boolean logical_date: format: date-time nullable: true @@ -3109,8 +3882,41 @@ components: maxLength: 1000 nullable: true type: string + region_id: + format: uuid + nullable: true + type: string + region_index: + nullable: true + type: integer title: PatchTaskInstanceBody type: object + PluginAppliesToResponse: + additionalProperties: + items: + type: string + type: array + description: 'Serializer for the optional scoping criteria of a UI plugin. + + + An open map of dotted field path to the values that path may take -- not a + closed set of + + criteria. ``{"state": ["failed"], "dag.tags.name": ["ml"]}`` scopes to failed + entities of + + ml-tagged Dags. An unqualified path is rooted at the entity the ``destination`` + is about; + + a path may instead name a related record (``dag``, ``dag_run``, ``task``, + ``task_instance``) + + as its first segment. Matching is equality against the listed values, OR within + a path and + + AND across paths, and is evaluated client-side.' + title: PluginAppliesToResponse + type: object PluginCollectionResponse: description: Plugin Collection serializer. properties: @@ -3157,6 +3963,81 @@ components: - error title: PluginImportErrorResponse type: object + PluginLinkActionResponse: + additionalProperties: true + description: Serializer for a UI action that opens a URL. + properties: + action_type: + const: link + title: Action Type + type: string + applies_to: + $ref: '#/components/schemas/PluginAppliesToResponse' + nullable: true + destination: + enum: + - dag + - dag_run + - task_instance + title: Destination + type: string + href: + title: Href + type: string + icon: + nullable: true + type: string + icon_dark_mode: + nullable: true + type: string + name: + title: Name + type: string + required: + - name + - destination + - action_type + - href + title: PluginLinkActionResponse + type: object + PluginReactActionResponse: + additionalProperties: true + description: Serializer for a UI action that mounts a React component behind + a button. + properties: + action_type: + const: react + title: Action Type + type: string + applies_to: + $ref: '#/components/schemas/PluginAppliesToResponse' + nullable: true + bundle_url: + title: Bundle Url + type: string + destination: + enum: + - dag + - dag_run + - task_instance + title: Destination + type: string + icon: + nullable: true + type: string + icon_dark_mode: + nullable: true + type: string + name: + title: Name + type: string + required: + - name + - destination + - action_type + - bundle_url + title: PluginReactActionResponse + type: object PluginResponse: description: Plugin serializer. properties: @@ -3224,11 +4105,28 @@ components: source: title: Source type: string + team_name: + nullable: true + type: string timetables: items: type: string title: Timetables type: array + ui_actions: + description: User-defined actions rendered on Dag, Dag Run, and Task Instance + table rows and header cards. + items: + discriminator: + mapping: + link: '#/components/schemas/PluginLinkActionResponse' + react: '#/components/schemas/PluginReactActionResponse' + propertyName: action_type + oneOf: + - $ref: '#/components/schemas/PluginLinkActionResponse' + - $ref: '#/components/schemas/PluginReactActionResponse' + title: Ui Actions + type: array required: - name - macros @@ -3259,6 +4157,7 @@ components: type: boolean name: maxLength: 256 + pattern: \S title: Name type: string slots: @@ -3445,6 +4344,9 @@ components: additionalProperties: true description: Serializer for React App Plugin responses. properties: + applies_to: + $ref: '#/components/schemas/PluginAppliesToResponse' + nullable: true bundle_url: title: Bundle Url type: string @@ -3459,8 +4361,11 @@ components: - dag_run - task - task_instance + - asset - base - dashboard + - dag_overview + - task_overview title: Destination type: string icon: @@ -3497,15 +4402,35 @@ components: SchedulerInfoResponse: description: Scheduler info serializer for responses. properties: - latest_scheduler_heartbeat: + detailed_status: + $ref: '#/components/schemas/DetailedHealthStatus' nullable: true - type: string - status: + instances: + items: + $ref: '#/components/schemas/SchedulerInstanceInfoResponse' + nullable: true + type: array + latest_scheduler_heartbeat: nullable: true type: string + status: + $ref: '#/components/schemas/HealthStatus' + nullable: true required: [] title: SchedulerInfoResponse type: object + SchedulerInstanceInfoResponse: + description: Scheduler instance info serializer for responses. + properties: + hostname: + nullable: true + type: string + latest_scheduler_heartbeat: + nullable: true + type: string + required: [] + title: SchedulerInstanceInfoResponse + type: object StructuredLogMessage: additionalProperties: true description: An individual log message. @@ -3673,12 +4598,22 @@ components: hostname: nullable: true type: string + id: + format: uuid + title: Id + type: string + loop_iteration: + $ref: '#/components/schemas/LoopIterationResponse' + nullable: true map_index: title: Map Index type: integer max_tries: title: Max Tries type: integer + note: + nullable: true + type: string operator: nullable: true type: string @@ -3704,6 +4639,17 @@ components: format: date-time nullable: true type: string + region_id: + format: uuid + title: Region Id + type: string + region_index: + title: Region Index + type: integer + retry_at: + format: date-time + nullable: true + type: string scheduled_when: format: date-time nullable: true @@ -3715,6 +4661,9 @@ components: state: $ref: '#/components/schemas/TaskInstanceState' nullable: true + state_reason: + nullable: true + type: string task_display_name: title: Task Display Name type: string @@ -3728,6 +4677,7 @@ components: nullable: true type: string required: + - id - task_id - dag_id - dag_run_id @@ -3776,10 +4726,16 @@ components: format: uuid title: Id type: string + in_loop: + title: In Loop + type: boolean logical_date: format: date-time nullable: true type: string + loop_iteration: + $ref: '#/components/schemas/LoopIterationResponse' + nullable: true map_index: title: Map Index type: integer @@ -3814,6 +4770,13 @@ components: format: date-time nullable: true type: string + region_id: + format: uuid + title: Region Id + type: string + region_index: + title: Region Index + type: integer rendered_fields: additionalProperties: true title: Rendered Fields @@ -3821,6 +4784,10 @@ components: rendered_map_index: nullable: true type: string + retry_at: + format: date-time + nullable: true + type: string run_after: format: date-time title: Run After @@ -3836,12 +4803,18 @@ components: state: $ref: '#/components/schemas/TaskInstanceState' nullable: true + state_reason: + nullable: true + type: string task_display_name: title: Task Display Name type: string task_id: title: Task Id type: string + team_name: + nullable: true + type: string trigger: $ref: '#/components/schemas/TriggerResponse' nullable: true @@ -3860,6 +4833,7 @@ components: - dag_id - dag_run_id - map_index + - in_loop - run_after - try_number - max_tries @@ -4056,6 +5030,9 @@ components: task_id: title: Task Id type: string + team_name: + nullable: true + type: string updated_at: format: date-time title: Updated At @@ -4274,6 +5251,9 @@ components: additionalProperties: false description: Trigger Dag Run Serializer for POST body. properties: + bundle_version: + nullable: true + type: string conf: additionalProperties: true nullable: true @@ -4289,6 +5269,15 @@ components: format: date-time nullable: true type: string + drain_dag: + default: false + description: 'Drain the Dag together with this run. Draining changes the + whole Dag: unfinished runs can start or resume except those held by paused + backfills. No scheduled runs are created, and the Dag pauses once all + unfinished runs finish. Paused backfills must be resumed for draining + to complete. Requires the same permission as pausing the Dag.' + title: Drain Dag + type: boolean logical_date: format: date-time nullable: true @@ -4339,15 +5328,41 @@ components: TriggererInfoResponse: description: Triggerer info serializer for responses. properties: + detailed_status: + $ref: '#/components/schemas/DetailedHealthStatus' + nullable: true + instances: + items: + $ref: '#/components/schemas/TriggererInstanceInfoResponse' + nullable: true + type: array latest_triggerer_heartbeat: nullable: true type: string status: + $ref: '#/components/schemas/HealthStatus' nullable: true - type: string required: [] title: TriggererInfoResponse type: object + TriggererInstanceInfoResponse: + description: Triggerer instance info serializer for responses. + properties: + hostname: + nullable: true + type: string + latest_triggerer_heartbeat: + nullable: true + type: string + team_names: + items: + type: string + title: Team Names + type: array + required: + - team_names + title: TriggererInstanceInfoResponse + type: object UpdateHITLDetailPayload: description: Schema for updating the content of a Human-in-the-loop detail. properties: @@ -4361,6 +5376,10 @@ components: additionalProperties: true title: Params Input type: object + request_created_at: + format: date-time + nullable: true + type: string required: - chosen_options title: UpdateHITLDetailPayload @@ -4400,6 +5419,7 @@ components: type: string key: maxLength: 250 + pattern: \S title: Key type: string team_name: @@ -4492,6 +5512,14 @@ components: default: -1 title: Map Index type: integer + region_id: + format: uuid + nullable: true + type: string + region_index: + minimum: -1.0 + nullable: true + type: integer value: title: Value required: @@ -4518,6 +5546,13 @@ components: map_index: title: Map Index type: integer + region_id: + format: uuid + title: Region Id + type: string + region_index: + title: Region Index + type: integer run_after: format: date-time title: Run After @@ -4531,6 +5566,9 @@ components: task_id: title: Task Id type: string + team_name: + nullable: true + type: string timestamp: format: date-time title: Timestamp @@ -4566,6 +5604,13 @@ components: map_index: title: Map Index type: integer + region_id: + format: uuid + title: Region Id + type: string + region_index: + title: Region Index + type: integer run_after: format: date-time title: Run After @@ -4579,6 +5624,9 @@ components: task_id: title: Task Id type: string + team_name: + nullable: true + type: string timestamp: format: date-time title: Timestamp @@ -4617,6 +5665,13 @@ components: map_index: title: Map Index type: integer + region_id: + format: uuid + title: Region Id + type: string + region_index: + title: Region Index + type: integer run_after: format: date-time title: Run After @@ -4630,6 +5685,9 @@ components: task_id: title: Task Id type: string + team_name: + nullable: true + type: string timestamp: format: date-time title: Timestamp @@ -4657,6 +5715,14 @@ components: default: -1 title: Map Index type: integer + region_id: + format: uuid + nullable: true + type: string + region_index: + minimum: -1.0 + nullable: true + type: integer value: title: Value required: @@ -4740,6 +5806,20 @@ paths: schema: nullable: true type: string + - description: Exact-match filter on the full asset URI. Compiles to an indexed + equality comparison (``uri = ...``). Repeat the parameter (``?uri=a&uri=b``) + to match multiple assets. + in: query + name: uri + required: false + schema: + description: Exact-match filter on the full asset URI. Compiles to an indexed + equality comparison (``uri = ...``). Repeat the parameter (``?uri=a&uri=b``) + to match multiple assets. + items: + type: string + title: Uri + type: array - description: "Case-insensitive substring match (SQL `ILIKE`). Slower than\ \ `uri_prefix_pattern` on large tables \u2014 see \"Filtering with pattern\ \ parameters\"." @@ -5016,6 +6096,13 @@ paths: schema: nullable: true type: string + - in: query + name: source_task_instance_id + required: false + schema: + format: uuid + nullable: true + type: string - in: query name: source_run_id required: false @@ -5028,6 +6115,20 @@ paths: schema: nullable: true type: integer + - in: query + name: partition_key + required: false + schema: + nullable: true + type: string + - description: Filter results by matching this regular expression against the + field value. + in: query + name: partition_key_regexp_pattern + required: false + schema: + nullable: true + type: string - description: "Case-insensitive substring match (SQL `ILIKE`). Slower than\ \ `name_prefix_pattern` on large tables \u2014 see \"Filtering with pattern\ \ parameters\"." @@ -5045,6 +6146,18 @@ paths: schema: nullable: true type: string + - description: 'Filter by JSON key-value pairs. Repeat for multiple conditions + (AND logic). Format: key=value (e.g. extra=region=us&extra=env=prod).' + in: query + name: extra + required: false + schema: + description: 'Filter by JSON key-value pairs. Repeat for multiple conditions + (AND logic). Format: key=value (e.g. extra=region=us&extra=env=prod).' + items: + type: string + title: Extra + type: array - in: query name: timestamp_gte required: false @@ -5220,7 +6333,7 @@ paths: application/json: schema: $ref: '#/components/schemas/MaterializeAssetBody' - nullable: true + required: true responses: '200': content: @@ -5993,6 +7106,85 @@ paths: summary: Cancel Backfill tags: - Backfill + /api/v2/backfills/{backfill_id}/dag_runs: + get: + description: List Dag runs associated with a backfill, including skipped slots. + operationId: list_backfill_dag_runs + parameters: + - in: path + name: backfill_id + required: true + schema: + minimum: 0 + title: Backfill Id + type: integer + - in: query + name: limit + required: false + schema: + default: 50 + minimum: 0 + title: Limit + type: integer + - in: query + name: offset + required: false + schema: + default: 0 + minimum: 0 + title: Offset + type: integer + - description: 'Attributes to order by, multi criteria sort is supported. Prefix + with `-` for descending order. Supported attributes: `id, sort_ordinal`' + in: query + name: order_by + required: false + schema: + default: + - sort_ordinal + description: 'Attributes to order by, multi criteria sort is supported. + Prefix with `-` for descending order. Supported attributes: `id, sort_ordinal`' + items: + type: string + title: Order By + type: array + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BackfillDagRunCollectionResponse' + description: Successful Response + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Unauthorized + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Not Found + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - HTTPBearer: [] + summary: List Backfill Dag Runs + tags: + - Backfill /api/v2/backfills/{backfill_id}/pause: put: operationId: pause_backfill @@ -6586,6 +7778,12 @@ paths: schema: $ref: '#/components/schemas/ConnectionTestResponse' description: Successful Response + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -6768,36 +7966,272 @@ paths: summary: Patch Connection tags: - Connection - /api/v2/dagSources/{dag_id}: + /api/v2/dagBundles: get: - description: Get source code using file token. - operationId: get_dag_source + description: 'List the Dag bundles Airflow knows about. + + + Reports the version of each bundle Airflow currently holds and when a Dag + processor last + + refreshed it, so whoever deployed the code can tell whether it has been picked + up yet. + + + A bundle is visible to a user who can read at least one Dag recorded against + it. A bundle + + holding no registered Dag at all has nothing to authorize against, so it is + listed only for a + + user holding the admin-by-default ``AccessView.IMPORT_ERRORS_ALL`` for that + bundle''s team -- + + the same view, scoped the same way, that governs import errors for a file + that never + + registered a Dag.' + operationId: get_dag_bundles parameters: - - in: path - name: dag_id - required: true + - in: query + name: limit + required: false schema: - title: Dag Id - type: string + default: 50 + minimum: 0 + title: Limit + type: integer - in: query - name: version_number + name: offset required: false schema: - nullable: true + default: 0 + minimum: 0 + title: Offset type: integer - - in: header - name: accept + - description: 'Attributes to order by, multi criteria sort is supported. Prefix + with `-` for descending order. Supported attributes: `name, version, last_refreshed, + active`' + in: query + name: order_by required: false schema: - default: '*/*' - enum: - - application/json - - text/plain - - '*/*' - title: Accept - type: string - responses: - '200': + default: + - name + description: 'Attributes to order by, multi criteria sort is supported. + Prefix with `-` for descending order. Supported attributes: `name, version, + last_refreshed, active`' + items: + type: string + title: Order By + type: array + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DagBundleCollectionResponse' + description: Successful Response + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Unauthorized + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Forbidden + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - HTTPBearer: [] + summary: Get Dag Bundles + tags: + - Dag Bundle + /api/v2/dagBundles/{bundle_name}: + get: + description: Get a Dag bundle. + operationId: get_dag_bundle + parameters: + - in: path + name: bundle_name + required: true + schema: + title: Bundle Name + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DagBundleDetailResponse' + description: Successful Response + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Unauthorized + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Not Found + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - HTTPBearer: [] + summary: Get Dag Bundle + tags: + - Dag Bundle + /api/v2/dagBundles/{bundle_name}/files: + get: + description: 'List the files in a Dag bundle, ordered by path. + + + A file is listed when the caller can read at least one Dag it defines. A file + that recorded an + + import error without registering any Dag is listed too, on the same admin-by-default + terms as + + ``GET /importErrors`` -- a file that fails before defining a Dag has no Dag + to authorize on, + + and it is the case this page most needs to show. + + + ``dag_count`` counts live Dags only. Dag rows are never deleted: a file that + fails to import + + has every Dag in it marked stale, and so does a file dropped from the bundle. + A file therefore + + stays listed on the strength of a live Dag *or* an import error, so a file + that has just broken + + does not vanish from the page someone opened to find out why, while a file + deleted long ago + + drops out instead of lingering forever. + + + Parse times come from the Dags in the file rather than the file itself, which + is the only + + record Airflow keeps: a file whose every Dag was removed keeps no parse time + of its own.' + operationId: get_dag_bundle_files + parameters: + - in: path + name: bundle_name + required: true + schema: + title: Bundle Name + type: string + - in: query + name: limit + required: false + schema: + default: 50 + minimum: 0 + title: Limit + type: integer + - in: query + name: offset + required: false + schema: + default: 0 + minimum: 0 + title: Offset + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DagBundleFileCollectionResponse' + description: Successful Response + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Unauthorized + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Not Found + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - HTTPBearer: [] + summary: Get Dag Bundle Files + tags: + - Dag Bundle + /api/v2/dagSources/{dag_id}: + get: + description: Get source code using file token. + operationId: get_dag_source + parameters: + - in: path + name: dag_id + required: true + schema: + title: Dag Id + type: string + - in: query + name: version_number + required: false + schema: + nullable: true + type: integer + - in: header + name: accept + required: false + schema: + default: '*/*' + enum: + - application/json + - text/plain + - '*/*' + title: Accept + type: string + responses: + '200': content: application/json: schema: @@ -7003,8 +8437,13 @@ paths: name: warning_type required: false schema: - $ref: '#/components/schemas/DagWarningType' - nullable: true + anyOf: + - $ref: '#/components/schemas/DagWarningType' + - maxLength: 50 + pattern: ^[a-z][a-z0-9_]*:[a-z0-9_.\-]+$ + type: string + - type: 'null' + title: Warning Type - in: query name: limit required: false @@ -7073,6 +8512,13 @@ paths: description: Get all Dags. operationId: get_dags parameters: + - description: Filter Dags by whether their timetable can create scheduled runs. + in: query + name: is_scheduled + required: false + schema: + nullable: true + type: boolean - in: query name: limit required: false @@ -7267,7 +8713,7 @@ paths: type: array - description: 'Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `dag_id, dag_display_name, - next_dagrun, state, start_date, last_run_state, last_run_start_date`' + next_dagrun, last_run_state, last_run_start_date`' in: query name: order_by required: false @@ -7276,7 +8722,7 @@ paths: - dag_id description: 'Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `dag_id, dag_display_name, - next_dagrun, state, start_date, last_run_state, last_run_start_date`' + next_dagrun, last_run_state, last_run_start_date`' items: type: string title: Order By @@ -7467,6 +8913,47 @@ paths: summary: Patch Dags tags: - DAG + /api/v2/dags/bulk: + patch: + description: Bulk pause, resume, or drain Dags by id. + operationId: bulk_dags + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BulkBody_BulkDAGBody_' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BulkResponse' + description: Successful Response + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Unauthorized + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Forbidden + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - HTTPBearer: [] + summary: Bulk Dags + tags: + - DAG /api/v2/dags/{dag_id}: delete: description: Delete the specific Dag. @@ -8339,6 +9826,31 @@ paths: schema: nullable: true type: string + - in: query + name: teams + required: false + schema: + items: + type: string + title: Teams + type: array + - in: query + name: tags + required: false + schema: + items: + type: string + title: Tags + type: array + - in: query + name: tags_match_mode + required: false + schema: + enum: + - any + - all + nullable: true + type: string - description: 'Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, state, dag_id, run_id, logical_date, partition_date, run_after, start_date, end_date, updated_at, @@ -8910,15 +10422,29 @@ paths: title: Dag Run Id type: string - in: query - name: limit + name: region_id required: false schema: - default: 50 - minimum: 0 - title: Limit - type: integer + format: uuid + nullable: true + type: string - in: query - name: offset + name: region_index + required: false + schema: + minimum: -1 + nullable: true + type: integer + - in: query + name: limit + required: false + schema: + default: 50 + minimum: 0 + title: Limit + type: integer + - in: query + name: offset required: false schema: default: 0 @@ -8999,6 +10525,14 @@ paths: type: string title: State type: array + - in: query + name: teams + required: false + schema: + items: + type: string + title: Teams + type: array - in: query name: response_received required: false @@ -9074,6 +10608,12 @@ paths: schema: $ref: '#/components/schemas/HITLDetailCollection' description: Successful Response + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -9129,6 +10669,19 @@ paths: type: string nullable: true type: array + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + nullable: true + type: integer requestBody: content: application/json: @@ -9207,6 +10760,19 @@ paths: schema: title: Group Id type: string + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + nullable: true + type: integer requestBody: content: application/json: @@ -9244,6 +10810,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -9299,6 +10871,36 @@ paths: schema: title: Dag Run Id type: string + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + minimum: -1 + nullable: true + type: integer + - description: Task group id of a loop; matches every instance it produced. + in: query + name: loop_id + required: false + schema: + nullable: true + type: string + - description: Narrow ``loop_id`` to a single pass of that loop. Iterations + count from one. + in: query + name: iteration + required: false + schema: + minimum: 1 + nullable: true + type: integer - description: Cursor for keyset-based pagination. Pass an empty string for the first page, then use ``next_cursor`` from the response. When ``cursor`` is provided, ``offset`` is ignored. @@ -9613,6 +11215,14 @@ paths: type: integer title: Version Number type: array + - in: query + name: teams + required: false + schema: + items: + type: string + title: Teams + type: array - in: query name: try_number required: false @@ -9893,12 +11503,32 @@ paths: default: -1 title: Map Index type: integer + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + minimum: -1 + nullable: true + type: integer responses: '200': content: application/json: schema: {} description: Successful Response + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -9917,6 +11547,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -9951,6 +11587,20 @@ paths: schema: title: Task Id type: string + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + minimum: -1 + nullable: true + type: integer responses: '200': content: @@ -9958,6 +11608,12 @@ paths: schema: $ref: '#/components/schemas/TaskInstanceResponse' description: Successful Response + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -9976,6 +11632,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -10024,6 +11686,19 @@ paths: type: string nullable: true type: array + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + nullable: true + type: integer requestBody: content: application/json: @@ -10109,6 +11784,20 @@ paths: default: -1 title: Map Index type: integer + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + minimum: -1 + nullable: true + type: integer responses: '200': content: @@ -10116,6 +11805,12 @@ paths: schema: $ref: '#/components/schemas/TaskDependencyCollectionResponse' description: Successful Response + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -10134,6 +11829,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -10183,6 +11884,19 @@ paths: type: string nullable: true type: array + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + nullable: true + type: integer requestBody: content: application/json: @@ -10220,6 +11934,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -10269,6 +11989,20 @@ paths: default: -1 title: Map Index type: integer + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + minimum: -1 + nullable: true + type: integer responses: '200': content: @@ -10300,6 +12034,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -10342,6 +12082,20 @@ paths: default: -1 title: Map Index type: integer + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + minimum: -1 + nullable: true + type: integer - in: query name: try_number required: false @@ -10355,6 +12109,12 @@ paths: schema: $ref: '#/components/schemas/ExtraLinkCollectionResponse' description: Successful Response + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -10373,6 +12133,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -10409,6 +12175,20 @@ paths: schema: title: Task Id type: string + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + minimum: -1 + nullable: true + type: integer - in: query name: run_after_gte required: false @@ -10746,6 +12526,12 @@ paths: schema: $ref: '#/components/schemas/TaskInstanceCollectionResponse' description: Successful Response + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -10813,6 +12599,12 @@ paths: default: false title: Full Content type: boolean + - in: query + name: token + required: false + schema: + nullable: true + type: string - in: query name: map_index required: false @@ -10821,17 +12613,25 @@ paths: title: Map Index type: integer - in: query - name: token + name: region_id required: false schema: + format: uuid nullable: true type: string - - in: header - name: accept + - in: query + name: region_index required: false schema: - default: '*/*' - enum: + minimum: -1 + nullable: true + type: integer + - in: header + name: accept + required: false + schema: + default: '*/*' + enum: - application/json - application/x-ndjson - '*/*' @@ -10852,6 +12652,12 @@ paths: ' type: string description: Successful Response + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -10870,6 +12676,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -10911,13 +12723,6 @@ paths: schema: title: Task Id type: string - - in: query - name: all_map_indices - required: false - schema: - default: false - title: All Map Indices - type: boolean - in: query name: map_index required: false @@ -10926,9 +12731,36 @@ paths: minimum: -1 title: Map Index type: integer + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + minimum: -1 + nullable: true + type: integer + - in: query + name: all_map_indices + required: false + schema: + default: false + title: All Map Indices + type: boolean responses: '204': description: Successful Response + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -10947,6 +12779,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -10986,9 +12824,22 @@ paths: required: false schema: default: -1 - minimum: -1 title: Map Index type: integer + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + minimum: -1 + nullable: true + type: integer - in: query name: limit required: false @@ -11012,6 +12863,12 @@ paths: schema: $ref: '#/components/schemas/TaskStateStoreCollectionResponse' description: Successful Response + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -11024,6 +12881,18 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -11071,12 +12940,31 @@ paths: required: false schema: default: -1 - minimum: -1 title: Map Index type: integer + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + minimum: -1 + nullable: true + type: integer responses: '204': description: Successful Response + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -11095,6 +12983,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -11140,9 +13034,22 @@ paths: required: false schema: default: -1 - minimum: -1 title: Map Index type: integer + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + minimum: -1 + nullable: true + type: integer responses: '200': content: @@ -11150,6 +13057,12 @@ paths: schema: $ref: '#/components/schemas/TaskStateStoreResponse' description: Successful Response + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -11168,6 +13081,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -11213,9 +13132,22 @@ paths: required: false schema: default: -1 - minimum: -1 title: Map Index type: integer + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + minimum: -1 + nullable: true + type: integer requestBody: content: application/json: @@ -11228,6 +13160,12 @@ paths: application/json: schema: {} description: Successful Response + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -11246,6 +13184,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -11291,9 +13235,22 @@ paths: required: false schema: default: -1 - minimum: -1 title: Map Index type: integer + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + minimum: -1 + nullable: true + type: integer requestBody: content: application/json: @@ -11303,6 +13260,12 @@ paths: responses: '204': description: Successful Response + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -11321,6 +13284,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -11335,7 +13304,10 @@ paths: - Task State Store /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/tries: get: - description: Get list of task instances history. + description: 'Get list of task instances history. + + + Tries recorded before the task had regions are not included once it has them.' operationId: get_task_instance_tries parameters: - in: path @@ -11363,6 +13335,20 @@ paths: default: -1 title: Map Index type: integer + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + minimum: -1 + nullable: true + type: integer responses: '200': content: @@ -11370,6 +13356,12 @@ paths: schema: $ref: '#/components/schemas/TaskInstanceHistoryCollectionResponse' description: Successful Response + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -11388,6 +13380,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -11436,6 +13434,20 @@ paths: default: -1 title: Map Index type: integer + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + minimum: -1 + nullable: true + type: integer responses: '200': content: @@ -11443,6 +13455,12 @@ paths: schema: $ref: '#/components/schemas/TaskInstanceHistoryResponse' description: Successful Response + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -11461,6 +13479,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -11513,6 +13537,31 @@ paths: minimum: -1 nullable: true type: integer + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + minimum: -1 + nullable: true + type: integer + - description: Leave out XComs whose keys Airflow reserves for itself, such + as loop decision reasons. + in: query + name: exclude_internal_keys + required: false + schema: + default: false + description: Leave out XComs whose keys Airflow reserves for itself, such + as loop decision reasons. + title: Exclude Internal Keys + type: boolean - in: query name: limit required: false @@ -11659,9 +13708,17 @@ paths: format: date-time nullable: true type: string + - in: query + name: teams + required: false + schema: + items: + type: string + title: Teams + type: array - description: 'Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `key, dag_id, run_id, - task_id, map_index, timestamp, run_after`' + task_id, map_index, region_id, region_index, timestamp, run_after`' in: query name: order_by required: false @@ -11670,11 +13727,12 @@ paths: - dag_id - task_id - run_id - - map_index + - region_id + - region_index - key description: 'Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `key, dag_id, - run_id, task_id, map_index, timestamp, run_after`' + run_id, task_id, map_index, region_id, region_index, timestamp, run_after`' items: type: string title: Order By @@ -11833,9 +13891,22 @@ paths: required: false schema: default: -1 - minimum: -1 title: Map Index type: integer + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + minimum: -1 + nullable: true + type: integer responses: '204': description: Successful Response @@ -11863,6 +13934,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -11908,9 +13985,22 @@ paths: required: false schema: default: -1 - minimum: -1 title: Map Index type: integer + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + minimum: -1 + nullable: true + type: integer - in: query name: deserialize required: false @@ -11959,6 +14049,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -12036,6 +14132,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -12077,6 +14179,20 @@ paths: schema: title: Map Index type: integer + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + minimum: -1 + nullable: true + type: integer responses: '200': content: @@ -12084,6 +14200,12 @@ paths: schema: $ref: '#/components/schemas/TaskInstanceResponse' description: Successful Response + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -12102,6 +14224,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -12150,6 +14278,19 @@ paths: type: string nullable: true type: array + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + nullable: true + type: integer requestBody: content: application/json: @@ -12234,6 +14375,20 @@ paths: schema: title: Map Index type: integer + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + minimum: -1 + nullable: true + type: integer responses: '200': content: @@ -12241,6 +14396,12 @@ paths: schema: $ref: '#/components/schemas/TaskDependencyCollectionResponse' description: Successful Response + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -12259,6 +14420,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -12308,6 +14475,19 @@ paths: type: string nullable: true type: array + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + nullable: true + type: integer requestBody: content: application/json: @@ -12345,6 +14525,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -12386,13 +14572,32 @@ paths: schema: title: Map Index type: integer + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + nullable: true + type: integer responses: '200': content: application/json: schema: - $ref: '#/components/schemas/HITLDetail' - description: Successful Response + $ref: '#/components/schemas/HITLDetail' + description: Successful Response + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -12411,6 +14616,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -12451,6 +14662,19 @@ paths: schema: title: Map Index type: integer + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + nullable: true + type: integer requestBody: content: application/json: @@ -12541,6 +14765,19 @@ paths: schema: nullable: true type: integer + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + nullable: true + type: integer responses: '200': content: @@ -12548,6 +14785,12 @@ paths: schema: $ref: '#/components/schemas/HITLDetailHistory' description: Successful Response + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -12566,6 +14809,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -12580,6 +14829,10 @@ paths: - Task Instance /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/{map_index}/tries: get: + description: 'Get list of task instances history for a mapped task instance. + + + Tries recorded before the task had regions are not included once it has them.' operationId: get_mapped_task_instance_tries parameters: - in: path @@ -12606,6 +14859,20 @@ paths: schema: title: Map Index type: integer + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + minimum: -1 + nullable: true + type: integer responses: '200': content: @@ -12613,6 +14880,12 @@ paths: schema: $ref: '#/components/schemas/TaskInstanceHistoryCollectionResponse' description: Successful Response + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -12631,6 +14904,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -12677,6 +14956,20 @@ paths: schema: title: Map Index type: integer + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + minimum: -1 + nullable: true + type: integer responses: '200': content: @@ -12684,6 +14977,12 @@ paths: schema: $ref: '#/components/schemas/TaskInstanceHistoryResponse' description: Successful Response + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -12702,6 +15001,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -12840,6 +15145,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -12956,6 +15267,100 @@ paths: summary: Get Dag Versions tags: - DagVersion + /api/v2/dags/{dag_id}/dagVersions/diff: + get: + description: "\U0001F6A7 This is an experimental endpoint and may change or\ + \ be removed without notice.\n\nReports observed state \u2014 what the two\ + \ stored versions currently hold \u2014 not why a version was created. Version\ + \ access returns the changed structure with identifying path components masked;\ + \ the raw values behind those changes, and the paths that name them, are disclosed\ + \ only to a caller who may also read the Dag's code." + operationId: get_dag_version_diff + parameters: + - in: path + name: dag_id + required: true + schema: + title: Dag Id + type: string + - description: Version to compare from. + in: query + name: base_version_number + required: true + schema: + description: Version to compare from. + exclusiveMinimum: 0 + title: Base Version Number + type: integer + - description: Version to compare to. + in: query + name: target_version_number + required: true + schema: + description: Version to compare to. + exclusiveMinimum: 0 + title: Target Version Number + type: integer + - description: Largest number of records `changes` may hold. A repeat of a path + already recorded does not count towards it, and `truncated` says whether + the bound dropped anything. + in: query + name: max_changes + required: false + schema: + default: 500 + description: Largest number of records `changes` may hold. A repeat of a + path already recorded does not count towards it, and `truncated` says + whether the bound dropped anything. + exclusiveMinimum: 0 + maximum: 5000 + title: Max Changes + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DagVersionDiffResponse' + description: Successful Response + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Unauthorized + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Not Found + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + security: + - OAuth2PasswordBearer: [] + - HTTPBearer: [] + summary: 'Experimental: Compare what two stored versions of a Dag currently + hold.' + tags: + - DagVersion + - experimental /api/v2/dags/{dag_id}/dagVersions/{version_number}: get: description: Get one Dag Version. @@ -13096,6 +15501,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Conflict '422': content: application/json: @@ -13171,7 +15582,16 @@ paths: - Task /api/v2/dags/{dag_id}/tasks/{task_id}: get: - description: Get simplified representation of a task. + description: 'Get simplified representation of a task. + + + Pass ``version_number`` (e.g. a task instance''s ``dag_version.version_number``) + to get the task + + as defined in that Dag version. Without it the latest version is used. Returns + 404 if that + + version of the Dag does not exist.' operationId: get_task parameters: - in: path @@ -13185,6 +15605,12 @@ paths: required: true schema: title: Task Id + - in: query + name: version_number + required: false + schema: + nullable: true + type: integer responses: '200': content: @@ -13283,6 +15709,20 @@ paths: description: Get all Event Logs. operationId: get_event_logs parameters: + - in: query + name: region_id + required: false + schema: + format: uuid + nullable: true + type: string + - in: query + name: region_index + required: false + schema: + minimum: -1 + nullable: true + type: integer - in: query name: limit required: false @@ -13301,7 +15741,8 @@ paths: type: integer - description: 'Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, dttm, dag_id, - task_id, run_id, event, logical_date, owner, extra, when, event_log_id`' + task_id, run_id, event, logical_date, owner, owner_display_name, extra, + when, event_log_id`' in: query name: order_by required: false @@ -13310,7 +15751,8 @@ paths: - id description: 'Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, dttm, - dag_id, task_id, run_id, event, logical_date, owner, extra, when, event_log_id`' + dag_id, task_id, run_id, event, logical_date, owner, owner_display_name, + extra, when, event_log_id`' items: type: string title: Order By @@ -13327,6 +15769,13 @@ paths: schema: nullable: true type: string + - in: query + name: task_instance_id + required: false + schema: + format: uuid + nullable: true + type: string - in: query name: run_id required: false @@ -13423,6 +15872,15 @@ paths: schema: nullable: true type: string + - description: "Case-insensitive substring match (SQL `ILIKE`). Slower than\ + \ `owner_display_name_prefix_pattern` on large tables \u2014 see \"Filtering\ + \ with pattern parameters\"." + in: query + name: owner_display_name_pattern + required: false + schema: + nullable: true + type: string - description: "Case-insensitive substring match (SQL `ILIKE`). Slower than\ \ `event_prefix_pattern` on large tables \u2014 see \"Filtering with pattern\ \ parameters\"." @@ -13464,6 +15922,14 @@ paths: schema: nullable: true type: string + - description: Case-sensitive, index-friendly prefix match. See "Filtering with + pattern parameters". + in: query + name: owner_display_name_prefix_pattern + required: false + schema: + nullable: true + type: string - description: Case-sensitive, index-friendly prefix match. See "Filtering with pattern parameters". in: query @@ -13472,6 +15938,14 @@ paths: schema: nullable: true type: string + - in: query + name: teams + required: false + schema: + items: + type: string + title: Teams + type: array responses: '200': content: @@ -13479,6 +15953,12 @@ paths: schema: $ref: '#/components/schemas/EventLogCollectionResponse' description: Successful Response + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Bad Request '401': content: application/json: @@ -13573,7 +16053,7 @@ paths: type: integer - description: 'Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, timestamp, filename, - bundle_name, stacktrace, import_error_id`' + source_reference, bundle_name, stacktrace, import_error_id`' in: query name: order_by required: false @@ -13582,7 +16062,7 @@ paths: - id description: 'Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `id, timestamp, - filename, bundle_name, stacktrace, import_error_id`' + filename, source_reference, bundle_name, stacktrace, import_error_id`' items: type: string title: Order By @@ -13704,12 +16184,6 @@ paths: description: Get all jobs. operationId: get_jobs parameters: - - in: query - name: is_alive - required: false - schema: - nullable: true - type: boolean - in: query name: start_date_gte required: false @@ -13806,6 +16280,12 @@ paths: schema: nullable: true type: string + - in: query + name: dag_id + required: false + schema: + nullable: true + type: string - in: query name: job_type required: false @@ -13824,6 +16304,20 @@ paths: schema: nullable: true type: string + - in: query + name: teams + required: false + schema: + items: + type: string + title: Teams + type: array + - in: query + name: is_alive + required: false + schema: + nullable: true + type: boolean responses: '200': content: @@ -14539,6 +17033,12 @@ paths: schema: $ref: '#/components/schemas/HTTPExceptionResponse' description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPExceptionResponse' + description: Not Found '409': content: application/json: diff --git a/test/test_actions_inner5.py b/test/test_actions_inner5.py new file mode 100644 index 00000000..7c5c427a --- /dev/null +++ b/test/test_actions_inner5.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.actions_inner5 import ActionsInner5 + +class TestActionsInner5(unittest.TestCase): + """ActionsInner5 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ActionsInner5: + """Test ActionsInner5 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ActionsInner5` + """ + model = ActionsInner5() + if include_optional: + return ActionsInner5( + action = 'delete', + action_on_existence = 'fail', + entities = [ + null + ], + action_on_non_existence = 'fail', + update_mask = [ + '' + ] + ) + else: + return ActionsInner5( + action = 'delete', + entities = [ + null + ], + ) + """ + + def testActionsInner5(self): + """Test ActionsInner5""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_all_inner.py b/test/test_all_inner.py new file mode 100644 index 00000000..cef8d313 --- /dev/null +++ b/test/test_all_inner.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.all_inner import AllInner + +class TestAllInner(unittest.TestCase): + """AllInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AllInner: + """Test AllInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AllInner` + """ + model = AllInner() + if include_optional: + return AllInner( + asset = airflow_client.client.models.asset_expression_asset_info.AssetExpressionAssetInfo( + group = '', + hidden = True, + id = 56, + name = '', + uri = '', ), + alias = airflow_client.client.models.asset_expression_alias_info.AssetExpressionAliasInfo( + group = '', + name = '', ), + asset_ref = { + 'key' : '' + }, + any = [ + null + ], + all = [ + null + ] + ) + else: + return AllInner( + asset = airflow_client.client.models.asset_expression_asset_info.AssetExpressionAssetInfo( + group = '', + hidden = True, + id = 56, + name = '', + uri = '', ), + alias = airflow_client.client.models.asset_expression_alias_info.AssetExpressionAliasInfo( + group = '', + name = '', ), + asset_ref = { + 'key' : '' + }, + any = [ + null + ], + all = [ + null + ], + ) + """ + + def testAllInner(self): + """Test AllInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_asset_collection_response.py b/test/test_asset_collection_response.py index 059f2cf9..aab9c8e6 100644 --- a/test/test_asset_collection_response.py +++ b/test/test_asset_collection_response.py @@ -63,12 +63,14 @@ def make_instance(self, include_optional) -> AssetCollectionResponse: created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), dag_id = '', task_id = '', + team_name = '', updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], scheduled_dags = [ airflow_client.client.models.dag_schedule_asset_reference.DagScheduleAssetReference( created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), dag_id = '', + team_name = '', updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), @@ -112,12 +114,14 @@ def make_instance(self, include_optional) -> AssetCollectionResponse: created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), dag_id = '', task_id = '', + team_name = '', updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], scheduled_dags = [ airflow_client.client.models.dag_schedule_asset_reference.DagScheduleAssetReference( created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), dag_id = '', + team_name = '', updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), diff --git a/test/test_asset_event_collection_response.py b/test/test_asset_event_collection_response.py index 0d4b8a67..624ca6e6 100644 --- a/test/test_asset_event_collection_response.py +++ b/test/test_asset_event_collection_response.py @@ -62,6 +62,7 @@ def make_instance(self, include_optional) -> AssetEventCollectionResponse: source_map_index = 56, source_run_id = '', source_task_id = '', + source_task_instance_id = '', timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), uri = '', ) ], @@ -96,6 +97,7 @@ def make_instance(self, include_optional) -> AssetEventCollectionResponse: source_map_index = 56, source_run_id = '', source_task_id = '', + source_task_instance_id = '', timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), uri = '', ) ], diff --git a/test/test_asset_event_response.py b/test/test_asset_event_response.py index c28b4649..00beba49 100644 --- a/test/test_asset_event_response.py +++ b/test/test_asset_event_response.py @@ -60,6 +60,7 @@ def make_instance(self, include_optional) -> AssetEventResponse: source_map_index = 56, source_run_id = '', source_task_id = '', + source_task_instance_id = '', timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), uri = '' ) diff --git a/test/test_asset_expression_alias.py b/test/test_asset_expression_alias.py new file mode 100644 index 00000000..94ba226c --- /dev/null +++ b/test/test_asset_expression_alias.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.asset_expression_alias import AssetExpressionAlias + +class TestAssetExpressionAlias(unittest.TestCase): + """AssetExpressionAlias unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AssetExpressionAlias: + """Test AssetExpressionAlias + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssetExpressionAlias` + """ + model = AssetExpressionAlias() + if include_optional: + return AssetExpressionAlias( + alias = airflow_client.client.models.asset_expression_alias_info.AssetExpressionAliasInfo( + group = '', + name = '', ) + ) + else: + return AssetExpressionAlias( + alias = airflow_client.client.models.asset_expression_alias_info.AssetExpressionAliasInfo( + group = '', + name = '', ), + ) + """ + + def testAssetExpressionAlias(self): + """Test AssetExpressionAlias""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_asset_expression_alias_info.py b/test/test_asset_expression_alias_info.py new file mode 100644 index 00000000..ac3d8673 --- /dev/null +++ b/test/test_asset_expression_alias_info.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.asset_expression_alias_info import AssetExpressionAliasInfo + +class TestAssetExpressionAliasInfo(unittest.TestCase): + """AssetExpressionAliasInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AssetExpressionAliasInfo: + """Test AssetExpressionAliasInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssetExpressionAliasInfo` + """ + model = AssetExpressionAliasInfo() + if include_optional: + return AssetExpressionAliasInfo( + group = '', + name = '' + ) + else: + return AssetExpressionAliasInfo( + group = '', + name = '', + ) + """ + + def testAssetExpressionAliasInfo(self): + """Test AssetExpressionAliasInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_asset_expression_all.py b/test/test_asset_expression_all.py new file mode 100644 index 00000000..630d8f58 --- /dev/null +++ b/test/test_asset_expression_all.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.asset_expression_all import AssetExpressionAll + +class TestAssetExpressionAll(unittest.TestCase): + """AssetExpressionAll unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AssetExpressionAll: + """Test AssetExpressionAll + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssetExpressionAll` + """ + model = AssetExpressionAll() + if include_optional: + return AssetExpressionAll( + all = [ + null + ] + ) + else: + return AssetExpressionAll( + all = [ + null + ], + ) + """ + + def testAssetExpressionAll(self): + """Test AssetExpressionAll""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_asset_expression_any.py b/test/test_asset_expression_any.py new file mode 100644 index 00000000..eabffd37 --- /dev/null +++ b/test/test_asset_expression_any.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.asset_expression_any import AssetExpressionAny + +class TestAssetExpressionAny(unittest.TestCase): + """AssetExpressionAny unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AssetExpressionAny: + """Test AssetExpressionAny + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssetExpressionAny` + """ + model = AssetExpressionAny() + if include_optional: + return AssetExpressionAny( + any = [ + null + ] + ) + else: + return AssetExpressionAny( + any = [ + null + ], + ) + """ + + def testAssetExpressionAny(self): + """Test AssetExpressionAny""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_asset_expression_asset.py b/test/test_asset_expression_asset.py new file mode 100644 index 00000000..bac47ca6 --- /dev/null +++ b/test/test_asset_expression_asset.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.asset_expression_asset import AssetExpressionAsset + +class TestAssetExpressionAsset(unittest.TestCase): + """AssetExpressionAsset unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AssetExpressionAsset: + """Test AssetExpressionAsset + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssetExpressionAsset` + """ + model = AssetExpressionAsset() + if include_optional: + return AssetExpressionAsset( + asset = airflow_client.client.models.asset_expression_asset_info.AssetExpressionAssetInfo( + group = '', + hidden = True, + id = 56, + name = '', + uri = '', ) + ) + else: + return AssetExpressionAsset( + asset = airflow_client.client.models.asset_expression_asset_info.AssetExpressionAssetInfo( + group = '', + hidden = True, + id = 56, + name = '', + uri = '', ), + ) + """ + + def testAssetExpressionAsset(self): + """Test AssetExpressionAsset""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_asset_expression_asset_info.py b/test/test_asset_expression_asset_info.py new file mode 100644 index 00000000..65e33491 --- /dev/null +++ b/test/test_asset_expression_asset_info.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.asset_expression_asset_info import AssetExpressionAssetInfo + +class TestAssetExpressionAssetInfo(unittest.TestCase): + """AssetExpressionAssetInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AssetExpressionAssetInfo: + """Test AssetExpressionAssetInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssetExpressionAssetInfo` + """ + model = AssetExpressionAssetInfo() + if include_optional: + return AssetExpressionAssetInfo( + group = '', + hidden = True, + id = 56, + name = '', + uri = '' + ) + else: + return AssetExpressionAssetInfo( + group = '', + ) + """ + + def testAssetExpressionAssetInfo(self): + """Test AssetExpressionAssetInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_asset_expression_ref.py b/test/test_asset_expression_ref.py new file mode 100644 index 00000000..1fdc8e58 --- /dev/null +++ b/test/test_asset_expression_ref.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.asset_expression_ref import AssetExpressionRef + +class TestAssetExpressionRef(unittest.TestCase): + """AssetExpressionRef unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AssetExpressionRef: + """Test AssetExpressionRef + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssetExpressionRef` + """ + model = AssetExpressionRef() + if include_optional: + return AssetExpressionRef( + asset_ref = { + 'key' : '' + } + ) + else: + return AssetExpressionRef( + asset_ref = { + 'key' : '' + }, + ) + """ + + def testAssetExpressionRef(self): + """Test AssetExpressionRef""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_asset_response.py b/test/test_asset_response.py index 0c45d794..c0543ddc 100644 --- a/test/test_asset_response.py +++ b/test/test_asset_response.py @@ -63,12 +63,14 @@ def make_instance(self, include_optional) -> AssetResponse: created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), dag_id = '', task_id = '', + team_name = '', updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], scheduled_dags = [ airflow_client.client.models.dag_schedule_asset_reference.DagScheduleAssetReference( created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), dag_id = '', + team_name = '', updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), @@ -104,12 +106,14 @@ def make_instance(self, include_optional) -> AssetResponse: created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), dag_id = '', task_id = '', + team_name = '', updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], scheduled_dags = [ airflow_client.client.models.dag_schedule_asset_reference.DagScheduleAssetReference( created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), dag_id = '', + team_name = '', updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), diff --git a/test/test_asset_state_store_last_updated_by.py b/test/test_asset_state_store_last_updated_by.py index 28a3fdad..9ce38d76 100644 --- a/test/test_asset_state_store_last_updated_by.py +++ b/test/test_asset_state_store_last_updated_by.py @@ -38,8 +38,12 @@ def make_instance(self, include_optional) -> AssetStateStoreLastUpdatedBy: dag_id = '', kind = 'task', map_index = 56, + region_id = '', + region_index = 56, run_id = '', - task_id = '' + task_id = '', + task_instance_id = '', + try_number = 56 ) else: return AssetStateStoreLastUpdatedBy( diff --git a/test/test_asset_state_store_response.py b/test/test_asset_state_store_response.py index 5e957649..8497d1cb 100644 --- a/test/test_asset_state_store_response.py +++ b/test/test_asset_state_store_response.py @@ -40,8 +40,12 @@ def make_instance(self, include_optional) -> AssetStateStoreResponse: dag_id = '', kind = 'task', map_index = 56, + region_id = '', + region_index = 56, run_id = '', - task_id = '', ), + task_id = '', + task_instance_id = '', + try_number = 56, ), updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), value = None ) diff --git a/test/test_backfill_api.py b/test/test_backfill_api.py index 7b984e88..c35a4492 100644 --- a/test/test_backfill_api.py +++ b/test/test_backfill_api.py @@ -54,6 +54,13 @@ def test_get_backfill(self) -> None: """ pass + def test_list_backfill_dag_runs(self) -> None: + """Test case for list_backfill_dag_runs + + List Backfill Dag Runs + """ + pass + def test_list_backfills(self) -> None: """Test case for list_backfills diff --git a/test/test_backfill_dag_run_collection_response.py b/test/test_backfill_dag_run_collection_response.py new file mode 100644 index 00000000..5c6eec11 --- /dev/null +++ b/test/test_backfill_dag_run_collection_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.backfill_dag_run_collection_response import BackfillDagRunCollectionResponse + +class TestBackfillDagRunCollectionResponse(unittest.TestCase): + """BackfillDagRunCollectionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BackfillDagRunCollectionResponse: + """Test BackfillDagRunCollectionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BackfillDagRunCollectionResponse` + """ + model = BackfillDagRunCollectionResponse() + if include_optional: + return BackfillDagRunCollectionResponse( + backfill_dag_runs = [ + airflow_client.client.models.backfill_dag_run_response.BackfillDagRunResponse( + backfill_id = 0.0, + dag_id = '', + dag_run_id = '', + dag_run_state = null, + exception_reason = '', + id = 0.0, + logical_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + partition_key = '', + sort_ordinal = 56, ) + ], + total_entries = 56 + ) + else: + return BackfillDagRunCollectionResponse( + backfill_dag_runs = [ + airflow_client.client.models.backfill_dag_run_response.BackfillDagRunResponse( + backfill_id = 0.0, + dag_id = '', + dag_run_id = '', + dag_run_state = null, + exception_reason = '', + id = 0.0, + logical_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + partition_key = '', + sort_ordinal = 56, ) + ], + total_entries = 56, + ) + """ + + def testBackfillDagRunCollectionResponse(self): + """Test BackfillDagRunCollectionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_backfill_dag_run_response.py b/test/test_backfill_dag_run_response.py new file mode 100644 index 00000000..f47fad44 --- /dev/null +++ b/test/test_backfill_dag_run_response.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.backfill_dag_run_response import BackfillDagRunResponse + +class TestBackfillDagRunResponse(unittest.TestCase): + """BackfillDagRunResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BackfillDagRunResponse: + """Test BackfillDagRunResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BackfillDagRunResponse` + """ + model = BackfillDagRunResponse() + if include_optional: + return BackfillDagRunResponse( + backfill_id = 0.0, + dag_id = '', + dag_run_id = '', + dag_run_state = 'queued', + exception_reason = '', + id = 0.0, + logical_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + partition_key = '', + sort_ordinal = 56 + ) + else: + return BackfillDagRunResponse( + backfill_id = 0.0, + dag_id = '', + id = 0.0, + sort_ordinal = 56, + ) + """ + + def testBackfillDagRunResponse(self): + """Test BackfillDagRunResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_backfill_post_body.py b/test/test_backfill_post_body.py index 59dd29fa..129e1e3e 100644 --- a/test/test_backfill_post_body.py +++ b/test/test_backfill_post_body.py @@ -37,8 +37,9 @@ def make_instance(self, include_optional) -> BackfillPostBody: return BackfillPostBody( dag_id = '', dag_run_conf = { }, + drain_dag = True, from_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - max_active_runs = 56, + max_active_runs = 1.0, reprocess_behavior = 'failed', run_backwards = True, run_on_latest_version = True, diff --git a/test/test_base_info_response.py b/test/test_base_info_response.py index 9e6262a3..3292263c 100644 --- a/test/test_base_info_response.py +++ b/test/test_base_info_response.py @@ -35,7 +35,7 @@ def make_instance(self, include_optional) -> BaseInfoResponse: model = BaseInfoResponse() if include_optional: return BaseInfoResponse( - status = '' + status = 'healthy' ) else: return BaseInfoResponse( diff --git a/test/test_bulk_body_bulk_dag_body.py b/test/test_bulk_body_bulk_dag_body.py new file mode 100644 index 00000000..263281d2 --- /dev/null +++ b/test/test_bulk_body_bulk_dag_body.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.bulk_body_bulk_dag_body import BulkBodyBulkDAGBody + +class TestBulkBodyBulkDAGBody(unittest.TestCase): + """BulkBodyBulkDAGBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BulkBodyBulkDAGBody: + """Test BulkBodyBulkDAGBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BulkBodyBulkDAGBody` + """ + model = BulkBodyBulkDAGBody() + if include_optional: + return BulkBodyBulkDAGBody( + actions = [ + null + ] + ) + else: + return BulkBodyBulkDAGBody( + actions = [ + null + ], + ) + """ + + def testBulkBodyBulkDAGBody(self): + """Test BulkBodyBulkDAGBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_bulk_create_action_bulk_dag_body.py b/test/test_bulk_create_action_bulk_dag_body.py new file mode 100644 index 00000000..c6fc2b68 --- /dev/null +++ b/test/test_bulk_create_action_bulk_dag_body.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.bulk_create_action_bulk_dag_body import BulkCreateActionBulkDAGBody + +class TestBulkCreateActionBulkDAGBody(unittest.TestCase): + """BulkCreateActionBulkDAGBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BulkCreateActionBulkDAGBody: + """Test BulkCreateActionBulkDAGBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BulkCreateActionBulkDAGBody` + """ + model = BulkCreateActionBulkDAGBody() + if include_optional: + return BulkCreateActionBulkDAGBody( + action = 'create', + action_on_existence = 'fail', + entities = [ + airflow_client.client.models.bulk_dag_body.BulkDAGBody( + dag_id = '', + is_paused = True, + scheduling_state = null, ) + ] + ) + else: + return BulkCreateActionBulkDAGBody( + action = 'create', + entities = [ + airflow_client.client.models.bulk_dag_body.BulkDAGBody( + dag_id = '', + is_paused = True, + scheduling_state = null, ) + ], + ) + """ + + def testBulkCreateActionBulkDAGBody(self): + """Test BulkCreateActionBulkDAGBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_bulk_create_action_bulk_task_instance_body.py b/test/test_bulk_create_action_bulk_task_instance_body.py index ecc3ab8f..8221b083 100644 --- a/test/test_bulk_create_action_bulk_task_instance_body.py +++ b/test/test_bulk_create_action_bulk_task_instance_body.py @@ -48,6 +48,8 @@ def make_instance(self, include_optional) -> BulkCreateActionBulkTaskInstanceBod map_index = 56, new_state = null, note = '', + region_id = '', + region_index = 56, task_id = '', ) ] ) @@ -65,6 +67,8 @@ def make_instance(self, include_optional) -> BulkCreateActionBulkTaskInstanceBod map_index = 56, new_state = null, note = '', + region_id = '', + region_index = 56, task_id = '', ) ], ) diff --git a/test/test_bulk_create_action_pool_body.py b/test/test_bulk_create_action_pool_body.py index 4e15f141..a08a7eea 100644 --- a/test/test_bulk_create_action_pool_body.py +++ b/test/test_bulk_create_action_pool_body.py @@ -41,7 +41,7 @@ def make_instance(self, include_optional) -> BulkCreateActionPoolBody: airflow_client.client.models.pool_body.PoolBody( description = '', include_deferred = True, - name = '', + name = 'o', slots = -1.0, team_name = '', ) ] @@ -53,7 +53,7 @@ def make_instance(self, include_optional) -> BulkCreateActionPoolBody: airflow_client.client.models.pool_body.PoolBody( description = '', include_deferred = True, - name = '', + name = 'o', slots = -1.0, team_name = '', ) ], diff --git a/test/test_bulk_create_action_variable_body.py b/test/test_bulk_create_action_variable_body.py index 3ee8a9be..a59187b5 100644 --- a/test/test_bulk_create_action_variable_body.py +++ b/test/test_bulk_create_action_variable_body.py @@ -40,7 +40,7 @@ def make_instance(self, include_optional) -> BulkCreateActionVariableBody: entities = [ airflow_client.client.models.variable_body.VariableBody( description = '', - key = '', + key = 'o', team_name = '', value = null, ) ] @@ -51,7 +51,7 @@ def make_instance(self, include_optional) -> BulkCreateActionVariableBody: entities = [ airflow_client.client.models.variable_body.VariableBody( description = '', - key = '', + key = 'o', team_name = '', value = null, ) ], diff --git a/test/test_bulk_dag_body.py b/test/test_bulk_dag_body.py new file mode 100644 index 00000000..2d03593b --- /dev/null +++ b/test/test_bulk_dag_body.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.bulk_dag_body import BulkDAGBody + +class TestBulkDAGBody(unittest.TestCase): + """BulkDAGBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BulkDAGBody: + """Test BulkDAGBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BulkDAGBody` + """ + model = BulkDAGBody() + if include_optional: + return BulkDAGBody( + dag_id = '', + is_paused = True, + scheduling_state = 'active' + ) + else: + return BulkDAGBody( + dag_id = '', + ) + """ + + def testBulkDAGBody(self): + """Test BulkDAGBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_bulk_delete_action_bulk_dag_body.py b/test/test_bulk_delete_action_bulk_dag_body.py new file mode 100644 index 00000000..9384dd10 --- /dev/null +++ b/test/test_bulk_delete_action_bulk_dag_body.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.bulk_delete_action_bulk_dag_body import BulkDeleteActionBulkDAGBody + +class TestBulkDeleteActionBulkDAGBody(unittest.TestCase): + """BulkDeleteActionBulkDAGBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BulkDeleteActionBulkDAGBody: + """Test BulkDeleteActionBulkDAGBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BulkDeleteActionBulkDAGBody` + """ + model = BulkDeleteActionBulkDAGBody() + if include_optional: + return BulkDeleteActionBulkDAGBody( + action = 'delete', + action_on_non_existence = 'fail', + entities = [ + null + ] + ) + else: + return BulkDeleteActionBulkDAGBody( + action = 'delete', + entities = [ + null + ], + ) + """ + + def testBulkDeleteActionBulkDAGBody(self): + """Test BulkDeleteActionBulkDAGBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_bulk_task_instance_body.py b/test/test_bulk_task_instance_body.py index 878d0571..e1b37d70 100644 --- a/test/test_bulk_task_instance_body.py +++ b/test/test_bulk_task_instance_body.py @@ -44,6 +44,8 @@ def make_instance(self, include_optional) -> BulkTaskInstanceBody: map_index = 56, new_state = 'removed', note = '', + region_id = '', + region_index = 56, task_id = '' ) else: diff --git a/test/test_bulk_update_action_bulk_dag_body.py b/test/test_bulk_update_action_bulk_dag_body.py new file mode 100644 index 00000000..9fa48284 --- /dev/null +++ b/test/test_bulk_update_action_bulk_dag_body.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.bulk_update_action_bulk_dag_body import BulkUpdateActionBulkDAGBody + +class TestBulkUpdateActionBulkDAGBody(unittest.TestCase): + """BulkUpdateActionBulkDAGBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BulkUpdateActionBulkDAGBody: + """Test BulkUpdateActionBulkDAGBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BulkUpdateActionBulkDAGBody` + """ + model = BulkUpdateActionBulkDAGBody() + if include_optional: + return BulkUpdateActionBulkDAGBody( + action = 'update', + action_on_non_existence = 'fail', + entities = [ + airflow_client.client.models.bulk_dag_body.BulkDAGBody( + dag_id = '', + is_paused = True, + scheduling_state = null, ) + ], + update_mask = [ + '' + ] + ) + else: + return BulkUpdateActionBulkDAGBody( + action = 'update', + entities = [ + airflow_client.client.models.bulk_dag_body.BulkDAGBody( + dag_id = '', + is_paused = True, + scheduling_state = null, ) + ], + ) + """ + + def testBulkUpdateActionBulkDAGBody(self): + """Test BulkUpdateActionBulkDAGBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_bulk_update_action_bulk_task_instance_body.py b/test/test_bulk_update_action_bulk_task_instance_body.py index 0c9c0ab1..699d3798 100644 --- a/test/test_bulk_update_action_bulk_task_instance_body.py +++ b/test/test_bulk_update_action_bulk_task_instance_body.py @@ -48,6 +48,8 @@ def make_instance(self, include_optional) -> BulkUpdateActionBulkTaskInstanceBod map_index = 56, new_state = null, note = '', + region_id = '', + region_index = 56, task_id = '', ) ], update_mask = [ @@ -68,6 +70,8 @@ def make_instance(self, include_optional) -> BulkUpdateActionBulkTaskInstanceBod map_index = 56, new_state = null, note = '', + region_id = '', + region_index = 56, task_id = '', ) ], ) diff --git a/test/test_bulk_update_action_pool_body.py b/test/test_bulk_update_action_pool_body.py index fe04b78c..49da495f 100644 --- a/test/test_bulk_update_action_pool_body.py +++ b/test/test_bulk_update_action_pool_body.py @@ -41,7 +41,7 @@ def make_instance(self, include_optional) -> BulkUpdateActionPoolBody: airflow_client.client.models.pool_body.PoolBody( description = '', include_deferred = True, - name = '', + name = 'o', slots = -1.0, team_name = '', ) ], @@ -56,7 +56,7 @@ def make_instance(self, include_optional) -> BulkUpdateActionPoolBody: airflow_client.client.models.pool_body.PoolBody( description = '', include_deferred = True, - name = '', + name = 'o', slots = -1.0, team_name = '', ) ], diff --git a/test/test_bulk_update_action_variable_body.py b/test/test_bulk_update_action_variable_body.py index 876a6894..168233f6 100644 --- a/test/test_bulk_update_action_variable_body.py +++ b/test/test_bulk_update_action_variable_body.py @@ -40,7 +40,7 @@ def make_instance(self, include_optional) -> BulkUpdateActionVariableBody: entities = [ airflow_client.client.models.variable_body.VariableBody( description = '', - key = '', + key = 'o', team_name = '', value = null, ) ], @@ -54,7 +54,7 @@ def make_instance(self, include_optional) -> BulkUpdateActionVariableBody: entities = [ airflow_client.client.models.variable_body.VariableBody( description = '', - key = '', + key = 'o', team_name = '', value = null, ) ], diff --git a/test/test_clear_task_instances_body.py b/test/test_clear_task_instances_body.py index 00205f1e..433f4efa 100644 --- a/test/test_clear_task_instances_body.py +++ b/test/test_clear_task_instances_body.py @@ -40,8 +40,10 @@ def make_instance(self, include_optional) -> ClearTaskInstancesBody: end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), include_downstream = True, include_future = True, + include_later_loop_iterations = True, include_past = True, include_upstream = True, + keep_task_state = True, note = '', only_failed = True, only_running = True, @@ -49,8 +51,15 @@ def make_instance(self, include_optional) -> ClearTaskInstancesBody: reset_dag_runs = True, run_on_latest_version = True, start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + task_group_id = '', task_ids = [ null + ], + task_instance_ids = [ + '' + ], + whole_expansion_ids = [ + '' ] ) else: diff --git a/test/test_dag_api.py b/test/test_dag_api.py index a7f059c6..4f54831f 100644 --- a/test/test_dag_api.py +++ b/test/test_dag_api.py @@ -26,6 +26,13 @@ def setUp(self) -> None: def tearDown(self) -> None: pass + def test_bulk_dags(self) -> None: + """Test case for bulk_dags + + Bulk Dags + """ + pass + def test_delete_dag(self) -> None: """Test case for delete_dag diff --git a/test/test_dag_bundle_api.py b/test/test_dag_bundle_api.py new file mode 100644 index 00000000..06ef9c49 --- /dev/null +++ b/test/test_dag_bundle_api.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.api.dag_bundle_api import DagBundleApi + + +class TestDagBundleApi(unittest.TestCase): + """DagBundleApi unit test stubs""" + + def setUp(self) -> None: + self.api = DagBundleApi() + + def tearDown(self) -> None: + pass + + def test_get_dag_bundle(self) -> None: + """Test case for get_dag_bundle + + Get Dag Bundle + """ + pass + + def test_get_dag_bundle_files(self) -> None: + """Test case for get_dag_bundle_files + + Get Dag Bundle Files + """ + pass + + def test_get_dag_bundles(self) -> None: + """Test case for get_dag_bundles + + Get Dag Bundles + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dag_bundle_collection_response.py b/test/test_dag_bundle_collection_response.py new file mode 100644 index 00000000..8f5a4db2 --- /dev/null +++ b/test/test_dag_bundle_collection_response.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.dag_bundle_collection_response import DagBundleCollectionResponse + +class TestDagBundleCollectionResponse(unittest.TestCase): + """DagBundleCollectionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DagBundleCollectionResponse: + """Test DagBundleCollectionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DagBundleCollectionResponse` + """ + model = DagBundleCollectionResponse() + if include_optional: + return DagBundleCollectionResponse( + dag_bundles = [ + airflow_client.client.models.dag_bundle_response.DagBundleResponse( + active = True, + bundle_url = '', + import_error_count = 56, + last_refreshed = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + name = '', + team_name = '', + version = '', ) + ], + total_entries = 56 + ) + else: + return DagBundleCollectionResponse( + dag_bundles = [ + airflow_client.client.models.dag_bundle_response.DagBundleResponse( + active = True, + bundle_url = '', + import_error_count = 56, + last_refreshed = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + name = '', + team_name = '', + version = '', ) + ], + total_entries = 56, + ) + """ + + def testDagBundleCollectionResponse(self): + """Test DagBundleCollectionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dag_bundle_detail_response.py b/test/test_dag_bundle_detail_response.py new file mode 100644 index 00000000..c50a8902 --- /dev/null +++ b/test/test_dag_bundle_detail_response.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.dag_bundle_detail_response import DagBundleDetailResponse + +class TestDagBundleDetailResponse(unittest.TestCase): + """DagBundleDetailResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DagBundleDetailResponse: + """Test DagBundleDetailResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DagBundleDetailResponse` + """ + model = DagBundleDetailResponse() + if include_optional: + return DagBundleDetailResponse( + active = True, + bundle_url = '', + dag_count = 56, + import_error_count = 56, + last_refreshed = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + name = '', + team_name = '', + version = '' + ) + else: + return DagBundleDetailResponse( + dag_count = 56, + name = '', + ) + """ + + def testDagBundleDetailResponse(self): + """Test DagBundleDetailResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dag_bundle_file_collection_response.py b/test/test_dag_bundle_file_collection_response.py new file mode 100644 index 00000000..842132ee --- /dev/null +++ b/test/test_dag_bundle_file_collection_response.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.dag_bundle_file_collection_response import DagBundleFileCollectionResponse + +class TestDagBundleFileCollectionResponse(unittest.TestCase): + """DagBundleFileCollectionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DagBundleFileCollectionResponse: + """Test DagBundleFileCollectionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DagBundleFileCollectionResponse` + """ + model = DagBundleFileCollectionResponse() + if include_optional: + return DagBundleFileCollectionResponse( + dag_bundle_files = [ + airflow_client.client.models.dag_bundle_file_response.DagBundleFileResponse( + dag_count = 56, + import_error_count = 56, + last_parse_duration = 1.337, + last_parsed_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + relative_fileloc = '', ) + ], + total_entries = 56 + ) + else: + return DagBundleFileCollectionResponse( + dag_bundle_files = [ + airflow_client.client.models.dag_bundle_file_response.DagBundleFileResponse( + dag_count = 56, + import_error_count = 56, + last_parse_duration = 1.337, + last_parsed_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + relative_fileloc = '', ) + ], + total_entries = 56, + ) + """ + + def testDagBundleFileCollectionResponse(self): + """Test DagBundleFileCollectionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dag_bundle_file_response.py b/test/test_dag_bundle_file_response.py new file mode 100644 index 00000000..4cfb0aa8 --- /dev/null +++ b/test/test_dag_bundle_file_response.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.dag_bundle_file_response import DagBundleFileResponse + +class TestDagBundleFileResponse(unittest.TestCase): + """DagBundleFileResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DagBundleFileResponse: + """Test DagBundleFileResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DagBundleFileResponse` + """ + model = DagBundleFileResponse() + if include_optional: + return DagBundleFileResponse( + dag_count = 56, + import_error_count = 56, + last_parse_duration = 1.337, + last_parsed_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + relative_fileloc = '' + ) + else: + return DagBundleFileResponse( + dag_count = 56, + relative_fileloc = '', + ) + """ + + def testDagBundleFileResponse(self): + """Test DagBundleFileResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dag_bundle_response.py b/test/test_dag_bundle_response.py new file mode 100644 index 00000000..7839afbe --- /dev/null +++ b/test/test_dag_bundle_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.dag_bundle_response import DagBundleResponse + +class TestDagBundleResponse(unittest.TestCase): + """DagBundleResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DagBundleResponse: + """Test DagBundleResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DagBundleResponse` + """ + model = DagBundleResponse() + if include_optional: + return DagBundleResponse( + active = True, + bundle_url = '', + import_error_count = 56, + last_refreshed = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + name = '', + team_name = '', + version = '' + ) + else: + return DagBundleResponse( + name = '', + ) + """ + + def testDagBundleResponse(self): + """Test DagBundleResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dag_collection_response.py b/test/test_dag_collection_response.py index 26e6928f..541ae3d2 100644 --- a/test/test_dag_collection_response.py +++ b/test/test_dag_collection_response.py @@ -66,6 +66,7 @@ def make_instance(self, include_optional) -> DAGCollectionResponse: '' ], relative_fileloc = '', + scheduling_state = null, tags = [ airflow_client.client.models.dag_tag_response.DagTagResponse( dag_display_name = '', @@ -112,6 +113,7 @@ def make_instance(self, include_optional) -> DAGCollectionResponse: '' ], relative_fileloc = '', + scheduling_state = null, tags = [ airflow_client.client.models.dag_tag_response.DagTagResponse( dag_display_name = '', diff --git a/test/test_dag_details_response.py b/test/test_dag_details_response.py index 1d45f312..347983f3 100644 --- a/test/test_dag_details_response.py +++ b/test/test_dag_details_response.py @@ -39,7 +39,7 @@ def make_instance(self, include_optional) -> DAGDetailsResponse: allowed_run_types = [ 'backfill' ], - asset_expression = { }, + asset_expression = None, bundle_name = '', bundle_version = '', catchup = True, @@ -90,6 +90,7 @@ def make_instance(self, include_optional) -> DAGDetailsResponse: relative_fileloc = '', render_template_as_native_obj = True, rerun_with_latest_version = True, + scheduling_state = 'active', start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), tags = [ airflow_client.client.models.dag_tag_response.DagTagResponse( @@ -97,6 +98,7 @@ def make_instance(self, include_optional) -> DAGDetailsResponse: dag_id = '', name = '', ) ], + team_name = '', template_search_path = [ '' ], @@ -113,7 +115,6 @@ def make_instance(self, include_optional) -> DAGDetailsResponse: dag_display_name = '', dag_id = '', file_token = '', - fileloc = '', has_import_errors = True, has_task_concurrency_limits = True, is_backfillable = True, diff --git a/test/test_dag_details_response_asset_expression.py b/test/test_dag_details_response_asset_expression.py new file mode 100644 index 00000000..9c91dbd7 --- /dev/null +++ b/test/test_dag_details_response_asset_expression.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.dag_details_response_asset_expression import DAGDetailsResponseAssetExpression + +class TestDAGDetailsResponseAssetExpression(unittest.TestCase): + """DAGDetailsResponseAssetExpression unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DAGDetailsResponseAssetExpression: + """Test DAGDetailsResponseAssetExpression + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DAGDetailsResponseAssetExpression` + """ + model = DAGDetailsResponseAssetExpression() + if include_optional: + return DAGDetailsResponseAssetExpression( + asset = airflow_client.client.models.asset_expression_asset_info.AssetExpressionAssetInfo( + group = '', + hidden = True, + id = 56, + name = '', + uri = '', ), + alias = airflow_client.client.models.asset_expression_alias_info.AssetExpressionAliasInfo( + group = '', + name = '', ), + asset_ref = { + 'key' : '' + }, + any = [ + null + ], + all = [ + null + ] + ) + else: + return DAGDetailsResponseAssetExpression( + asset = airflow_client.client.models.asset_expression_asset_info.AssetExpressionAssetInfo( + group = '', + hidden = True, + id = 56, + name = '', + uri = '', ), + alias = airflow_client.client.models.asset_expression_alias_info.AssetExpressionAliasInfo( + group = '', + name = '', ), + asset_ref = { + 'key' : '' + }, + any = [ + null + ], + all = [ + null + ], + ) + """ + + def testDAGDetailsResponseAssetExpression(self): + """Test DAGDetailsResponseAssetExpression""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dag_patch_body.py b/test/test_dag_patch_body.py index 5c9cccc6..922a61b6 100644 --- a/test/test_dag_patch_body.py +++ b/test/test_dag_patch_body.py @@ -35,11 +35,11 @@ def make_instance(self, include_optional) -> DAGPatchBody: model = DAGPatchBody() if include_optional: return DAGPatchBody( - is_paused = True + is_paused = True, + scheduling_state = 'active' ) else: return DAGPatchBody( - is_paused = True, ) """ diff --git a/test/test_dag_processor_info_response.py b/test/test_dag_processor_info_response.py index e167cc2c..e3032267 100644 --- a/test/test_dag_processor_info_response.py +++ b/test/test_dag_processor_info_response.py @@ -35,8 +35,17 @@ def make_instance(self, include_optional) -> DagProcessorInfoResponse: model = DagProcessorInfoResponse() if include_optional: return DagProcessorInfoResponse( + detailed_status = 'healthy', + instances = [ + airflow_client.client.models.dag_processor_instance_info_response.DagProcessorInstanceInfoResponse( + bundle_names = [ + '' + ], + hostname = '', + latest_dag_processor_heartbeat = '', ) + ], latest_dag_processor_heartbeat = '', - status = '' + status = 'healthy' ) else: return DagProcessorInfoResponse( diff --git a/test/test_dag_processor_instance_info_response.py b/test/test_dag_processor_instance_info_response.py new file mode 100644 index 00000000..252a2b73 --- /dev/null +++ b/test/test_dag_processor_instance_info_response.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.dag_processor_instance_info_response import DagProcessorInstanceInfoResponse + +class TestDagProcessorInstanceInfoResponse(unittest.TestCase): + """DagProcessorInstanceInfoResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DagProcessorInstanceInfoResponse: + """Test DagProcessorInstanceInfoResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DagProcessorInstanceInfoResponse` + """ + model = DagProcessorInstanceInfoResponse() + if include_optional: + return DagProcessorInstanceInfoResponse( + bundle_names = [ + '' + ], + hostname = '', + latest_dag_processor_heartbeat = '' + ) + else: + return DagProcessorInstanceInfoResponse( + ) + """ + + def testDagProcessorInstanceInfoResponse(self): + """Test DagProcessorInstanceInfoResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dag_response.py b/test/test_dag_response.py index 5e20dd79..dc1ddd95 100644 --- a/test/test_dag_response.py +++ b/test/test_dag_response.py @@ -64,6 +64,7 @@ def make_instance(self, include_optional) -> DAGResponse: '' ], relative_fileloc = '', + scheduling_state = 'active', tags = [ airflow_client.client.models.dag_tag_response.DagTagResponse( dag_display_name = '', @@ -80,7 +81,6 @@ def make_instance(self, include_optional) -> DAGResponse: dag_display_name = '', dag_id = '', file_token = '', - fileloc = '', has_import_errors = True, has_task_concurrency_limits = True, is_backfillable = True, diff --git a/test/test_dag_run_asset_reference.py b/test/test_dag_run_asset_reference.py index e82c397a..527caf59 100644 --- a/test/test_dag_run_asset_reference.py +++ b/test/test_dag_run_asset_reference.py @@ -50,7 +50,6 @@ def make_instance(self, include_optional) -> DagRunAssetReference: return DagRunAssetReference( dag_id = '', run_id = '', - start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), state = '', triggering = True, ) diff --git a/test/test_dag_run_collection_response.py b/test/test_dag_run_collection_response.py index 388c489d..b92d71d5 100644 --- a/test/test_dag_run_collection_response.py +++ b/test/test_dag_run_collection_response.py @@ -67,6 +67,7 @@ def make_instance(self, include_optional) -> DAGRunCollectionResponse: run_type = 'backfill', start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), state = 'queued', + team_name = '', triggered_by = null, triggering_user_name = '', ) ], @@ -109,6 +110,7 @@ def make_instance(self, include_optional) -> DAGRunCollectionResponse: run_type = 'backfill', start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), state = 'queued', + team_name = '', triggered_by = null, triggering_user_name = '', ) ], diff --git a/test/test_dag_run_response.py b/test/test_dag_run_response.py index 7d797f19..52f2c3c1 100644 --- a/test/test_dag_run_response.py +++ b/test/test_dag_run_response.py @@ -65,6 +65,7 @@ def make_instance(self, include_optional) -> DAGRunResponse: run_type = 'backfill', start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), state = 'queued', + team_name = '', triggered_by = 'cli', triggering_user_name = '' ) diff --git a/test/test_dag_schedule_asset_reference.py b/test/test_dag_schedule_asset_reference.py index 81ac3334..0178997f 100644 --- a/test/test_dag_schedule_asset_reference.py +++ b/test/test_dag_schedule_asset_reference.py @@ -37,6 +37,7 @@ def make_instance(self, include_optional) -> DagScheduleAssetReference: return DagScheduleAssetReference( created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), dag_id = '', + team_name = '', updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) else: diff --git a/test/test_dag_scheduling_state.py b/test/test_dag_scheduling_state.py new file mode 100644 index 00000000..a30151ba --- /dev/null +++ b/test/test_dag_scheduling_state.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.dag_scheduling_state import DagSchedulingState + +class TestDagSchedulingState(unittest.TestCase): + """DagSchedulingState unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDagSchedulingState(self): + """Test DagSchedulingState""" + # inst = DagSchedulingState() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dag_source_response.py b/test/test_dag_source_response.py index efe9c106..17a7bc0f 100644 --- a/test/test_dag_source_response.py +++ b/test/test_dag_source_response.py @@ -38,6 +38,7 @@ def make_instance(self, include_optional) -> DAGSourceResponse: content = '', dag_display_name = '', dag_id = '', + language = '', version_number = 56 ) else: diff --git a/test/test_dag_version_api.py b/test/test_dag_version_api.py index 8d66afcb..f920c239 100644 --- a/test/test_dag_version_api.py +++ b/test/test_dag_version_api.py @@ -33,6 +33,13 @@ def test_get_dag_version(self) -> None: """ pass + def test_get_dag_version_diff(self) -> None: + """Test case for get_dag_version_diff + + Experimental: Compare what two stored versions of a Dag currently hold. + """ + pass + def test_get_dag_versions(self) -> None: """Test case for get_dag_versions diff --git a/test/test_dag_version_diff_category.py b/test/test_dag_version_diff_category.py new file mode 100644 index 00000000..d3b193a9 --- /dev/null +++ b/test/test_dag_version_diff_category.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.dag_version_diff_category import DagVersionDiffCategory + +class TestDagVersionDiffCategory(unittest.TestCase): + """DagVersionDiffCategory unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDagVersionDiffCategory(self): + """Test DagVersionDiffCategory""" + # inst = DagVersionDiffCategory() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dag_version_diff_change_response.py b/test/test_dag_version_diff_change_response.py new file mode 100644 index 00000000..42c767b9 --- /dev/null +++ b/test/test_dag_version_diff_change_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.dag_version_diff_change_response import DagVersionDiffChangeResponse + +class TestDagVersionDiffChangeResponse(unittest.TestCase): + """DagVersionDiffChangeResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DagVersionDiffChangeResponse: + """Test DagVersionDiffChangeResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DagVersionDiffChangeResponse` + """ + model = DagVersionDiffChangeResponse() + if include_optional: + return DagVersionDiffChangeResponse( + after_digest = '', + after_value = None, + before_digest = '', + before_value = None, + category = 'asset', + impact = 'authorization', + occurrence_count = 56, + operation = 'added', + path = '' + ) + else: + return DagVersionDiffChangeResponse( + category = 'asset', + impact = 'authorization', + occurrence_count = 56, + operation = 'added', + path = '', + ) + """ + + def testDagVersionDiffChangeResponse(self): + """Test DagVersionDiffChangeResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dag_version_diff_impact.py b/test/test_dag_version_diff_impact.py new file mode 100644 index 00000000..bb35fa28 --- /dev/null +++ b/test/test_dag_version_diff_impact.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.dag_version_diff_impact import DagVersionDiffImpact + +class TestDagVersionDiffImpact(unittest.TestCase): + """DagVersionDiffImpact unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDagVersionDiffImpact(self): + """Test DagVersionDiffImpact""" + # inst = DagVersionDiffImpact() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dag_version_diff_mode.py b/test/test_dag_version_diff_mode.py new file mode 100644 index 00000000..b72ff289 --- /dev/null +++ b/test/test_dag_version_diff_mode.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.dag_version_diff_mode import DagVersionDiffMode + +class TestDagVersionDiffMode(unittest.TestCase): + """DagVersionDiffMode unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDagVersionDiffMode(self): + """Test DagVersionDiffMode""" + # inst = DagVersionDiffMode() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dag_version_diff_operation.py b/test/test_dag_version_diff_operation.py new file mode 100644 index 00000000..8a0ac21e --- /dev/null +++ b/test/test_dag_version_diff_operation.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.dag_version_diff_operation import DagVersionDiffOperation + +class TestDagVersionDiffOperation(unittest.TestCase): + """DagVersionDiffOperation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDagVersionDiffOperation(self): + """Test DagVersionDiffOperation""" + # inst = DagVersionDiffOperation() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dag_version_diff_response.py b/test/test_dag_version_diff_response.py new file mode 100644 index 00000000..3e9024ca --- /dev/null +++ b/test/test_dag_version_diff_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.dag_version_diff_response import DagVersionDiffResponse + +class TestDagVersionDiffResponse(unittest.TestCase): + """DagVersionDiffResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DagVersionDiffResponse: + """Test DagVersionDiffResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DagVersionDiffResponse` + """ + model = DagVersionDiffResponse() + if include_optional: + return DagVersionDiffResponse( + base_version_number = 56, + changes = [ + airflow_client.client.models.dag_version_diff_change_response.DagVersionDiffChangeResponse( + after_digest = '', + after_value = null, + before_digest = '', + before_value = null, + category = 'asset', + impact = 'authorization', + occurrence_count = 56, + operation = 'added', + path = '', ) + ], + diff_schema_version = 56, + mode = 'observed_state', + serializer_versions = airflow_client.client.models.dag_version_diff_serializer_versions.DagVersionDiffSerializerVersions( + base = 56, + target = 56, ), + target_version_number = 56, + total_changes = 56, + truncated = True, + unavailable_reason = '', + values_status = 'available' + ) + else: + return DagVersionDiffResponse( + base_version_number = 56, + changes = [ + airflow_client.client.models.dag_version_diff_change_response.DagVersionDiffChangeResponse( + after_digest = '', + after_value = null, + before_digest = '', + before_value = null, + category = 'asset', + impact = 'authorization', + occurrence_count = 56, + operation = 'added', + path = '', ) + ], + diff_schema_version = 56, + mode = 'observed_state', + serializer_versions = airflow_client.client.models.dag_version_diff_serializer_versions.DagVersionDiffSerializerVersions( + base = 56, + target = 56, ), + target_version_number = 56, + total_changes = 56, + truncated = True, + values_status = 'available', + ) + """ + + def testDagVersionDiffResponse(self): + """Test DagVersionDiffResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dag_version_diff_serializer_versions.py b/test/test_dag_version_diff_serializer_versions.py new file mode 100644 index 00000000..8e04d110 --- /dev/null +++ b/test/test_dag_version_diff_serializer_versions.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.dag_version_diff_serializer_versions import DagVersionDiffSerializerVersions + +class TestDagVersionDiffSerializerVersions(unittest.TestCase): + """DagVersionDiffSerializerVersions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DagVersionDiffSerializerVersions: + """Test DagVersionDiffSerializerVersions + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DagVersionDiffSerializerVersions` + """ + model = DagVersionDiffSerializerVersions() + if include_optional: + return DagVersionDiffSerializerVersions( + base = 56, + target = 56 + ) + else: + return DagVersionDiffSerializerVersions( + ) + """ + + def testDagVersionDiffSerializerVersions(self): + """Test DagVersionDiffSerializerVersions""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dag_version_diff_values_status.py b/test/test_dag_version_diff_values_status.py new file mode 100644 index 00000000..33abf313 --- /dev/null +++ b/test/test_dag_version_diff_values_status.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.dag_version_diff_values_status import DagVersionDiffValuesStatus + +class TestDagVersionDiffValuesStatus(unittest.TestCase): + """DagVersionDiffValuesStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDagVersionDiffValuesStatus(self): + """Test DagVersionDiffValuesStatus""" + # inst = DagVersionDiffValuesStatus() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dag_warning_collection_response.py b/test/test_dag_warning_collection_response.py index 39ab8ee4..bb616d9b 100644 --- a/test/test_dag_warning_collection_response.py +++ b/test/test_dag_warning_collection_response.py @@ -41,7 +41,7 @@ def make_instance(self, include_optional) -> DAGWarningCollectionResponse: dag_id = '', message = '', timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - warning_type = 'asset conflict', ) + warning_type = null, ) ], total_entries = 56 ) @@ -53,7 +53,7 @@ def make_instance(self, include_optional) -> DAGWarningCollectionResponse: dag_id = '', message = '', timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - warning_type = 'asset conflict', ) + warning_type = null, ) ], total_entries = 56, ) diff --git a/test/test_dag_warning_response.py b/test/test_dag_warning_response.py index c09bbabb..7b08ee5a 100644 --- a/test/test_dag_warning_response.py +++ b/test/test_dag_warning_response.py @@ -39,7 +39,7 @@ def make_instance(self, include_optional) -> DAGWarningResponse: dag_id = '', message = '', timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - warning_type = 'asset conflict' + warning_type = None ) else: return DAGWarningResponse( @@ -47,7 +47,7 @@ def make_instance(self, include_optional) -> DAGWarningResponse: dag_id = '', message = '', timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - warning_type = 'asset conflict', + warning_type = None, ) """ diff --git a/test/test_detailed_health_status.py b/test/test_detailed_health_status.py new file mode 100644 index 00000000..a11013b5 --- /dev/null +++ b/test/test_detailed_health_status.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.detailed_health_status import DetailedHealthStatus + +class TestDetailedHealthStatus(unittest.TestCase): + """DetailedHealthStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDetailedHealthStatus(self): + """Test DetailedHealthStatus""" + # inst = DetailedHealthStatus() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_entities_inner.py b/test/test_entities_inner.py index e305858c..e9b5f51a 100644 --- a/test/test_entities_inner.py +++ b/test/test_entities_inner.py @@ -36,13 +36,12 @@ def make_instance(self, include_optional) -> EntitiesInner: if include_optional: return EntitiesInner( dag_id = '', - dag_run_id = '', - note = '', - state = 'queued' + is_paused = True, + scheduling_state = 'active' ) else: return EntitiesInner( - dag_run_id = '', + dag_id = '', ) """ diff --git a/test/test_entities_inner1.py b/test/test_entities_inner1.py index b125dfca..d9679e01 100644 --- a/test/test_entities_inner1.py +++ b/test/test_entities_inner1.py @@ -37,18 +37,12 @@ def make_instance(self, include_optional) -> EntitiesInner1: return EntitiesInner1( dag_id = '', dag_run_id = '', - include_downstream = True, - include_future = True, - include_past = True, - include_upstream = True, - map_index = 56, - new_state = 'removed', note = '', - task_id = '' + state = 'queued' ) else: return EntitiesInner1( - task_id = '', + dag_run_id = '', ) """ diff --git a/test/test_entities_inner2.py b/test/test_entities_inner2.py index 8ca0d321..82be1010 100644 --- a/test/test_entities_inner2.py +++ b/test/test_entities_inner2.py @@ -35,21 +35,22 @@ def make_instance(self, include_optional) -> EntitiesInner2: model = EntitiesInner2() if include_optional: return EntitiesInner2( - conn_type = '', - connection_id = '2', - description = '', - extra = '', - host = '', - login = '', - password = '', - port = 56, - var_schema = '', - team_name = '' + dag_id = '', + dag_run_id = '', + include_downstream = True, + include_future = True, + include_past = True, + include_upstream = True, + map_index = 56, + new_state = 'removed', + note = '', + region_id = '', + region_index = 56, + task_id = '' ) else: return EntitiesInner2( - conn_type = '', - connection_id = '2', + task_id = '', ) """ diff --git a/test/test_entities_inner3.py b/test/test_entities_inner3.py index c641a71c..b02a957f 100644 --- a/test/test_entities_inner3.py +++ b/test/test_entities_inner3.py @@ -35,16 +35,21 @@ def make_instance(self, include_optional) -> EntitiesInner3: model = EntitiesInner3() if include_optional: return EntitiesInner3( + conn_type = '', + connection_id = '2', description = '', - include_deferred = True, - name = '', - slots = -1.0, + extra = '', + host = '', + login = '', + password = '', + port = 56, + var_schema = '', team_name = '' ) else: return EntitiesInner3( - name = '', - slots = -1.0, + conn_type = '', + connection_id = '2', ) """ diff --git a/test/test_entities_inner4.py b/test/test_entities_inner4.py index af8f9152..59156fdd 100644 --- a/test/test_entities_inner4.py +++ b/test/test_entities_inner4.py @@ -36,14 +36,15 @@ def make_instance(self, include_optional) -> EntitiesInner4: if include_optional: return EntitiesInner4( description = '', - key = '', - team_name = '', - value = None + include_deferred = True, + name = 'o', + slots = -1.0, + team_name = '' ) else: return EntitiesInner4( - key = '', - value = None, + name = 'o', + slots = -1.0, ) """ diff --git a/test/test_entities_inner5.py b/test/test_entities_inner5.py new file mode 100644 index 00000000..53839b4f --- /dev/null +++ b/test/test_entities_inner5.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.entities_inner5 import EntitiesInner5 + +class TestEntitiesInner5(unittest.TestCase): + """EntitiesInner5 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EntitiesInner5: + """Test EntitiesInner5 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EntitiesInner5` + """ + model = EntitiesInner5() + if include_optional: + return EntitiesInner5( + description = '', + key = 'o', + team_name = '', + value = None + ) + else: + return EntitiesInner5( + key = 'o', + value = None, + ) + """ + + def testEntitiesInner5(self): + """Test EntitiesInner5""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_event_log_collection_response.py b/test/test_event_log_collection_response.py index ae6f431c..5e4e9e53 100644 --- a/test/test_event_log_collection_response.py +++ b/test/test_event_log_collection_response.py @@ -45,9 +45,12 @@ def make_instance(self, include_optional) -> EventLogCollectionResponse: logical_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), map_index = 56, owner = '', + owner_display_name = '', run_id = '', task_display_name = '', task_id = '', + task_instance_id = '', + team_name = '', try_number = 56, when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], @@ -65,9 +68,12 @@ def make_instance(self, include_optional) -> EventLogCollectionResponse: logical_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), map_index = 56, owner = '', + owner_display_name = '', run_id = '', task_display_name = '', task_id = '', + task_instance_id = '', + team_name = '', try_number = 56, when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], diff --git a/test/test_event_log_response.py b/test/test_event_log_response.py index 4157a9c1..c64aa5fc 100644 --- a/test/test_event_log_response.py +++ b/test/test_event_log_response.py @@ -43,9 +43,12 @@ def make_instance(self, include_optional) -> EventLogResponse: logical_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), map_index = 56, owner = '', + owner_display_name = '', run_id = '', task_display_name = '', task_id = '', + task_instance_id = '', + team_name = '', try_number = 56, when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) diff --git a/test/test_experimental_api.py b/test/test_experimental_api.py index 1c0d744a..8ea8c7ca 100644 --- a/test/test_experimental_api.py +++ b/test/test_experimental_api.py @@ -26,6 +26,13 @@ def setUp(self) -> None: def tearDown(self) -> None: pass + def test_get_dag_version_diff(self) -> None: + """Test case for get_dag_version_diff + + Experimental: Compare what two stored versions of a Dag currently hold. + """ + pass + def test_wait_dag_run_until_finished(self) -> None: """Test case for wait_dag_run_until_finished diff --git a/test/test_external_view_response.py b/test/test_external_view_response.py index 2ec17df8..fe926059 100644 --- a/test/test_external_view_response.py +++ b/test/test_external_view_response.py @@ -35,6 +35,11 @@ def make_instance(self, include_optional) -> ExternalViewResponse: model = ExternalViewResponse() if include_optional: return ExternalViewResponse( + applies_to = { + 'key' : [ + '' + ] + }, category = '', destination = 'nav', href = '', diff --git a/test/test_health_info_response.py b/test/test_health_info_response.py index ded1278e..869480cf 100644 --- a/test/test_health_info_response.py +++ b/test/test_health_info_response.py @@ -36,27 +36,66 @@ def make_instance(self, include_optional) -> HealthInfoResponse: if include_optional: return HealthInfoResponse( dag_processor = airflow_client.client.models.dag_processor_info_response.DagProcessorInfoResponse( + detailed_status = null, + instances = [ + airflow_client.client.models.dag_processor_instance_info_response.DagProcessorInstanceInfoResponse( + bundle_names = [ + '' + ], + hostname = '', + latest_dag_processor_heartbeat = '', ) + ], latest_dag_processor_heartbeat = '', - status = '', ), + status = null, ), metadatabase = airflow_client.client.models.base_info_response.BaseInfoResponse( - status = '', ), + status = null, ), scheduler = airflow_client.client.models.scheduler_info_response.SchedulerInfoResponse( + detailed_status = null, + instances = [ + airflow_client.client.models.scheduler_instance_info_response.SchedulerInstanceInfoResponse( + hostname = '', + latest_scheduler_heartbeat = '', ) + ], latest_scheduler_heartbeat = '', - status = '', ), + status = null, ), triggerer = airflow_client.client.models.triggerer_info_response.TriggererInfoResponse( + detailed_status = null, + instances = [ + airflow_client.client.models.triggerer_instance_info_response.TriggererInstanceInfoResponse( + hostname = '', + latest_triggerer_heartbeat = '', + team_names = [ + '' + ], ) + ], latest_triggerer_heartbeat = '', - status = '', ) + status = null, ) ) else: return HealthInfoResponse( metadatabase = airflow_client.client.models.base_info_response.BaseInfoResponse( - status = '', ), + status = null, ), scheduler = airflow_client.client.models.scheduler_info_response.SchedulerInfoResponse( + detailed_status = null, + instances = [ + airflow_client.client.models.scheduler_instance_info_response.SchedulerInstanceInfoResponse( + hostname = '', + latest_scheduler_heartbeat = '', ) + ], latest_scheduler_heartbeat = '', - status = '', ), + status = null, ), triggerer = airflow_client.client.models.triggerer_info_response.TriggererInfoResponse( + detailed_status = null, + instances = [ + airflow_client.client.models.triggerer_instance_info_response.TriggererInstanceInfoResponse( + hostname = '', + latest_triggerer_heartbeat = '', + team_names = [ + '' + ], ) + ], latest_triggerer_heartbeat = '', - status = '', ), + status = null, ), ) """ diff --git a/test/test_health_status.py b/test/test_health_status.py new file mode 100644 index 00000000..bf546f3a --- /dev/null +++ b/test/test_health_status.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.health_status import HealthStatus + +class TestHealthStatus(unittest.TestCase): + """HealthStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testHealthStatus(self): + """Test HealthStatus""" + # inst = HealthStatus() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_hitl_detail.py b/test/test_hitl_detail.py index 9474477c..14128d4d 100644 --- a/test/test_hitl_detail.py +++ b/test/test_hitl_detail.py @@ -71,7 +71,9 @@ def make_instance(self, include_optional) -> HITLDetail: executor_config = '', hostname = '', id = '', + in_loop = True, logical_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + loop_iteration = null, map_index = 56, max_tries = 56, note = '', @@ -83,14 +85,19 @@ def make_instance(self, include_optional) -> HITLDetail: priority_weight = 56, queue = '', queued_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + region_id = '', + region_index = 56, rendered_fields = { }, rendered_map_index = '', + retry_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), run_after = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), scheduled_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), state = null, + state_reason = '', task_display_name = '', task_id = '', + team_name = '', trigger = null, triggerer_job = null, try_number = 56, @@ -114,7 +121,9 @@ def make_instance(self, include_optional) -> HITLDetail: executor_config = '', hostname = '', id = '', + in_loop = True, logical_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + loop_iteration = null, map_index = 56, max_tries = 56, note = '', @@ -126,14 +135,19 @@ def make_instance(self, include_optional) -> HITLDetail: priority_weight = 56, queue = '', queued_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + region_id = '', + region_index = 56, rendered_fields = { }, rendered_map_index = '', + retry_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), run_after = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), scheduled_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), state = null, + state_reason = '', task_display_name = '', task_id = '', + team_name = '', trigger = null, triggerer_job = null, try_number = 56, diff --git a/test/test_hitl_detail_collection.py b/test/test_hitl_detail_collection.py index 7b2af418..3e106ca9 100644 --- a/test/test_hitl_detail_collection.py +++ b/test/test_hitl_detail_collection.py @@ -71,7 +71,9 @@ def make_instance(self, include_optional) -> HITLDetailCollection: executor_config = '', hostname = '', id = '', + in_loop = True, logical_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + loop_iteration = null, map_index = 56, max_tries = 56, note = '', @@ -83,14 +85,19 @@ def make_instance(self, include_optional) -> HITLDetailCollection: priority_weight = 56, queue = '', queued_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + region_id = '', + region_index = 56, rendered_fields = { }, rendered_map_index = '', + retry_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), run_after = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), scheduled_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), state = null, + state_reason = '', task_display_name = '', task_id = '', + team_name = '', trigger = null, triggerer_job = null, try_number = 56, @@ -136,7 +143,9 @@ def make_instance(self, include_optional) -> HITLDetailCollection: executor_config = '', hostname = '', id = '', + in_loop = True, logical_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + loop_iteration = null, map_index = 56, max_tries = 56, note = '', @@ -148,14 +157,19 @@ def make_instance(self, include_optional) -> HITLDetailCollection: priority_weight = 56, queue = '', queued_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + region_id = '', + region_index = 56, rendered_fields = { }, rendered_map_index = '', + retry_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), run_after = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), scheduled_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), state = null, + state_reason = '', task_display_name = '', task_id = '', + team_name = '', trigger = null, triggerer_job = null, try_number = 56, diff --git a/test/test_hitl_detail_history.py b/test/test_hitl_detail_history.py index 0b50967f..4b176118 100644 --- a/test/test_hitl_detail_history.py +++ b/test/test_hitl_detail_history.py @@ -70,8 +70,11 @@ def make_instance(self, include_optional) -> HITLDetailHistory: executor = '', executor_config = '', hostname = '', + id = '', + loop_iteration = null, map_index = 56, max_tries = 56, + note = '', operator = '', operator_name = '', pid = 56, @@ -80,9 +83,13 @@ def make_instance(self, include_optional) -> HITLDetailHistory: priority_weight = 56, queue = '', queued_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + region_id = '', + region_index = 56, + retry_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), scheduled_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), state = null, + state_reason = '', task_display_name = '', task_id = '', try_number = 56, @@ -105,8 +112,11 @@ def make_instance(self, include_optional) -> HITLDetailHistory: executor = '', executor_config = '', hostname = '', + id = '', + loop_iteration = null, map_index = 56, max_tries = 56, + note = '', operator = '', operator_name = '', pid = 56, @@ -115,9 +125,13 @@ def make_instance(self, include_optional) -> HITLDetailHistory: priority_weight = 56, queue = '', queued_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + region_id = '', + region_index = 56, + retry_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), scheduled_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), state = null, + state_reason = '', task_display_name = '', task_id = '', try_number = 56, diff --git a/test/test_http_validation_error.py b/test/test_http_validation_error.py index 5491f599..a285f35d 100644 --- a/test/test_http_validation_error.py +++ b/test/test_http_validation_error.py @@ -37,7 +37,7 @@ def make_instance(self, include_optional) -> HTTPValidationError: return HTTPValidationError( detail = [ airflow_client.client.models.validation_error.ValidationError( - ctx = airflow_client.client.models.context.Context(), + ctx = { }, input = null, loc = [ null diff --git a/test/test_import_error_collection_response.py b/test/test_import_error_collection_response.py index 45ebfdb2..4f6e36e2 100644 --- a/test/test_import_error_collection_response.py +++ b/test/test_import_error_collection_response.py @@ -38,8 +38,10 @@ def make_instance(self, include_optional) -> ImportErrorCollectionResponse: import_errors = [ airflow_client.client.models.import_error_response.ImportErrorResponse( bundle_name = '', + file_token = '', filename = '', import_error_id = 56, + source_reference = '', stack_trace = '', timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], @@ -50,8 +52,10 @@ def make_instance(self, include_optional) -> ImportErrorCollectionResponse: import_errors = [ airflow_client.client.models.import_error_response.ImportErrorResponse( bundle_name = '', + file_token = '', filename = '', import_error_id = 56, + source_reference = '', stack_trace = '', timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], diff --git a/test/test_import_error_response.py b/test/test_import_error_response.py index f8ab447b..931f0c92 100644 --- a/test/test_import_error_response.py +++ b/test/test_import_error_response.py @@ -36,13 +36,16 @@ def make_instance(self, include_optional) -> ImportErrorResponse: if include_optional: return ImportErrorResponse( bundle_name = '', + file_token = '', filename = '', import_error_id = 56, + source_reference = '', stack_trace = '', timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) else: return ImportErrorResponse( + file_token = '', filename = '', import_error_id = 56, stack_trace = '', diff --git a/test/test_job_collection_response.py b/test/test_job_collection_response.py index 7c6c4765..6d9a9200 100644 --- a/test/test_job_collection_response.py +++ b/test/test_job_collection_response.py @@ -37,6 +37,9 @@ def make_instance(self, include_optional) -> JobCollectionResponse: return JobCollectionResponse( jobs = [ airflow_client.client.models.job_response.JobResponse( + bundle_names = [ + '' + ], dag_display_name = '', dag_id = '', end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), @@ -47,6 +50,9 @@ def make_instance(self, include_optional) -> JobCollectionResponse: latest_heartbeat = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), state = '', + team_names = [ + '' + ], unixname = '', ) ], total_entries = 56 @@ -55,6 +61,9 @@ def make_instance(self, include_optional) -> JobCollectionResponse: return JobCollectionResponse( jobs = [ airflow_client.client.models.job_response.JobResponse( + bundle_names = [ + '' + ], dag_display_name = '', dag_id = '', end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), @@ -65,6 +74,9 @@ def make_instance(self, include_optional) -> JobCollectionResponse: latest_heartbeat = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), state = '', + team_names = [ + '' + ], unixname = '', ) ], total_entries = 56, diff --git a/test/test_job_response.py b/test/test_job_response.py index 9ad5afcb..7f4dd213 100644 --- a/test/test_job_response.py +++ b/test/test_job_response.py @@ -35,6 +35,9 @@ def make_instance(self, include_optional) -> JobResponse: model = JobResponse() if include_optional: return JobResponse( + bundle_names = [ + '' + ], dag_display_name = '', dag_id = '', end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), @@ -45,6 +48,9 @@ def make_instance(self, include_optional) -> JobResponse: latest_heartbeat = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), state = '', + team_names = [ + '' + ], unixname = '' ) else: diff --git a/test/test_loop_iteration_response.py b/test/test_loop_iteration_response.py new file mode 100644 index 00000000..fcd2a167 --- /dev/null +++ b/test/test_loop_iteration_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.loop_iteration_response import LoopIterationResponse + +class TestLoopIterationResponse(unittest.TestCase): + """LoopIterationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LoopIterationResponse: + """Test LoopIterationResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LoopIterationResponse` + """ + model = LoopIterationResponse() + if include_optional: + return LoopIterationResponse( + iteration = 1.0, + loop_id = '' + ) + else: + return LoopIterationResponse( + iteration = 1.0, + loop_id = '', + ) + """ + + def testLoopIterationResponse(self): + """Test LoopIterationResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_materialize_asset_body.py b/test/test_materialize_asset_body.py index 8700f0da..e62d0078 100644 --- a/test/test_materialize_asset_body.py +++ b/test/test_materialize_asset_body.py @@ -35,10 +35,12 @@ def make_instance(self, include_optional) -> MaterializeAssetBody: model = MaterializeAssetBody() if include_optional: return MaterializeAssetBody( + bundle_version = '', conf = { }, dag_run_id = '', data_interval_end = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), data_interval_start = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + drain_dag = True, logical_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), note = '', partition_key = '', diff --git a/test/test_patch_task_instance_body.py b/test/test_patch_task_instance_body.py index a5ff9bca..609ea403 100644 --- a/test/test_patch_task_instance_body.py +++ b/test/test_patch_task_instance_body.py @@ -40,7 +40,9 @@ def make_instance(self, include_optional) -> PatchTaskInstanceBody: include_past = True, include_upstream = True, new_state = 'removed', - note = '' + note = '', + region_id = '', + region_index = 56 ) else: return PatchTaskInstanceBody( diff --git a/test/test_plugin_collection_response.py b/test/test_plugin_collection_response.py index 4c6ebff5..1157237a 100644 --- a/test/test_plugin_collection_response.py +++ b/test/test_plugin_collection_response.py @@ -72,8 +72,12 @@ def make_instance(self, include_optional) -> PluginCollectionResponse: { } ], source = '', + team_name = '', timetables = [ '' + ], + ui_actions = [ + null ], ) ], total_entries = 56 @@ -117,8 +121,12 @@ def make_instance(self, include_optional) -> PluginCollectionResponse: { } ], source = '', + team_name = '', timetables = [ '' + ], + ui_actions = [ + null ], ) ], total_entries = 56, diff --git a/test/test_plugin_link_action_response.py b/test/test_plugin_link_action_response.py new file mode 100644 index 00000000..16f0b7ae --- /dev/null +++ b/test/test_plugin_link_action_response.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.plugin_link_action_response import PluginLinkActionResponse + +class TestPluginLinkActionResponse(unittest.TestCase): + """PluginLinkActionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PluginLinkActionResponse: + """Test PluginLinkActionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PluginLinkActionResponse` + """ + model = PluginLinkActionResponse() + if include_optional: + return PluginLinkActionResponse( + action_type = 'link', + applies_to = { + 'key' : [ + '' + ] + }, + destination = 'dag', + href = '', + icon = '', + icon_dark_mode = '', + name = '' + ) + else: + return PluginLinkActionResponse( + action_type = 'link', + destination = 'dag', + href = '', + name = '', + ) + """ + + def testPluginLinkActionResponse(self): + """Test PluginLinkActionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_plugin_react_action_response.py b/test/test_plugin_react_action_response.py new file mode 100644 index 00000000..d2f783ed --- /dev/null +++ b/test/test_plugin_react_action_response.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.plugin_react_action_response import PluginReactActionResponse + +class TestPluginReactActionResponse(unittest.TestCase): + """PluginReactActionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PluginReactActionResponse: + """Test PluginReactActionResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PluginReactActionResponse` + """ + model = PluginReactActionResponse() + if include_optional: + return PluginReactActionResponse( + action_type = 'react', + applies_to = { + 'key' : [ + '' + ] + }, + bundle_url = '', + destination = 'dag', + icon = '', + icon_dark_mode = '', + name = '' + ) + else: + return PluginReactActionResponse( + action_type = 'react', + bundle_url = '', + destination = 'dag', + name = '', + ) + """ + + def testPluginReactActionResponse(self): + """Test PluginReactActionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_plugin_response.py b/test/test_plugin_response.py index ce9ae322..eeb4e1cb 100644 --- a/test/test_plugin_response.py +++ b/test/test_plugin_response.py @@ -70,8 +70,12 @@ def make_instance(self, include_optional) -> PluginResponse: { } ], source = '', + team_name = '', timetables = [ '' + ], + ui_actions = [ + null ] ) else: diff --git a/test/test_pool_body.py b/test/test_pool_body.py index ece7955b..520ec78c 100644 --- a/test/test_pool_body.py +++ b/test/test_pool_body.py @@ -37,13 +37,13 @@ def make_instance(self, include_optional) -> PoolBody: return PoolBody( description = '', include_deferred = True, - name = '', + name = 'o', slots = -1.0, team_name = '' ) else: return PoolBody( - name = '', + name = 'o', slots = -1.0, ) """ diff --git a/test/test_react_app_response.py b/test/test_react_app_response.py index ce0ec9b6..8dac5046 100644 --- a/test/test_react_app_response.py +++ b/test/test_react_app_response.py @@ -35,6 +35,11 @@ def make_instance(self, include_optional) -> ReactAppResponse: model = ReactAppResponse() if include_optional: return ReactAppResponse( + applies_to = { + 'key' : [ + '' + ] + }, bundle_url = '', category = '', destination = 'nav', diff --git a/test/test_response_clear_dag_run.py b/test/test_response_clear_dag_run.py index 0a1e35f5..81d3fcc7 100644 --- a/test/test_response_clear_dag_run.py +++ b/test/test_response_clear_dag_run.py @@ -69,6 +69,7 @@ def make_instance(self, include_optional) -> ResponseClearDagRun: run_type = 'backfill', start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), state = 'queued', + team_name = '', triggered_by = 'cli', triggering_user_name = '' ) diff --git a/test/test_response_clear_dag_runs.py b/test/test_response_clear_dag_runs.py index 255710fb..f22920b9 100644 --- a/test/test_response_clear_dag_runs.py +++ b/test/test_response_clear_dag_runs.py @@ -71,6 +71,7 @@ def make_instance(self, include_optional) -> ResponseClearDagRuns: run_type = 'backfill', start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), state = 'queued', + team_name = '', triggered_by = null, triggering_user_name = '', ) ], @@ -116,6 +117,7 @@ def make_instance(self, include_optional) -> ResponseClearDagRuns: run_type = 'backfill', start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), state = 'queued', + team_name = '', triggered_by = null, triggering_user_name = '', ) ], diff --git a/test/test_response_get_xcom_entry.py b/test/test_response_get_xcom_entry.py index 506a4c9a..3468a1b2 100644 --- a/test/test_response_get_xcom_entry.py +++ b/test/test_response_get_xcom_entry.py @@ -40,10 +40,13 @@ def make_instance(self, include_optional) -> ResponseGetXcomEntry: key = '', logical_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), map_index = 56, + region_id = '', + region_index = 56, run_after = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), run_id = '', task_display_name = '', task_id = '', + team_name = '', timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), value = '' ) diff --git a/test/test_scheduler_info_response.py b/test/test_scheduler_info_response.py index 00d77889..03eddd0c 100644 --- a/test/test_scheduler_info_response.py +++ b/test/test_scheduler_info_response.py @@ -35,8 +35,14 @@ def make_instance(self, include_optional) -> SchedulerInfoResponse: model = SchedulerInfoResponse() if include_optional: return SchedulerInfoResponse( + detailed_status = 'healthy', + instances = [ + airflow_client.client.models.scheduler_instance_info_response.SchedulerInstanceInfoResponse( + hostname = '', + latest_scheduler_heartbeat = '', ) + ], latest_scheduler_heartbeat = '', - status = '' + status = 'healthy' ) else: return SchedulerInfoResponse( diff --git a/test/test_scheduler_instance_info_response.py b/test/test_scheduler_instance_info_response.py new file mode 100644 index 00000000..dc3ba04b --- /dev/null +++ b/test/test_scheduler_instance_info_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.scheduler_instance_info_response import SchedulerInstanceInfoResponse + +class TestSchedulerInstanceInfoResponse(unittest.TestCase): + """SchedulerInstanceInfoResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SchedulerInstanceInfoResponse: + """Test SchedulerInstanceInfoResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SchedulerInstanceInfoResponse` + """ + model = SchedulerInstanceInfoResponse() + if include_optional: + return SchedulerInstanceInfoResponse( + hostname = '', + latest_scheduler_heartbeat = '' + ) + else: + return SchedulerInstanceInfoResponse( + ) + """ + + def testSchedulerInstanceInfoResponse(self): + """Test SchedulerInstanceInfoResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_task_instance_collection_response.py b/test/test_task_instance_collection_response.py index ef3c896f..12326cc7 100644 --- a/test/test_task_instance_collection_response.py +++ b/test/test_task_instance_collection_response.py @@ -49,7 +49,9 @@ def make_instance(self, include_optional) -> TaskInstanceCollectionResponse: executor_config = '', hostname = '', id = '', + in_loop = True, logical_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + loop_iteration = null, map_index = 56, max_tries = 56, note = '', @@ -61,14 +63,19 @@ def make_instance(self, include_optional) -> TaskInstanceCollectionResponse: priority_weight = 56, queue = '', queued_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + region_id = '', + region_index = 56, rendered_fields = { }, rendered_map_index = '', + retry_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), run_after = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), scheduled_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), state = null, + state_reason = '', task_display_name = '', task_id = '', + team_name = '', trigger = null, triggerer_job = null, try_number = 56, @@ -91,7 +98,9 @@ def make_instance(self, include_optional) -> TaskInstanceCollectionResponse: executor_config = '', hostname = '', id = '', + in_loop = True, logical_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + loop_iteration = null, map_index = 56, max_tries = 56, note = '', @@ -103,14 +112,19 @@ def make_instance(self, include_optional) -> TaskInstanceCollectionResponse: priority_weight = 56, queue = '', queued_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + region_id = '', + region_index = 56, rendered_fields = { }, rendered_map_index = '', + retry_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), run_after = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), scheduled_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), state = null, + state_reason = '', task_display_name = '', task_id = '', + team_name = '', trigger = null, triggerer_job = null, try_number = 56, diff --git a/test/test_task_instance_history_collection_response.py b/test/test_task_instance_history_collection_response.py index 9fe9ca43..21049c44 100644 --- a/test/test_task_instance_history_collection_response.py +++ b/test/test_task_instance_history_collection_response.py @@ -46,8 +46,11 @@ def make_instance(self, include_optional) -> TaskInstanceHistoryCollectionRespon executor = '', executor_config = '', hostname = '', + id = '', + loop_iteration = null, map_index = 56, max_tries = 56, + note = '', operator = '', operator_name = '', pid = 56, @@ -56,9 +59,13 @@ def make_instance(self, include_optional) -> TaskInstanceHistoryCollectionRespon priority_weight = 56, queue = '', queued_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + region_id = '', + region_index = 56, + retry_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), scheduled_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), state = null, + state_reason = '', task_display_name = '', task_id = '', try_number = 56, @@ -79,8 +86,11 @@ def make_instance(self, include_optional) -> TaskInstanceHistoryCollectionRespon executor = '', executor_config = '', hostname = '', + id = '', + loop_iteration = null, map_index = 56, max_tries = 56, + note = '', operator = '', operator_name = '', pid = 56, @@ -89,9 +99,13 @@ def make_instance(self, include_optional) -> TaskInstanceHistoryCollectionRespon priority_weight = 56, queue = '', queued_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + region_id = '', + region_index = 56, + retry_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), scheduled_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), state = null, + state_reason = '', task_display_name = '', task_id = '', try_number = 56, diff --git a/test/test_task_instance_history_response.py b/test/test_task_instance_history_response.py index e1de1827..6a8cb56f 100644 --- a/test/test_task_instance_history_response.py +++ b/test/test_task_instance_history_response.py @@ -52,8 +52,13 @@ def make_instance(self, include_optional) -> TaskInstanceHistoryResponse: executor = '', executor_config = '', hostname = '', + id = '', + loop_iteration = airflow_client.client.models.loop_iteration_response.LoopIterationResponse( + iteration = 1.0, + loop_id = '', ), map_index = 56, max_tries = 56, + note = '', operator = '', operator_name = '', pid = 56, @@ -62,9 +67,13 @@ def make_instance(self, include_optional) -> TaskInstanceHistoryResponse: priority_weight = 56, queue = '', queued_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + region_id = '', + region_index = 56, + retry_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), scheduled_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), state = 'removed', + state_reason = '', task_display_name = '', task_id = '', try_number = 56, @@ -76,6 +85,7 @@ def make_instance(self, include_optional) -> TaskInstanceHistoryResponse: dag_id = '', dag_run_id = '', executor_config = '', + id = '', map_index = 56, max_tries = 56, pool = '', diff --git a/test/test_task_instance_response.py b/test/test_task_instance_response.py index 1dd4083d..d91446d3 100644 --- a/test/test_task_instance_response.py +++ b/test/test_task_instance_response.py @@ -53,7 +53,11 @@ def make_instance(self, include_optional) -> TaskInstanceResponse: executor_config = '', hostname = '', id = '', + in_loop = True, logical_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + loop_iteration = airflow_client.client.models.loop_iteration_response.LoopIterationResponse( + iteration = 1.0, + loop_id = '', ), map_index = 56, max_tries = 56, note = '', @@ -65,14 +69,19 @@ def make_instance(self, include_optional) -> TaskInstanceResponse: priority_weight = 56, queue = '', queued_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + region_id = '', + region_index = 56, rendered_fields = { }, rendered_map_index = '', + retry_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), run_after = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), scheduled_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), state = 'removed', + state_reason = '', task_display_name = '', task_id = '', + team_name = '', trigger = airflow_client.client.models.trigger_response.TriggerResponse( classpath = '', created_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), @@ -81,6 +90,9 @@ def make_instance(self, include_optional) -> TaskInstanceResponse: queue = '', triggerer_id = 56, ), triggerer_job = airflow_client.client.models.job_response.JobResponse( + bundle_names = [ + '' + ], dag_display_name = '', dag_id = '', end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), @@ -91,6 +103,9 @@ def make_instance(self, include_optional) -> TaskInstanceResponse: latest_heartbeat = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), state = '', + team_names = [ + '' + ], unixname = '', ), try_number = 56, unixname = '' @@ -102,6 +117,7 @@ def make_instance(self, include_optional) -> TaskInstanceResponse: dag_run_id = '', executor_config = '', id = '', + in_loop = True, map_index = 56, max_tries = 56, pool = '', diff --git a/test/test_task_instances_inner.py b/test/test_task_instances_inner.py index 65ae9f85..0a0c7bd4 100644 --- a/test/test_task_instances_inner.py +++ b/test/test_task_instances_inner.py @@ -53,7 +53,11 @@ def make_instance(self, include_optional) -> TaskInstancesInner: executor_config = '', hostname = '', id = '', + in_loop = True, logical_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + loop_iteration = airflow_client.client.models.loop_iteration_response.LoopIterationResponse( + iteration = 1.0, + loop_id = '', ), map_index = 56, max_tries = 56, note = '', @@ -65,14 +69,19 @@ def make_instance(self, include_optional) -> TaskInstancesInner: priority_weight = 56, queue = '', queued_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + region_id = '', + region_index = 56, rendered_fields = { }, rendered_map_index = '', + retry_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), run_after = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), scheduled_when = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), state = 'removed', + state_reason = '', task_display_name = '', task_id = '', + team_name = '', trigger = airflow_client.client.models.trigger_response.TriggerResponse( classpath = '', created_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), @@ -81,6 +90,9 @@ def make_instance(self, include_optional) -> TaskInstancesInner: queue = '', triggerer_id = 56, ), triggerer_job = airflow_client.client.models.job_response.JobResponse( + bundle_names = [ + '' + ], dag_display_name = '', dag_id = '', end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), @@ -91,6 +103,9 @@ def make_instance(self, include_optional) -> TaskInstancesInner: latest_heartbeat = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), state = '', + team_names = [ + '' + ], unixname = '', ), try_number = 56, unixname = '' @@ -102,6 +117,7 @@ def make_instance(self, include_optional) -> TaskInstancesInner: dag_run_id = '', executor_config = '', id = '', + in_loop = True, map_index = 56, max_tries = 56, pool = '', diff --git a/test/test_task_outlet_asset_reference.py b/test/test_task_outlet_asset_reference.py index 19bc42dc..f2c00499 100644 --- a/test/test_task_outlet_asset_reference.py +++ b/test/test_task_outlet_asset_reference.py @@ -38,6 +38,7 @@ def make_instance(self, include_optional) -> TaskOutletAssetReference: created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), dag_id = '', task_id = '', + team_name = '', updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) else: diff --git a/test/test_trigger_dag_run_post_body.py b/test/test_trigger_dag_run_post_body.py index 3523497e..364fea2d 100644 --- a/test/test_trigger_dag_run_post_body.py +++ b/test/test_trigger_dag_run_post_body.py @@ -35,10 +35,12 @@ def make_instance(self, include_optional) -> TriggerDAGRunPostBody: model = TriggerDAGRunPostBody() if include_optional: return TriggerDAGRunPostBody( + bundle_version = '', conf = { }, dag_run_id = '', data_interval_end = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), data_interval_start = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + drain_dag = True, logical_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), note = '', partition_key = '', diff --git a/test/test_triggerer_info_response.py b/test/test_triggerer_info_response.py index 6ea53bb8..cbe50609 100644 --- a/test/test_triggerer_info_response.py +++ b/test/test_triggerer_info_response.py @@ -35,8 +35,17 @@ def make_instance(self, include_optional) -> TriggererInfoResponse: model = TriggererInfoResponse() if include_optional: return TriggererInfoResponse( + detailed_status = 'healthy', + instances = [ + airflow_client.client.models.triggerer_instance_info_response.TriggererInstanceInfoResponse( + hostname = '', + latest_triggerer_heartbeat = '', + team_names = [ + '' + ], ) + ], latest_triggerer_heartbeat = '', - status = '' + status = 'healthy' ) else: return TriggererInfoResponse( diff --git a/test/test_triggerer_instance_info_response.py b/test/test_triggerer_instance_info_response.py new file mode 100644 index 00000000..b6db203d --- /dev/null +++ b/test/test_triggerer_instance_info_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.triggerer_instance_info_response import TriggererInstanceInfoResponse + +class TestTriggererInstanceInfoResponse(unittest.TestCase): + """TriggererInstanceInfoResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TriggererInstanceInfoResponse: + """Test TriggererInstanceInfoResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TriggererInstanceInfoResponse` + """ + model = TriggererInstanceInfoResponse() + if include_optional: + return TriggererInstanceInfoResponse( + hostname = '', + latest_triggerer_heartbeat = '', + team_names = [ + '' + ] + ) + else: + return TriggererInstanceInfoResponse( + team_names = [ + '' + ], + ) + """ + + def testTriggererInstanceInfoResponse(self): + """Test TriggererInstanceInfoResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ui_actions_inner.py b/test/test_ui_actions_inner.py new file mode 100644 index 00000000..1433e389 --- /dev/null +++ b/test/test_ui_actions_inner.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.ui_actions_inner import UiActionsInner + +class TestUiActionsInner(unittest.TestCase): + """UiActionsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UiActionsInner: + """Test UiActionsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UiActionsInner` + """ + model = UiActionsInner() + if include_optional: + return UiActionsInner( + action_type = 'react', + applies_to = { + 'key' : [ + '' + ] + }, + destination = 'dag', + href = '', + icon = '', + icon_dark_mode = '', + name = '', + bundle_url = '' + ) + else: + return UiActionsInner( + action_type = 'react', + destination = 'dag', + href = '', + name = '', + bundle_url = '', + ) + """ + + def testUiActionsInner(self): + """Test UiActionsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_hitl_detail_payload.py b/test/test_update_hitl_detail_payload.py index 186489cf..2f18a0f0 100644 --- a/test/test_update_hitl_detail_payload.py +++ b/test/test_update_hitl_detail_payload.py @@ -38,7 +38,8 @@ def make_instance(self, include_optional) -> UpdateHITLDetailPayload: chosen_options = [ '' ], - params_input = { } + params_input = { }, + request_created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) else: return UpdateHITLDetailPayload( diff --git a/test/test_validation_error.py b/test/test_validation_error.py index 97072141..99ad71c1 100644 --- a/test/test_validation_error.py +++ b/test/test_validation_error.py @@ -35,7 +35,7 @@ def make_instance(self, include_optional) -> ValidationError: model = ValidationError() if include_optional: return ValidationError( - ctx = airflow_client.client.models.context.Context(), + ctx = { }, input = None, loc = [ null diff --git a/test/test_variable_body.py b/test/test_variable_body.py index eb83a8e9..fb0fc775 100644 --- a/test/test_variable_body.py +++ b/test/test_variable_body.py @@ -36,13 +36,13 @@ def make_instance(self, include_optional) -> VariableBody: if include_optional: return VariableBody( description = '', - key = '', + key = 'o', team_name = '', value = None ) else: return VariableBody( - key = '', + key = 'o', value = None, ) """ diff --git a/test/test_warning_type.py b/test/test_warning_type.py new file mode 100644 index 00000000..ea7ec8fc --- /dev/null +++ b/test/test_warning_type.py @@ -0,0 +1,50 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.warning_type import WarningType + +class TestWarningType(unittest.TestCase): + """WarningType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> WarningType: + """Test WarningType + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `WarningType` + """ + model = WarningType() + if include_optional: + return WarningType( + ) + else: + return WarningType( + ) + """ + + def testWarningType(self): + """Test WarningType""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_warning_type1.py b/test/test_warning_type1.py new file mode 100644 index 00000000..04bc4b28 --- /dev/null +++ b/test/test_warning_type1.py @@ -0,0 +1,50 @@ +# coding: utf-8 + +""" + Airflow API + + Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. + + The version of the OpenAPI document: 2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from airflow_client.client.models.warning_type1 import WarningType1 + +class TestWarningType1(unittest.TestCase): + """WarningType1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> WarningType1: + """Test WarningType1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `WarningType1` + """ + model = WarningType1() + if include_optional: + return WarningType1( + ) + else: + return WarningType1( + ) + """ + + def testWarningType1(self): + """Test WarningType1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_x_com_collection_response.py b/test/test_x_com_collection_response.py index 765c6b89..4ba15992 100644 --- a/test/test_x_com_collection_response.py +++ b/test/test_x_com_collection_response.py @@ -43,10 +43,13 @@ def make_instance(self, include_optional) -> XComCollectionResponse: key = '', logical_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), map_index = 56, + region_id = '', + region_index = 56, run_after = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), run_id = '', task_display_name = '', task_id = '', + team_name = '', timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ] ) @@ -60,10 +63,13 @@ def make_instance(self, include_optional) -> XComCollectionResponse: key = '', logical_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), map_index = 56, + region_id = '', + region_index = 56, run_after = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), run_id = '', task_display_name = '', task_id = '', + team_name = '', timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], ) diff --git a/test/test_x_com_create_body.py b/test/test_x_com_create_body.py index 696bb2cf..8e096179 100644 --- a/test/test_x_com_create_body.py +++ b/test/test_x_com_create_body.py @@ -37,6 +37,8 @@ def make_instance(self, include_optional) -> XComCreateBody: return XComCreateBody( key = '', map_index = 56, + region_id = '', + region_index = -1.0, value = None ) else: diff --git a/test/test_x_com_response.py b/test/test_x_com_response.py index d8a7d888..8b1950a6 100644 --- a/test/test_x_com_response.py +++ b/test/test_x_com_response.py @@ -40,10 +40,13 @@ def make_instance(self, include_optional) -> XComResponse: key = '', logical_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), map_index = 56, + region_id = '', + region_index = 56, run_after = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), run_id = '', task_display_name = '', task_id = '', + team_name = '', timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) else: diff --git a/test/test_x_com_response_native.py b/test/test_x_com_response_native.py index bb83c367..30c266d6 100644 --- a/test/test_x_com_response_native.py +++ b/test/test_x_com_response_native.py @@ -40,10 +40,13 @@ def make_instance(self, include_optional) -> XComResponseNative: key = '', logical_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), map_index = 56, + region_id = '', + region_index = 56, run_after = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), run_id = '', task_display_name = '', task_id = '', + team_name = '', timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), value = None ) diff --git a/test/test_x_com_response_string.py b/test/test_x_com_response_string.py index 8f7d1945..20b4b11e 100644 --- a/test/test_x_com_response_string.py +++ b/test/test_x_com_response_string.py @@ -40,10 +40,13 @@ def make_instance(self, include_optional) -> XComResponseString: key = '', logical_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), map_index = 56, + region_id = '', + region_index = 56, run_after = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), run_id = '', task_display_name = '', task_id = '', + team_name = '', timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), value = '' ) diff --git a/test/test_x_com_update_body.py b/test/test_x_com_update_body.py index e4130c51..034b48db 100644 --- a/test/test_x_com_update_body.py +++ b/test/test_x_com_update_body.py @@ -36,6 +36,8 @@ def make_instance(self, include_optional) -> XComUpdateBody: if include_optional: return XComUpdateBody( map_index = 56, + region_id = '', + region_index = -1.0, value = None ) else: diff --git a/test_python_client.py b/test_python_client.py index 6be0af3f..8edc3695 100644 --- a/test_python_client.py +++ b/test_python_client.py @@ -17,7 +17,7 @@ # # PEP 723 compliant inline script metadata (not yet widely supported) # /// script -# requires-python = ">=3.10" +# requires-python = ">=3.11" # dependencies = [ # "apache-airflow-client", # "rich>=13.6.0", diff --git a/version.txt b/version.txt index 47725433..18091983 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -3.3.2 +3.4.0