hatchet-sdk 0.47.0__py3-none-any.whl → 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hatchet_sdk/__init__.py +25 -16
- hatchet_sdk/client.py +14 -39
- hatchet_sdk/clients/admin.py +203 -362
- hatchet_sdk/clients/dispatcher/action_listener.py +106 -84
- hatchet_sdk/clients/dispatcher/dispatcher.py +21 -21
- hatchet_sdk/clients/event_ts.py +23 -10
- hatchet_sdk/clients/events.py +96 -99
- hatchet_sdk/clients/rest/__init__.py +24 -0
- hatchet_sdk/clients/rest/api/__init__.py +2 -0
- hatchet_sdk/clients/rest/api/task_api.py +2174 -0
- hatchet_sdk/clients/rest/api/workflow_runs_api.py +638 -106
- hatchet_sdk/clients/rest/api_client.py +1 -1
- hatchet_sdk/clients/rest/configuration.py +8 -1
- hatchet_sdk/clients/rest/exceptions.py +21 -0
- hatchet_sdk/clients/rest/models/__init__.py +22 -0
- hatchet_sdk/clients/rest/models/tenant.py +4 -0
- hatchet_sdk/clients/rest/models/tenant_version.py +37 -0
- hatchet_sdk/clients/rest/models/update_tenant_request.py +7 -0
- hatchet_sdk/clients/rest/models/v1_cancel_task_request.py +104 -0
- hatchet_sdk/clients/rest/models/v1_dag_children.py +102 -0
- hatchet_sdk/clients/rest/models/v1_replay_task_request.py +104 -0
- hatchet_sdk/clients/rest/models/v1_task.py +174 -0
- hatchet_sdk/clients/rest/models/v1_task_event.py +118 -0
- hatchet_sdk/clients/rest/models/v1_task_event_list.py +110 -0
- hatchet_sdk/clients/rest/models/v1_task_event_type.py +55 -0
- hatchet_sdk/clients/rest/models/v1_task_filter.py +106 -0
- hatchet_sdk/clients/rest/models/v1_task_point_metric.py +92 -0
- hatchet_sdk/clients/rest/models/v1_task_point_metrics.py +100 -0
- hatchet_sdk/clients/rest/models/v1_task_run_metric.py +88 -0
- hatchet_sdk/clients/rest/models/v1_task_run_status.py +40 -0
- hatchet_sdk/clients/rest/models/v1_task_status.py +40 -0
- hatchet_sdk/clients/rest/models/v1_task_summary.py +212 -0
- hatchet_sdk/clients/rest/models/v1_task_summary_list.py +110 -0
- hatchet_sdk/clients/rest/models/v1_workflow_run.py +171 -0
- hatchet_sdk/clients/rest/models/v1_workflow_run_details.py +145 -0
- hatchet_sdk/clients/rest/models/v1_workflow_type.py +37 -0
- hatchet_sdk/clients/rest/models/workflow_run_shape_item_for_workflow_run_details.py +99 -0
- hatchet_sdk/clients/rest/rest.py +37 -26
- hatchet_sdk/clients/rest/tenacity_utils.py +1 -1
- hatchet_sdk/clients/rest_client.py +141 -116
- hatchet_sdk/clients/run_event_listener.py +66 -60
- hatchet_sdk/clients/workflow_listener.py +75 -66
- hatchet_sdk/config.py +117 -0
- hatchet_sdk/connection.py +27 -13
- hatchet_sdk/context/__init__.py +0 -1
- hatchet_sdk/context/context.py +118 -218
- hatchet_sdk/features/cron.py +43 -57
- hatchet_sdk/features/scheduled.py +60 -74
- hatchet_sdk/hatchet.py +192 -195
- hatchet_sdk/labels.py +4 -6
- hatchet_sdk/metadata.py +1 -1
- hatchet_sdk/opentelemetry/instrumentor.py +9 -5
- hatchet_sdk/rate_limit.py +9 -18
- hatchet_sdk/token.py +13 -9
- hatchet_sdk/utils/aio_utils.py +0 -40
- hatchet_sdk/utils/proto_enums.py +54 -0
- hatchet_sdk/utils/typing.py +9 -1
- hatchet_sdk/v0/__init__.py +251 -0
- hatchet_sdk/v0/client.py +119 -0
- hatchet_sdk/v0/clients/admin.py +541 -0
- hatchet_sdk/v0/clients/dispatcher/action_listener.py +422 -0
- hatchet_sdk/v0/clients/dispatcher/dispatcher.py +204 -0
- hatchet_sdk/v0/clients/event_ts.py +28 -0
- hatchet_sdk/v0/clients/events.py +182 -0
- hatchet_sdk/v0/clients/rest/__init__.py +307 -0
- hatchet_sdk/v0/clients/rest/api/__init__.py +19 -0
- hatchet_sdk/v0/clients/rest/api/api_token_api.py +858 -0
- hatchet_sdk/v0/clients/rest/api/default_api.py +2259 -0
- hatchet_sdk/v0/clients/rest/api/event_api.py +2548 -0
- hatchet_sdk/v0/clients/rest/api/github_api.py +331 -0
- hatchet_sdk/v0/clients/rest/api/healthcheck_api.py +483 -0
- hatchet_sdk/v0/clients/rest/api/log_api.py +449 -0
- hatchet_sdk/v0/clients/rest/api/metadata_api.py +728 -0
- hatchet_sdk/v0/clients/rest/api/rate_limits_api.py +423 -0
- hatchet_sdk/v0/clients/rest/api/slack_api.py +577 -0
- hatchet_sdk/v0/clients/rest/api/sns_api.py +872 -0
- hatchet_sdk/v0/clients/rest/api/step_run_api.py +2202 -0
- hatchet_sdk/v0/clients/rest/api/tenant_api.py +4430 -0
- hatchet_sdk/v0/clients/rest/api/user_api.py +2888 -0
- hatchet_sdk/v0/clients/rest/api/worker_api.py +858 -0
- hatchet_sdk/v0/clients/rest/api/workflow_api.py +6312 -0
- hatchet_sdk/v0/clients/rest/api/workflow_run_api.py +1932 -0
- hatchet_sdk/v0/clients/rest/api/workflow_runs_api.py +610 -0
- hatchet_sdk/v0/clients/rest/api_client.py +759 -0
- hatchet_sdk/v0/clients/rest/api_response.py +22 -0
- hatchet_sdk/v0/clients/rest/configuration.py +611 -0
- hatchet_sdk/v0/clients/rest/exceptions.py +200 -0
- hatchet_sdk/v0/clients/rest/models/__init__.py +274 -0
- hatchet_sdk/v0/clients/rest/models/accept_invite_request.py +83 -0
- hatchet_sdk/v0/clients/rest/models/api_error.py +102 -0
- hatchet_sdk/v0/clients/rest/models/api_errors.py +100 -0
- hatchet_sdk/v0/clients/rest/models/api_meta.py +144 -0
- hatchet_sdk/v0/clients/rest/models/api_meta_auth.py +85 -0
- hatchet_sdk/v0/clients/rest/models/api_meta_integration.py +88 -0
- hatchet_sdk/v0/clients/rest/models/api_meta_posthog.py +90 -0
- hatchet_sdk/v0/clients/rest/models/api_resource_meta.py +98 -0
- hatchet_sdk/v0/clients/rest/models/api_token.py +105 -0
- hatchet_sdk/v0/clients/rest/models/bulk_create_event_request.py +100 -0
- hatchet_sdk/v0/clients/rest/models/bulk_create_event_response.py +110 -0
- hatchet_sdk/v0/clients/rest/models/cancel_event_request.py +85 -0
- hatchet_sdk/v0/clients/rest/models/cancel_step_run_request.py +83 -0
- hatchet_sdk/v0/clients/rest/models/concurrency_limit_strategy.py +39 -0
- hatchet_sdk/v0/clients/rest/models/create_api_token_request.py +92 -0
- hatchet_sdk/v0/clients/rest/models/create_api_token_response.py +83 -0
- hatchet_sdk/v0/clients/rest/models/create_cron_workflow_trigger_request.py +98 -0
- hatchet_sdk/v0/clients/rest/models/create_event_request.py +95 -0
- hatchet_sdk/v0/clients/rest/models/create_pull_request_from_step_run.py +83 -0
- hatchet_sdk/v0/clients/rest/models/create_sns_integration_request.py +85 -0
- hatchet_sdk/v0/clients/rest/models/create_tenant_alert_email_group_request.py +83 -0
- hatchet_sdk/v0/clients/rest/models/create_tenant_invite_request.py +86 -0
- hatchet_sdk/v0/clients/rest/models/create_tenant_request.py +84 -0
- hatchet_sdk/v0/clients/rest/models/cron_workflows.py +131 -0
- hatchet_sdk/v0/clients/rest/models/cron_workflows_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/cron_workflows_method.py +37 -0
- hatchet_sdk/v0/clients/rest/models/cron_workflows_order_by_field.py +37 -0
- hatchet_sdk/v0/clients/rest/models/event.py +143 -0
- hatchet_sdk/v0/clients/rest/models/event_data.py +83 -0
- hatchet_sdk/v0/clients/rest/models/event_key_list.py +98 -0
- hatchet_sdk/v0/clients/rest/models/event_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/event_order_by_direction.py +37 -0
- hatchet_sdk/v0/clients/rest/models/event_order_by_field.py +36 -0
- hatchet_sdk/v0/clients/rest/models/event_update_cancel200_response.py +85 -0
- hatchet_sdk/v0/clients/rest/models/event_workflow_run_summary.py +116 -0
- hatchet_sdk/v0/clients/rest/models/events.py +110 -0
- hatchet_sdk/v0/clients/rest/models/get_step_run_diff_response.py +100 -0
- hatchet_sdk/v0/clients/rest/models/github_app_installation.py +107 -0
- hatchet_sdk/v0/clients/rest/models/github_branch.py +86 -0
- hatchet_sdk/v0/clients/rest/models/github_repo.py +86 -0
- hatchet_sdk/v0/clients/rest/models/info_get_version200_response.py +83 -0
- hatchet_sdk/v0/clients/rest/models/job.py +132 -0
- hatchet_sdk/v0/clients/rest/models/job_run.py +176 -0
- hatchet_sdk/v0/clients/rest/models/job_run_status.py +41 -0
- hatchet_sdk/v0/clients/rest/models/link_github_repository_request.py +106 -0
- hatchet_sdk/v0/clients/rest/models/list_api_tokens_response.py +110 -0
- hatchet_sdk/v0/clients/rest/models/list_github_app_installations_response.py +112 -0
- hatchet_sdk/v0/clients/rest/models/list_pull_requests_response.py +100 -0
- hatchet_sdk/v0/clients/rest/models/list_slack_webhooks.py +110 -0
- hatchet_sdk/v0/clients/rest/models/list_sns_integrations.py +110 -0
- hatchet_sdk/v0/clients/rest/models/log_line.py +94 -0
- hatchet_sdk/v0/clients/rest/models/log_line_level.py +39 -0
- hatchet_sdk/v0/clients/rest/models/log_line_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/log_line_order_by_direction.py +37 -0
- hatchet_sdk/v0/clients/rest/models/log_line_order_by_field.py +36 -0
- hatchet_sdk/v0/clients/rest/models/pagination_response.py +95 -0
- hatchet_sdk/v0/clients/rest/models/pull_request.py +112 -0
- hatchet_sdk/v0/clients/rest/models/pull_request_state.py +37 -0
- hatchet_sdk/v0/clients/rest/models/queue_metrics.py +97 -0
- hatchet_sdk/v0/clients/rest/models/rate_limit.py +117 -0
- hatchet_sdk/v0/clients/rest/models/rate_limit_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/rate_limit_order_by_direction.py +37 -0
- hatchet_sdk/v0/clients/rest/models/rate_limit_order_by_field.py +38 -0
- hatchet_sdk/v0/clients/rest/models/recent_step_runs.py +118 -0
- hatchet_sdk/v0/clients/rest/models/reject_invite_request.py +83 -0
- hatchet_sdk/v0/clients/rest/models/replay_event_request.py +85 -0
- hatchet_sdk/v0/clients/rest/models/replay_workflow_runs_request.py +85 -0
- hatchet_sdk/v0/clients/rest/models/replay_workflow_runs_response.py +100 -0
- hatchet_sdk/v0/clients/rest/models/rerun_step_run_request.py +83 -0
- hatchet_sdk/v0/clients/rest/models/schedule_workflow_run_request.py +92 -0
- hatchet_sdk/v0/clients/rest/models/scheduled_run_status.py +42 -0
- hatchet_sdk/v0/clients/rest/models/scheduled_workflows.py +149 -0
- hatchet_sdk/v0/clients/rest/models/scheduled_workflows_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/scheduled_workflows_method.py +37 -0
- hatchet_sdk/v0/clients/rest/models/scheduled_workflows_order_by_field.py +37 -0
- hatchet_sdk/v0/clients/rest/models/semaphore_slots.py +113 -0
- hatchet_sdk/v0/clients/rest/models/slack_webhook.py +127 -0
- hatchet_sdk/v0/clients/rest/models/sns_integration.py +114 -0
- hatchet_sdk/v0/clients/rest/models/step.py +123 -0
- hatchet_sdk/v0/clients/rest/models/step_run.py +202 -0
- hatchet_sdk/v0/clients/rest/models/step_run_archive.py +142 -0
- hatchet_sdk/v0/clients/rest/models/step_run_archive_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/step_run_diff.py +91 -0
- hatchet_sdk/v0/clients/rest/models/step_run_event.py +122 -0
- hatchet_sdk/v0/clients/rest/models/step_run_event_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/step_run_event_reason.py +52 -0
- hatchet_sdk/v0/clients/rest/models/step_run_event_severity.py +38 -0
- hatchet_sdk/v0/clients/rest/models/step_run_status.py +44 -0
- hatchet_sdk/v0/clients/rest/models/tenant.py +118 -0
- hatchet_sdk/v0/clients/rest/models/tenant_alert_email_group.py +98 -0
- hatchet_sdk/v0/clients/rest/models/tenant_alert_email_group_list.py +112 -0
- hatchet_sdk/v0/clients/rest/models/tenant_alerting_settings.py +143 -0
- hatchet_sdk/v0/clients/rest/models/tenant_invite.py +120 -0
- hatchet_sdk/v0/clients/rest/models/tenant_invite_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/tenant_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/tenant_member.py +123 -0
- hatchet_sdk/v0/clients/rest/models/tenant_member_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/tenant_member_role.py +38 -0
- hatchet_sdk/v0/clients/rest/models/tenant_queue_metrics.py +116 -0
- hatchet_sdk/v0/clients/rest/models/tenant_resource.py +40 -0
- hatchet_sdk/v0/clients/rest/models/tenant_resource_limit.py +135 -0
- hatchet_sdk/v0/clients/rest/models/tenant_resource_policy.py +102 -0
- hatchet_sdk/v0/clients/rest/models/tenant_step_run_queue_metrics.py +83 -0
- hatchet_sdk/v0/clients/rest/models/trigger_workflow_run_request.py +91 -0
- hatchet_sdk/v0/clients/rest/models/update_tenant_alert_email_group_request.py +83 -0
- hatchet_sdk/v0/clients/rest/models/update_tenant_invite_request.py +85 -0
- hatchet_sdk/v0/clients/rest/models/update_tenant_request.py +137 -0
- hatchet_sdk/v0/clients/rest/models/update_worker_request.py +87 -0
- hatchet_sdk/v0/clients/rest/models/user.py +126 -0
- hatchet_sdk/v0/clients/rest/models/user_change_password_request.py +88 -0
- hatchet_sdk/v0/clients/rest/models/user_login_request.py +86 -0
- hatchet_sdk/v0/clients/rest/models/user_register_request.py +91 -0
- hatchet_sdk/v0/clients/rest/models/user_tenant_memberships_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/user_tenant_public.py +86 -0
- hatchet_sdk/v0/clients/rest/models/webhook_worker.py +100 -0
- hatchet_sdk/v0/clients/rest/models/webhook_worker_create_request.py +94 -0
- hatchet_sdk/v0/clients/rest/models/webhook_worker_create_response.py +98 -0
- hatchet_sdk/v0/clients/rest/models/webhook_worker_created.py +102 -0
- hatchet_sdk/v0/clients/rest/models/webhook_worker_list_response.py +110 -0
- hatchet_sdk/v0/clients/rest/models/webhook_worker_request.py +102 -0
- hatchet_sdk/v0/clients/rest/models/webhook_worker_request_list_response.py +104 -0
- hatchet_sdk/v0/clients/rest/models/webhook_worker_request_method.py +38 -0
- hatchet_sdk/v0/clients/rest/models/worker.py +239 -0
- hatchet_sdk/v0/clients/rest/models/worker_label.py +102 -0
- hatchet_sdk/v0/clients/rest/models/worker_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/worker_runtime_info.py +103 -0
- hatchet_sdk/v0/clients/rest/models/worker_runtime_sdks.py +38 -0
- hatchet_sdk/v0/clients/rest/models/worker_type.py +38 -0
- hatchet_sdk/v0/clients/rest/models/workflow.py +165 -0
- hatchet_sdk/v0/clients/rest/models/workflow_concurrency.py +107 -0
- hatchet_sdk/v0/clients/rest/models/workflow_deployment_config.py +136 -0
- hatchet_sdk/v0/clients/rest/models/workflow_kind.py +38 -0
- hatchet_sdk/v0/clients/rest/models/workflow_list.py +120 -0
- hatchet_sdk/v0/clients/rest/models/workflow_metrics.py +97 -0
- hatchet_sdk/v0/clients/rest/models/workflow_run.py +188 -0
- hatchet_sdk/v0/clients/rest/models/workflow_run_cancel200_response.py +85 -0
- hatchet_sdk/v0/clients/rest/models/workflow_run_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/workflow_run_order_by_direction.py +37 -0
- hatchet_sdk/v0/clients/rest/models/workflow_run_order_by_field.py +39 -0
- hatchet_sdk/v0/clients/rest/models/workflow_run_shape.py +186 -0
- hatchet_sdk/v0/clients/rest/models/workflow_run_status.py +42 -0
- hatchet_sdk/v0/clients/rest/models/workflow_run_triggered_by.py +112 -0
- hatchet_sdk/v0/clients/rest/models/workflow_runs_cancel_request.py +85 -0
- hatchet_sdk/v0/clients/rest/models/workflow_runs_metrics.py +94 -0
- hatchet_sdk/v0/clients/rest/models/workflow_runs_metrics_counts.py +104 -0
- hatchet_sdk/v0/clients/rest/models/workflow_tag.py +84 -0
- hatchet_sdk/v0/clients/rest/models/workflow_trigger_cron_ref.py +86 -0
- hatchet_sdk/v0/clients/rest/models/workflow_trigger_event_ref.py +86 -0
- hatchet_sdk/v0/clients/rest/models/workflow_triggers.py +141 -0
- hatchet_sdk/v0/clients/rest/models/workflow_update_request.py +85 -0
- hatchet_sdk/v0/clients/rest/models/workflow_version.py +170 -0
- hatchet_sdk/v0/clients/rest/models/workflow_version_concurrency.py +114 -0
- hatchet_sdk/v0/clients/rest/models/workflow_version_definition.py +85 -0
- hatchet_sdk/v0/clients/rest/models/workflow_version_meta.py +123 -0
- hatchet_sdk/v0/clients/rest/models/workflow_workers_count.py +95 -0
- hatchet_sdk/v0/clients/rest/rest.py +187 -0
- hatchet_sdk/v0/clients/rest/tenacity_utils.py +39 -0
- hatchet_sdk/v0/clients/rest_client.py +613 -0
- hatchet_sdk/v0/clients/run_event_listener.py +260 -0
- hatchet_sdk/v0/clients/workflow_listener.py +277 -0
- hatchet_sdk/v0/connection.py +63 -0
- hatchet_sdk/v0/context/__init__.py +1 -0
- hatchet_sdk/v0/context/context.py +446 -0
- hatchet_sdk/v0/context/worker_context.py +28 -0
- hatchet_sdk/v0/contracts/dispatcher_pb2.py +102 -0
- hatchet_sdk/v0/contracts/dispatcher_pb2.pyi +387 -0
- hatchet_sdk/v0/contracts/dispatcher_pb2_grpc.py +621 -0
- hatchet_sdk/v0/contracts/events_pb2.py +46 -0
- hatchet_sdk/v0/contracts/events_pb2.pyi +87 -0
- hatchet_sdk/v0/contracts/events_pb2_grpc.py +274 -0
- hatchet_sdk/v0/contracts/workflows_pb2.py +80 -0
- hatchet_sdk/v0/contracts/workflows_pb2.pyi +312 -0
- hatchet_sdk/v0/contracts/workflows_pb2_grpc.py +277 -0
- hatchet_sdk/v0/features/cron.py +286 -0
- hatchet_sdk/v0/features/scheduled.py +248 -0
- hatchet_sdk/v0/hatchet.py +310 -0
- hatchet_sdk/v0/labels.py +10 -0
- hatchet_sdk/v0/logger.py +13 -0
- hatchet_sdk/v0/metadata.py +2 -0
- hatchet_sdk/v0/opentelemetry/instrumentor.py +396 -0
- hatchet_sdk/v0/rate_limit.py +126 -0
- hatchet_sdk/v0/semver.py +30 -0
- hatchet_sdk/v0/token.py +27 -0
- hatchet_sdk/v0/utils/aio_utils.py +137 -0
- hatchet_sdk/v0/utils/backoff.py +9 -0
- hatchet_sdk/v0/utils/typing.py +12 -0
- hatchet_sdk/{v2 → v0/v2}/callable.py +8 -8
- hatchet_sdk/{v2 → v0/v2}/concurrency.py +2 -2
- hatchet_sdk/{v2 → v0/v2}/hatchet.py +10 -10
- hatchet_sdk/v0/worker/__init__.py +1 -0
- hatchet_sdk/v0/worker/action_listener_process.py +278 -0
- hatchet_sdk/v0/worker/runner/run_loop_manager.py +112 -0
- hatchet_sdk/v0/worker/runner/runner.py +460 -0
- hatchet_sdk/v0/worker/runner/utils/capture_logs.py +81 -0
- hatchet_sdk/v0/worker/runner/utils/error_with_traceback.py +6 -0
- hatchet_sdk/v0/worker/worker.py +391 -0
- hatchet_sdk/v0/workflow.py +261 -0
- hatchet_sdk/v0/workflow_run.py +59 -0
- hatchet_sdk/worker/__init__.py +0 -1
- hatchet_sdk/worker/action_listener_process.py +36 -33
- hatchet_sdk/worker/runner/run_loop_manager.py +18 -16
- hatchet_sdk/worker/runner/runner.py +32 -60
- hatchet_sdk/worker/runner/utils/capture_logs.py +25 -14
- hatchet_sdk/worker/runner/utils/error_with_traceback.py +1 -1
- hatchet_sdk/worker/worker.py +61 -75
- hatchet_sdk/workflow.py +473 -207
- hatchet_sdk/workflow_run.py +5 -18
- {hatchet_sdk-0.47.0.dist-info → hatchet_sdk-1.0.0.dist-info}/METADATA +2 -1
- hatchet_sdk-1.0.0.dist-info/RECORD +485 -0
- hatchet_sdk/utils/serialization.py +0 -18
- hatchet_sdk-0.47.0.dist-info/RECORD +0 -237
- /hatchet_sdk/{loader.py → v0/loader.py} +0 -0
- /hatchet_sdk/{utils → v0/utils}/types.py +0 -0
- {hatchet_sdk-0.47.0.dist-info → hatchet_sdk-1.0.0.dist-info}/WHEEL +0 -0
- {hatchet_sdk-0.47.0.dist-info → hatchet_sdk-1.0.0.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,2174 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hatchet API
|
|
5
|
+
|
|
6
|
+
The Hatchet API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from datetime import datetime
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
|
|
18
|
+
from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
|
|
19
|
+
from typing_extensions import Annotated
|
|
20
|
+
|
|
21
|
+
from hatchet_sdk.clients.rest.api_client import ApiClient, RequestSerialized
|
|
22
|
+
from hatchet_sdk.clients.rest.api_response import ApiResponse
|
|
23
|
+
from hatchet_sdk.clients.rest.models.v1_cancel_task_request import V1CancelTaskRequest
|
|
24
|
+
from hatchet_sdk.clients.rest.models.v1_dag_children import V1DagChildren
|
|
25
|
+
from hatchet_sdk.clients.rest.models.v1_replay_task_request import V1ReplayTaskRequest
|
|
26
|
+
from hatchet_sdk.clients.rest.models.v1_task import V1Task
|
|
27
|
+
from hatchet_sdk.clients.rest.models.v1_task_event_list import V1TaskEventList
|
|
28
|
+
from hatchet_sdk.clients.rest.models.v1_task_point_metrics import V1TaskPointMetrics
|
|
29
|
+
from hatchet_sdk.clients.rest.models.v1_task_run_metric import V1TaskRunMetric
|
|
30
|
+
from hatchet_sdk.clients.rest.rest import RESTResponseType
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class TaskApi:
|
|
34
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
35
|
+
Ref: https://openapi-generator.tech
|
|
36
|
+
|
|
37
|
+
Do not edit the class manually.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
def __init__(self, api_client=None) -> None:
|
|
41
|
+
if api_client is None:
|
|
42
|
+
api_client = ApiClient.get_default()
|
|
43
|
+
self.api_client = api_client
|
|
44
|
+
|
|
45
|
+
@validate_call
|
|
46
|
+
async def v1_dag_list_tasks(
|
|
47
|
+
self,
|
|
48
|
+
dag_ids: Annotated[
|
|
49
|
+
List[Annotated[str, Field(min_length=36, strict=True, max_length=36)]],
|
|
50
|
+
Field(description="The external id of the DAG"),
|
|
51
|
+
],
|
|
52
|
+
tenant: Annotated[
|
|
53
|
+
str,
|
|
54
|
+
Field(
|
|
55
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
56
|
+
),
|
|
57
|
+
],
|
|
58
|
+
_request_timeout: Union[
|
|
59
|
+
None,
|
|
60
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
61
|
+
Tuple[
|
|
62
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
63
|
+
],
|
|
64
|
+
] = None,
|
|
65
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
66
|
+
_content_type: Optional[StrictStr] = None,
|
|
67
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
68
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
69
|
+
) -> List[V1DagChildren]:
|
|
70
|
+
"""List tasks
|
|
71
|
+
|
|
72
|
+
Lists all tasks that belong a specific list of dags
|
|
73
|
+
|
|
74
|
+
:param dag_ids: The external id of the DAG (required)
|
|
75
|
+
:type dag_ids: List[str]
|
|
76
|
+
:param tenant: The tenant id (required)
|
|
77
|
+
:type tenant: str
|
|
78
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
79
|
+
number provided, it will be total request
|
|
80
|
+
timeout. It can also be a pair (tuple) of
|
|
81
|
+
(connection, read) timeouts.
|
|
82
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
83
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
84
|
+
request; this effectively ignores the
|
|
85
|
+
authentication in the spec for a single request.
|
|
86
|
+
:type _request_auth: dict, optional
|
|
87
|
+
:param _content_type: force content-type for the request.
|
|
88
|
+
:type _content_type: str, Optional
|
|
89
|
+
:param _headers: set to override the headers for a single
|
|
90
|
+
request; this effectively ignores the headers
|
|
91
|
+
in the spec for a single request.
|
|
92
|
+
:type _headers: dict, optional
|
|
93
|
+
:param _host_index: set to override the host_index for a single
|
|
94
|
+
request; this effectively ignores the host_index
|
|
95
|
+
in the spec for a single request.
|
|
96
|
+
:type _host_index: int, optional
|
|
97
|
+
:return: Returns the result object.
|
|
98
|
+
""" # noqa: E501
|
|
99
|
+
|
|
100
|
+
_param = self._v1_dag_list_tasks_serialize(
|
|
101
|
+
dag_ids=dag_ids,
|
|
102
|
+
tenant=tenant,
|
|
103
|
+
_request_auth=_request_auth,
|
|
104
|
+
_content_type=_content_type,
|
|
105
|
+
_headers=_headers,
|
|
106
|
+
_host_index=_host_index,
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
110
|
+
"200": "List[V1DagChildren]",
|
|
111
|
+
"400": "APIErrors",
|
|
112
|
+
"403": "APIErrors",
|
|
113
|
+
"501": "APIErrors",
|
|
114
|
+
}
|
|
115
|
+
response_data = await self.api_client.call_api(
|
|
116
|
+
*_param, _request_timeout=_request_timeout
|
|
117
|
+
)
|
|
118
|
+
await response_data.read()
|
|
119
|
+
return self.api_client.response_deserialize(
|
|
120
|
+
response_data=response_data,
|
|
121
|
+
response_types_map=_response_types_map,
|
|
122
|
+
).data
|
|
123
|
+
|
|
124
|
+
@validate_call
|
|
125
|
+
async def v1_dag_list_tasks_with_http_info(
|
|
126
|
+
self,
|
|
127
|
+
dag_ids: Annotated[
|
|
128
|
+
List[Annotated[str, Field(min_length=36, strict=True, max_length=36)]],
|
|
129
|
+
Field(description="The external id of the DAG"),
|
|
130
|
+
],
|
|
131
|
+
tenant: Annotated[
|
|
132
|
+
str,
|
|
133
|
+
Field(
|
|
134
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
135
|
+
),
|
|
136
|
+
],
|
|
137
|
+
_request_timeout: Union[
|
|
138
|
+
None,
|
|
139
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
140
|
+
Tuple[
|
|
141
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
142
|
+
],
|
|
143
|
+
] = None,
|
|
144
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
145
|
+
_content_type: Optional[StrictStr] = None,
|
|
146
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
147
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
148
|
+
) -> ApiResponse[List[V1DagChildren]]:
|
|
149
|
+
"""List tasks
|
|
150
|
+
|
|
151
|
+
Lists all tasks that belong a specific list of dags
|
|
152
|
+
|
|
153
|
+
:param dag_ids: The external id of the DAG (required)
|
|
154
|
+
:type dag_ids: List[str]
|
|
155
|
+
:param tenant: The tenant id (required)
|
|
156
|
+
:type tenant: str
|
|
157
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
158
|
+
number provided, it will be total request
|
|
159
|
+
timeout. It can also be a pair (tuple) of
|
|
160
|
+
(connection, read) timeouts.
|
|
161
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
162
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
163
|
+
request; this effectively ignores the
|
|
164
|
+
authentication in the spec for a single request.
|
|
165
|
+
:type _request_auth: dict, optional
|
|
166
|
+
:param _content_type: force content-type for the request.
|
|
167
|
+
:type _content_type: str, Optional
|
|
168
|
+
:param _headers: set to override the headers for a single
|
|
169
|
+
request; this effectively ignores the headers
|
|
170
|
+
in the spec for a single request.
|
|
171
|
+
:type _headers: dict, optional
|
|
172
|
+
:param _host_index: set to override the host_index for a single
|
|
173
|
+
request; this effectively ignores the host_index
|
|
174
|
+
in the spec for a single request.
|
|
175
|
+
:type _host_index: int, optional
|
|
176
|
+
:return: Returns the result object.
|
|
177
|
+
""" # noqa: E501
|
|
178
|
+
|
|
179
|
+
_param = self._v1_dag_list_tasks_serialize(
|
|
180
|
+
dag_ids=dag_ids,
|
|
181
|
+
tenant=tenant,
|
|
182
|
+
_request_auth=_request_auth,
|
|
183
|
+
_content_type=_content_type,
|
|
184
|
+
_headers=_headers,
|
|
185
|
+
_host_index=_host_index,
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
189
|
+
"200": "List[V1DagChildren]",
|
|
190
|
+
"400": "APIErrors",
|
|
191
|
+
"403": "APIErrors",
|
|
192
|
+
"501": "APIErrors",
|
|
193
|
+
}
|
|
194
|
+
response_data = await self.api_client.call_api(
|
|
195
|
+
*_param, _request_timeout=_request_timeout
|
|
196
|
+
)
|
|
197
|
+
await response_data.read()
|
|
198
|
+
return self.api_client.response_deserialize(
|
|
199
|
+
response_data=response_data,
|
|
200
|
+
response_types_map=_response_types_map,
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
@validate_call
|
|
204
|
+
async def v1_dag_list_tasks_without_preload_content(
|
|
205
|
+
self,
|
|
206
|
+
dag_ids: Annotated[
|
|
207
|
+
List[Annotated[str, Field(min_length=36, strict=True, max_length=36)]],
|
|
208
|
+
Field(description="The external id of the DAG"),
|
|
209
|
+
],
|
|
210
|
+
tenant: Annotated[
|
|
211
|
+
str,
|
|
212
|
+
Field(
|
|
213
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
214
|
+
),
|
|
215
|
+
],
|
|
216
|
+
_request_timeout: Union[
|
|
217
|
+
None,
|
|
218
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
219
|
+
Tuple[
|
|
220
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
221
|
+
],
|
|
222
|
+
] = None,
|
|
223
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
224
|
+
_content_type: Optional[StrictStr] = None,
|
|
225
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
226
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
227
|
+
) -> RESTResponseType:
|
|
228
|
+
"""List tasks
|
|
229
|
+
|
|
230
|
+
Lists all tasks that belong a specific list of dags
|
|
231
|
+
|
|
232
|
+
:param dag_ids: The external id of the DAG (required)
|
|
233
|
+
:type dag_ids: List[str]
|
|
234
|
+
:param tenant: The tenant id (required)
|
|
235
|
+
:type tenant: str
|
|
236
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
237
|
+
number provided, it will be total request
|
|
238
|
+
timeout. It can also be a pair (tuple) of
|
|
239
|
+
(connection, read) timeouts.
|
|
240
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
241
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
242
|
+
request; this effectively ignores the
|
|
243
|
+
authentication in the spec for a single request.
|
|
244
|
+
:type _request_auth: dict, optional
|
|
245
|
+
:param _content_type: force content-type for the request.
|
|
246
|
+
:type _content_type: str, Optional
|
|
247
|
+
:param _headers: set to override the headers for a single
|
|
248
|
+
request; this effectively ignores the headers
|
|
249
|
+
in the spec for a single request.
|
|
250
|
+
:type _headers: dict, optional
|
|
251
|
+
:param _host_index: set to override the host_index for a single
|
|
252
|
+
request; this effectively ignores the host_index
|
|
253
|
+
in the spec for a single request.
|
|
254
|
+
:type _host_index: int, optional
|
|
255
|
+
:return: Returns the result object.
|
|
256
|
+
""" # noqa: E501
|
|
257
|
+
|
|
258
|
+
_param = self._v1_dag_list_tasks_serialize(
|
|
259
|
+
dag_ids=dag_ids,
|
|
260
|
+
tenant=tenant,
|
|
261
|
+
_request_auth=_request_auth,
|
|
262
|
+
_content_type=_content_type,
|
|
263
|
+
_headers=_headers,
|
|
264
|
+
_host_index=_host_index,
|
|
265
|
+
)
|
|
266
|
+
|
|
267
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
268
|
+
"200": "List[V1DagChildren]",
|
|
269
|
+
"400": "APIErrors",
|
|
270
|
+
"403": "APIErrors",
|
|
271
|
+
"501": "APIErrors",
|
|
272
|
+
}
|
|
273
|
+
response_data = await self.api_client.call_api(
|
|
274
|
+
*_param, _request_timeout=_request_timeout
|
|
275
|
+
)
|
|
276
|
+
return response_data.response
|
|
277
|
+
|
|
278
|
+
def _v1_dag_list_tasks_serialize(
|
|
279
|
+
self,
|
|
280
|
+
dag_ids,
|
|
281
|
+
tenant,
|
|
282
|
+
_request_auth,
|
|
283
|
+
_content_type,
|
|
284
|
+
_headers,
|
|
285
|
+
_host_index,
|
|
286
|
+
) -> RequestSerialized:
|
|
287
|
+
|
|
288
|
+
_host = None
|
|
289
|
+
|
|
290
|
+
_collection_formats: Dict[str, str] = {
|
|
291
|
+
"dag_ids": "multi",
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
_path_params: Dict[str, str] = {}
|
|
295
|
+
_query_params: List[Tuple[str, str]] = []
|
|
296
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
297
|
+
_form_params: List[Tuple[str, str]] = []
|
|
298
|
+
_files: Dict[
|
|
299
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
300
|
+
] = {}
|
|
301
|
+
_body_params: Optional[bytes] = None
|
|
302
|
+
|
|
303
|
+
# process the path parameters
|
|
304
|
+
# process the query parameters
|
|
305
|
+
if dag_ids is not None:
|
|
306
|
+
|
|
307
|
+
_query_params.append(("dag_ids", dag_ids))
|
|
308
|
+
|
|
309
|
+
if tenant is not None:
|
|
310
|
+
|
|
311
|
+
_query_params.append(("tenant", tenant))
|
|
312
|
+
|
|
313
|
+
# process the header parameters
|
|
314
|
+
# process the form parameters
|
|
315
|
+
# process the body parameter
|
|
316
|
+
|
|
317
|
+
# set the HTTP header `Accept`
|
|
318
|
+
if "Accept" not in _header_params:
|
|
319
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
320
|
+
["application/json"]
|
|
321
|
+
)
|
|
322
|
+
|
|
323
|
+
# authentication setting
|
|
324
|
+
_auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
|
|
325
|
+
|
|
326
|
+
return self.api_client.param_serialize(
|
|
327
|
+
method="GET",
|
|
328
|
+
resource_path="/api/v1/stable/dags/tasks",
|
|
329
|
+
path_params=_path_params,
|
|
330
|
+
query_params=_query_params,
|
|
331
|
+
header_params=_header_params,
|
|
332
|
+
body=_body_params,
|
|
333
|
+
post_params=_form_params,
|
|
334
|
+
files=_files,
|
|
335
|
+
auth_settings=_auth_settings,
|
|
336
|
+
collection_formats=_collection_formats,
|
|
337
|
+
_host=_host,
|
|
338
|
+
_request_auth=_request_auth,
|
|
339
|
+
)
|
|
340
|
+
|
|
341
|
+
@validate_call
|
|
342
|
+
async def v1_task_cancel(
|
|
343
|
+
self,
|
|
344
|
+
tenant: Annotated[
|
|
345
|
+
str,
|
|
346
|
+
Field(
|
|
347
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
348
|
+
),
|
|
349
|
+
],
|
|
350
|
+
v1_cancel_task_request: Annotated[
|
|
351
|
+
V1CancelTaskRequest, Field(description="The tasks to cancel")
|
|
352
|
+
],
|
|
353
|
+
_request_timeout: Union[
|
|
354
|
+
None,
|
|
355
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
356
|
+
Tuple[
|
|
357
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
358
|
+
],
|
|
359
|
+
] = None,
|
|
360
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
361
|
+
_content_type: Optional[StrictStr] = None,
|
|
362
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
363
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
364
|
+
) -> None:
|
|
365
|
+
"""Cancel tasks
|
|
366
|
+
|
|
367
|
+
Cancel tasks
|
|
368
|
+
|
|
369
|
+
:param tenant: The tenant id (required)
|
|
370
|
+
:type tenant: str
|
|
371
|
+
:param v1_cancel_task_request: The tasks to cancel (required)
|
|
372
|
+
:type v1_cancel_task_request: V1CancelTaskRequest
|
|
373
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
374
|
+
number provided, it will be total request
|
|
375
|
+
timeout. It can also be a pair (tuple) of
|
|
376
|
+
(connection, read) timeouts.
|
|
377
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
378
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
379
|
+
request; this effectively ignores the
|
|
380
|
+
authentication in the spec for a single request.
|
|
381
|
+
:type _request_auth: dict, optional
|
|
382
|
+
:param _content_type: force content-type for the request.
|
|
383
|
+
:type _content_type: str, Optional
|
|
384
|
+
:param _headers: set to override the headers for a single
|
|
385
|
+
request; this effectively ignores the headers
|
|
386
|
+
in the spec for a single request.
|
|
387
|
+
:type _headers: dict, optional
|
|
388
|
+
:param _host_index: set to override the host_index for a single
|
|
389
|
+
request; this effectively ignores the host_index
|
|
390
|
+
in the spec for a single request.
|
|
391
|
+
:type _host_index: int, optional
|
|
392
|
+
:return: Returns the result object.
|
|
393
|
+
""" # noqa: E501
|
|
394
|
+
|
|
395
|
+
_param = self._v1_task_cancel_serialize(
|
|
396
|
+
tenant=tenant,
|
|
397
|
+
v1_cancel_task_request=v1_cancel_task_request,
|
|
398
|
+
_request_auth=_request_auth,
|
|
399
|
+
_content_type=_content_type,
|
|
400
|
+
_headers=_headers,
|
|
401
|
+
_host_index=_host_index,
|
|
402
|
+
)
|
|
403
|
+
|
|
404
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
405
|
+
"200": None,
|
|
406
|
+
"400": "APIErrors",
|
|
407
|
+
"403": "APIErrors",
|
|
408
|
+
"404": "APIErrors",
|
|
409
|
+
"501": "APIErrors",
|
|
410
|
+
}
|
|
411
|
+
response_data = await self.api_client.call_api(
|
|
412
|
+
*_param, _request_timeout=_request_timeout
|
|
413
|
+
)
|
|
414
|
+
await response_data.read()
|
|
415
|
+
return self.api_client.response_deserialize(
|
|
416
|
+
response_data=response_data,
|
|
417
|
+
response_types_map=_response_types_map,
|
|
418
|
+
).data
|
|
419
|
+
|
|
420
|
+
@validate_call
|
|
421
|
+
async def v1_task_cancel_with_http_info(
|
|
422
|
+
self,
|
|
423
|
+
tenant: Annotated[
|
|
424
|
+
str,
|
|
425
|
+
Field(
|
|
426
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
427
|
+
),
|
|
428
|
+
],
|
|
429
|
+
v1_cancel_task_request: Annotated[
|
|
430
|
+
V1CancelTaskRequest, Field(description="The tasks to cancel")
|
|
431
|
+
],
|
|
432
|
+
_request_timeout: Union[
|
|
433
|
+
None,
|
|
434
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
435
|
+
Tuple[
|
|
436
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
437
|
+
],
|
|
438
|
+
] = None,
|
|
439
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
440
|
+
_content_type: Optional[StrictStr] = None,
|
|
441
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
442
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
443
|
+
) -> ApiResponse[None]:
|
|
444
|
+
"""Cancel tasks
|
|
445
|
+
|
|
446
|
+
Cancel tasks
|
|
447
|
+
|
|
448
|
+
:param tenant: The tenant id (required)
|
|
449
|
+
:type tenant: str
|
|
450
|
+
:param v1_cancel_task_request: The tasks to cancel (required)
|
|
451
|
+
:type v1_cancel_task_request: V1CancelTaskRequest
|
|
452
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
453
|
+
number provided, it will be total request
|
|
454
|
+
timeout. It can also be a pair (tuple) of
|
|
455
|
+
(connection, read) timeouts.
|
|
456
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
457
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
458
|
+
request; this effectively ignores the
|
|
459
|
+
authentication in the spec for a single request.
|
|
460
|
+
:type _request_auth: dict, optional
|
|
461
|
+
:param _content_type: force content-type for the request.
|
|
462
|
+
:type _content_type: str, Optional
|
|
463
|
+
:param _headers: set to override the headers for a single
|
|
464
|
+
request; this effectively ignores the headers
|
|
465
|
+
in the spec for a single request.
|
|
466
|
+
:type _headers: dict, optional
|
|
467
|
+
:param _host_index: set to override the host_index for a single
|
|
468
|
+
request; this effectively ignores the host_index
|
|
469
|
+
in the spec for a single request.
|
|
470
|
+
:type _host_index: int, optional
|
|
471
|
+
:return: Returns the result object.
|
|
472
|
+
""" # noqa: E501
|
|
473
|
+
|
|
474
|
+
_param = self._v1_task_cancel_serialize(
|
|
475
|
+
tenant=tenant,
|
|
476
|
+
v1_cancel_task_request=v1_cancel_task_request,
|
|
477
|
+
_request_auth=_request_auth,
|
|
478
|
+
_content_type=_content_type,
|
|
479
|
+
_headers=_headers,
|
|
480
|
+
_host_index=_host_index,
|
|
481
|
+
)
|
|
482
|
+
|
|
483
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
484
|
+
"200": None,
|
|
485
|
+
"400": "APIErrors",
|
|
486
|
+
"403": "APIErrors",
|
|
487
|
+
"404": "APIErrors",
|
|
488
|
+
"501": "APIErrors",
|
|
489
|
+
}
|
|
490
|
+
response_data = await self.api_client.call_api(
|
|
491
|
+
*_param, _request_timeout=_request_timeout
|
|
492
|
+
)
|
|
493
|
+
await response_data.read()
|
|
494
|
+
return self.api_client.response_deserialize(
|
|
495
|
+
response_data=response_data,
|
|
496
|
+
response_types_map=_response_types_map,
|
|
497
|
+
)
|
|
498
|
+
|
|
499
|
+
@validate_call
|
|
500
|
+
async def v1_task_cancel_without_preload_content(
|
|
501
|
+
self,
|
|
502
|
+
tenant: Annotated[
|
|
503
|
+
str,
|
|
504
|
+
Field(
|
|
505
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
506
|
+
),
|
|
507
|
+
],
|
|
508
|
+
v1_cancel_task_request: Annotated[
|
|
509
|
+
V1CancelTaskRequest, Field(description="The tasks to cancel")
|
|
510
|
+
],
|
|
511
|
+
_request_timeout: Union[
|
|
512
|
+
None,
|
|
513
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
514
|
+
Tuple[
|
|
515
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
516
|
+
],
|
|
517
|
+
] = None,
|
|
518
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
519
|
+
_content_type: Optional[StrictStr] = None,
|
|
520
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
521
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
522
|
+
) -> RESTResponseType:
|
|
523
|
+
"""Cancel tasks
|
|
524
|
+
|
|
525
|
+
Cancel tasks
|
|
526
|
+
|
|
527
|
+
:param tenant: The tenant id (required)
|
|
528
|
+
:type tenant: str
|
|
529
|
+
:param v1_cancel_task_request: The tasks to cancel (required)
|
|
530
|
+
:type v1_cancel_task_request: V1CancelTaskRequest
|
|
531
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
532
|
+
number provided, it will be total request
|
|
533
|
+
timeout. It can also be a pair (tuple) of
|
|
534
|
+
(connection, read) timeouts.
|
|
535
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
536
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
537
|
+
request; this effectively ignores the
|
|
538
|
+
authentication in the spec for a single request.
|
|
539
|
+
:type _request_auth: dict, optional
|
|
540
|
+
:param _content_type: force content-type for the request.
|
|
541
|
+
:type _content_type: str, Optional
|
|
542
|
+
:param _headers: set to override the headers for a single
|
|
543
|
+
request; this effectively ignores the headers
|
|
544
|
+
in the spec for a single request.
|
|
545
|
+
:type _headers: dict, optional
|
|
546
|
+
:param _host_index: set to override the host_index for a single
|
|
547
|
+
request; this effectively ignores the host_index
|
|
548
|
+
in the spec for a single request.
|
|
549
|
+
:type _host_index: int, optional
|
|
550
|
+
:return: Returns the result object.
|
|
551
|
+
""" # noqa: E501
|
|
552
|
+
|
|
553
|
+
_param = self._v1_task_cancel_serialize(
|
|
554
|
+
tenant=tenant,
|
|
555
|
+
v1_cancel_task_request=v1_cancel_task_request,
|
|
556
|
+
_request_auth=_request_auth,
|
|
557
|
+
_content_type=_content_type,
|
|
558
|
+
_headers=_headers,
|
|
559
|
+
_host_index=_host_index,
|
|
560
|
+
)
|
|
561
|
+
|
|
562
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
563
|
+
"200": None,
|
|
564
|
+
"400": "APIErrors",
|
|
565
|
+
"403": "APIErrors",
|
|
566
|
+
"404": "APIErrors",
|
|
567
|
+
"501": "APIErrors",
|
|
568
|
+
}
|
|
569
|
+
response_data = await self.api_client.call_api(
|
|
570
|
+
*_param, _request_timeout=_request_timeout
|
|
571
|
+
)
|
|
572
|
+
return response_data.response
|
|
573
|
+
|
|
574
|
+
def _v1_task_cancel_serialize(
|
|
575
|
+
self,
|
|
576
|
+
tenant,
|
|
577
|
+
v1_cancel_task_request,
|
|
578
|
+
_request_auth,
|
|
579
|
+
_content_type,
|
|
580
|
+
_headers,
|
|
581
|
+
_host_index,
|
|
582
|
+
) -> RequestSerialized:
|
|
583
|
+
|
|
584
|
+
_host = None
|
|
585
|
+
|
|
586
|
+
_collection_formats: Dict[str, str] = {}
|
|
587
|
+
|
|
588
|
+
_path_params: Dict[str, str] = {}
|
|
589
|
+
_query_params: List[Tuple[str, str]] = []
|
|
590
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
591
|
+
_form_params: List[Tuple[str, str]] = []
|
|
592
|
+
_files: Dict[
|
|
593
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
594
|
+
] = {}
|
|
595
|
+
_body_params: Optional[bytes] = None
|
|
596
|
+
|
|
597
|
+
# process the path parameters
|
|
598
|
+
if tenant is not None:
|
|
599
|
+
_path_params["tenant"] = tenant
|
|
600
|
+
# process the query parameters
|
|
601
|
+
# process the header parameters
|
|
602
|
+
# process the form parameters
|
|
603
|
+
# process the body parameter
|
|
604
|
+
if v1_cancel_task_request is not None:
|
|
605
|
+
_body_params = v1_cancel_task_request
|
|
606
|
+
|
|
607
|
+
# set the HTTP header `Accept`
|
|
608
|
+
if "Accept" not in _header_params:
|
|
609
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
610
|
+
["application/json"]
|
|
611
|
+
)
|
|
612
|
+
|
|
613
|
+
# set the HTTP header `Content-Type`
|
|
614
|
+
if _content_type:
|
|
615
|
+
_header_params["Content-Type"] = _content_type
|
|
616
|
+
else:
|
|
617
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
618
|
+
["application/json"]
|
|
619
|
+
)
|
|
620
|
+
if _default_content_type is not None:
|
|
621
|
+
_header_params["Content-Type"] = _default_content_type
|
|
622
|
+
|
|
623
|
+
# authentication setting
|
|
624
|
+
_auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
|
|
625
|
+
|
|
626
|
+
return self.api_client.param_serialize(
|
|
627
|
+
method="POST",
|
|
628
|
+
resource_path="/api/v1/stable/tenants/{tenant}/tasks/cancel",
|
|
629
|
+
path_params=_path_params,
|
|
630
|
+
query_params=_query_params,
|
|
631
|
+
header_params=_header_params,
|
|
632
|
+
body=_body_params,
|
|
633
|
+
post_params=_form_params,
|
|
634
|
+
files=_files,
|
|
635
|
+
auth_settings=_auth_settings,
|
|
636
|
+
collection_formats=_collection_formats,
|
|
637
|
+
_host=_host,
|
|
638
|
+
_request_auth=_request_auth,
|
|
639
|
+
)
|
|
640
|
+
|
|
641
|
+
@validate_call
|
|
642
|
+
async def v1_task_event_list(
|
|
643
|
+
self,
|
|
644
|
+
task: Annotated[
|
|
645
|
+
str,
|
|
646
|
+
Field(min_length=36, strict=True, max_length=36, description="The task id"),
|
|
647
|
+
],
|
|
648
|
+
offset: Annotated[
|
|
649
|
+
Optional[StrictInt], Field(description="The number to skip")
|
|
650
|
+
] = None,
|
|
651
|
+
limit: Annotated[
|
|
652
|
+
Optional[StrictInt], Field(description="The number to limit by")
|
|
653
|
+
] = None,
|
|
654
|
+
_request_timeout: Union[
|
|
655
|
+
None,
|
|
656
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
657
|
+
Tuple[
|
|
658
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
659
|
+
],
|
|
660
|
+
] = None,
|
|
661
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
662
|
+
_content_type: Optional[StrictStr] = None,
|
|
663
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
664
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
665
|
+
) -> V1TaskEventList:
|
|
666
|
+
"""List events for a task
|
|
667
|
+
|
|
668
|
+
List events for a task
|
|
669
|
+
|
|
670
|
+
:param task: The task id (required)
|
|
671
|
+
:type task: str
|
|
672
|
+
:param offset: The number to skip
|
|
673
|
+
:type offset: int
|
|
674
|
+
:param limit: The number to limit by
|
|
675
|
+
:type limit: int
|
|
676
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
677
|
+
number provided, it will be total request
|
|
678
|
+
timeout. It can also be a pair (tuple) of
|
|
679
|
+
(connection, read) timeouts.
|
|
680
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
681
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
682
|
+
request; this effectively ignores the
|
|
683
|
+
authentication in the spec for a single request.
|
|
684
|
+
:type _request_auth: dict, optional
|
|
685
|
+
:param _content_type: force content-type for the request.
|
|
686
|
+
:type _content_type: str, Optional
|
|
687
|
+
:param _headers: set to override the headers for a single
|
|
688
|
+
request; this effectively ignores the headers
|
|
689
|
+
in the spec for a single request.
|
|
690
|
+
:type _headers: dict, optional
|
|
691
|
+
:param _host_index: set to override the host_index for a single
|
|
692
|
+
request; this effectively ignores the host_index
|
|
693
|
+
in the spec for a single request.
|
|
694
|
+
:type _host_index: int, optional
|
|
695
|
+
:return: Returns the result object.
|
|
696
|
+
""" # noqa: E501
|
|
697
|
+
|
|
698
|
+
_param = self._v1_task_event_list_serialize(
|
|
699
|
+
task=task,
|
|
700
|
+
offset=offset,
|
|
701
|
+
limit=limit,
|
|
702
|
+
_request_auth=_request_auth,
|
|
703
|
+
_content_type=_content_type,
|
|
704
|
+
_headers=_headers,
|
|
705
|
+
_host_index=_host_index,
|
|
706
|
+
)
|
|
707
|
+
|
|
708
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
709
|
+
"200": "V1TaskEventList",
|
|
710
|
+
"400": "APIErrors",
|
|
711
|
+
"403": "APIErrors",
|
|
712
|
+
"404": "APIErrors",
|
|
713
|
+
"501": "APIErrors",
|
|
714
|
+
}
|
|
715
|
+
response_data = await self.api_client.call_api(
|
|
716
|
+
*_param, _request_timeout=_request_timeout
|
|
717
|
+
)
|
|
718
|
+
await response_data.read()
|
|
719
|
+
return self.api_client.response_deserialize(
|
|
720
|
+
response_data=response_data,
|
|
721
|
+
response_types_map=_response_types_map,
|
|
722
|
+
).data
|
|
723
|
+
|
|
724
|
+
@validate_call
|
|
725
|
+
async def v1_task_event_list_with_http_info(
|
|
726
|
+
self,
|
|
727
|
+
task: Annotated[
|
|
728
|
+
str,
|
|
729
|
+
Field(min_length=36, strict=True, max_length=36, description="The task id"),
|
|
730
|
+
],
|
|
731
|
+
offset: Annotated[
|
|
732
|
+
Optional[StrictInt], Field(description="The number to skip")
|
|
733
|
+
] = None,
|
|
734
|
+
limit: Annotated[
|
|
735
|
+
Optional[StrictInt], Field(description="The number to limit by")
|
|
736
|
+
] = None,
|
|
737
|
+
_request_timeout: Union[
|
|
738
|
+
None,
|
|
739
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
740
|
+
Tuple[
|
|
741
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
742
|
+
],
|
|
743
|
+
] = None,
|
|
744
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
745
|
+
_content_type: Optional[StrictStr] = None,
|
|
746
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
747
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
748
|
+
) -> ApiResponse[V1TaskEventList]:
|
|
749
|
+
"""List events for a task
|
|
750
|
+
|
|
751
|
+
List events for a task
|
|
752
|
+
|
|
753
|
+
:param task: The task id (required)
|
|
754
|
+
:type task: str
|
|
755
|
+
:param offset: The number to skip
|
|
756
|
+
:type offset: int
|
|
757
|
+
:param limit: The number to limit by
|
|
758
|
+
:type limit: int
|
|
759
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
760
|
+
number provided, it will be total request
|
|
761
|
+
timeout. It can also be a pair (tuple) of
|
|
762
|
+
(connection, read) timeouts.
|
|
763
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
764
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
765
|
+
request; this effectively ignores the
|
|
766
|
+
authentication in the spec for a single request.
|
|
767
|
+
:type _request_auth: dict, optional
|
|
768
|
+
:param _content_type: force content-type for the request.
|
|
769
|
+
:type _content_type: str, Optional
|
|
770
|
+
:param _headers: set to override the headers for a single
|
|
771
|
+
request; this effectively ignores the headers
|
|
772
|
+
in the spec for a single request.
|
|
773
|
+
:type _headers: dict, optional
|
|
774
|
+
:param _host_index: set to override the host_index for a single
|
|
775
|
+
request; this effectively ignores the host_index
|
|
776
|
+
in the spec for a single request.
|
|
777
|
+
:type _host_index: int, optional
|
|
778
|
+
:return: Returns the result object.
|
|
779
|
+
""" # noqa: E501
|
|
780
|
+
|
|
781
|
+
_param = self._v1_task_event_list_serialize(
|
|
782
|
+
task=task,
|
|
783
|
+
offset=offset,
|
|
784
|
+
limit=limit,
|
|
785
|
+
_request_auth=_request_auth,
|
|
786
|
+
_content_type=_content_type,
|
|
787
|
+
_headers=_headers,
|
|
788
|
+
_host_index=_host_index,
|
|
789
|
+
)
|
|
790
|
+
|
|
791
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
792
|
+
"200": "V1TaskEventList",
|
|
793
|
+
"400": "APIErrors",
|
|
794
|
+
"403": "APIErrors",
|
|
795
|
+
"404": "APIErrors",
|
|
796
|
+
"501": "APIErrors",
|
|
797
|
+
}
|
|
798
|
+
response_data = await self.api_client.call_api(
|
|
799
|
+
*_param, _request_timeout=_request_timeout
|
|
800
|
+
)
|
|
801
|
+
await response_data.read()
|
|
802
|
+
return self.api_client.response_deserialize(
|
|
803
|
+
response_data=response_data,
|
|
804
|
+
response_types_map=_response_types_map,
|
|
805
|
+
)
|
|
806
|
+
|
|
807
|
+
@validate_call
|
|
808
|
+
async def v1_task_event_list_without_preload_content(
|
|
809
|
+
self,
|
|
810
|
+
task: Annotated[
|
|
811
|
+
str,
|
|
812
|
+
Field(min_length=36, strict=True, max_length=36, description="The task id"),
|
|
813
|
+
],
|
|
814
|
+
offset: Annotated[
|
|
815
|
+
Optional[StrictInt], Field(description="The number to skip")
|
|
816
|
+
] = None,
|
|
817
|
+
limit: Annotated[
|
|
818
|
+
Optional[StrictInt], Field(description="The number to limit by")
|
|
819
|
+
] = None,
|
|
820
|
+
_request_timeout: Union[
|
|
821
|
+
None,
|
|
822
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
823
|
+
Tuple[
|
|
824
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
825
|
+
],
|
|
826
|
+
] = None,
|
|
827
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
828
|
+
_content_type: Optional[StrictStr] = None,
|
|
829
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
830
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
831
|
+
) -> RESTResponseType:
|
|
832
|
+
"""List events for a task
|
|
833
|
+
|
|
834
|
+
List events for a task
|
|
835
|
+
|
|
836
|
+
:param task: The task id (required)
|
|
837
|
+
:type task: str
|
|
838
|
+
:param offset: The number to skip
|
|
839
|
+
:type offset: int
|
|
840
|
+
:param limit: The number to limit by
|
|
841
|
+
:type limit: int
|
|
842
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
843
|
+
number provided, it will be total request
|
|
844
|
+
timeout. It can also be a pair (tuple) of
|
|
845
|
+
(connection, read) timeouts.
|
|
846
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
847
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
848
|
+
request; this effectively ignores the
|
|
849
|
+
authentication in the spec for a single request.
|
|
850
|
+
:type _request_auth: dict, optional
|
|
851
|
+
:param _content_type: force content-type for the request.
|
|
852
|
+
:type _content_type: str, Optional
|
|
853
|
+
:param _headers: set to override the headers for a single
|
|
854
|
+
request; this effectively ignores the headers
|
|
855
|
+
in the spec for a single request.
|
|
856
|
+
:type _headers: dict, optional
|
|
857
|
+
:param _host_index: set to override the host_index for a single
|
|
858
|
+
request; this effectively ignores the host_index
|
|
859
|
+
in the spec for a single request.
|
|
860
|
+
:type _host_index: int, optional
|
|
861
|
+
:return: Returns the result object.
|
|
862
|
+
""" # noqa: E501
|
|
863
|
+
|
|
864
|
+
_param = self._v1_task_event_list_serialize(
|
|
865
|
+
task=task,
|
|
866
|
+
offset=offset,
|
|
867
|
+
limit=limit,
|
|
868
|
+
_request_auth=_request_auth,
|
|
869
|
+
_content_type=_content_type,
|
|
870
|
+
_headers=_headers,
|
|
871
|
+
_host_index=_host_index,
|
|
872
|
+
)
|
|
873
|
+
|
|
874
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
875
|
+
"200": "V1TaskEventList",
|
|
876
|
+
"400": "APIErrors",
|
|
877
|
+
"403": "APIErrors",
|
|
878
|
+
"404": "APIErrors",
|
|
879
|
+
"501": "APIErrors",
|
|
880
|
+
}
|
|
881
|
+
response_data = await self.api_client.call_api(
|
|
882
|
+
*_param, _request_timeout=_request_timeout
|
|
883
|
+
)
|
|
884
|
+
return response_data.response
|
|
885
|
+
|
|
886
|
+
def _v1_task_event_list_serialize(
|
|
887
|
+
self,
|
|
888
|
+
task,
|
|
889
|
+
offset,
|
|
890
|
+
limit,
|
|
891
|
+
_request_auth,
|
|
892
|
+
_content_type,
|
|
893
|
+
_headers,
|
|
894
|
+
_host_index,
|
|
895
|
+
) -> RequestSerialized:
|
|
896
|
+
|
|
897
|
+
_host = None
|
|
898
|
+
|
|
899
|
+
_collection_formats: Dict[str, str] = {}
|
|
900
|
+
|
|
901
|
+
_path_params: Dict[str, str] = {}
|
|
902
|
+
_query_params: List[Tuple[str, str]] = []
|
|
903
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
904
|
+
_form_params: List[Tuple[str, str]] = []
|
|
905
|
+
_files: Dict[
|
|
906
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
907
|
+
] = {}
|
|
908
|
+
_body_params: Optional[bytes] = None
|
|
909
|
+
|
|
910
|
+
# process the path parameters
|
|
911
|
+
if task is not None:
|
|
912
|
+
_path_params["task"] = task
|
|
913
|
+
# process the query parameters
|
|
914
|
+
if offset is not None:
|
|
915
|
+
|
|
916
|
+
_query_params.append(("offset", offset))
|
|
917
|
+
|
|
918
|
+
if limit is not None:
|
|
919
|
+
|
|
920
|
+
_query_params.append(("limit", limit))
|
|
921
|
+
|
|
922
|
+
# process the header parameters
|
|
923
|
+
# process the form parameters
|
|
924
|
+
# process the body parameter
|
|
925
|
+
|
|
926
|
+
# set the HTTP header `Accept`
|
|
927
|
+
if "Accept" not in _header_params:
|
|
928
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
929
|
+
["application/json"]
|
|
930
|
+
)
|
|
931
|
+
|
|
932
|
+
# authentication setting
|
|
933
|
+
_auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
|
|
934
|
+
|
|
935
|
+
return self.api_client.param_serialize(
|
|
936
|
+
method="GET",
|
|
937
|
+
resource_path="/api/v1/stable/tasks/{task}/task-events",
|
|
938
|
+
path_params=_path_params,
|
|
939
|
+
query_params=_query_params,
|
|
940
|
+
header_params=_header_params,
|
|
941
|
+
body=_body_params,
|
|
942
|
+
post_params=_form_params,
|
|
943
|
+
files=_files,
|
|
944
|
+
auth_settings=_auth_settings,
|
|
945
|
+
collection_formats=_collection_formats,
|
|
946
|
+
_host=_host,
|
|
947
|
+
_request_auth=_request_auth,
|
|
948
|
+
)
|
|
949
|
+
|
|
950
|
+
@validate_call
|
|
951
|
+
async def v1_task_get(
|
|
952
|
+
self,
|
|
953
|
+
task: Annotated[
|
|
954
|
+
str,
|
|
955
|
+
Field(min_length=36, strict=True, max_length=36, description="The task id"),
|
|
956
|
+
],
|
|
957
|
+
_request_timeout: Union[
|
|
958
|
+
None,
|
|
959
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
960
|
+
Tuple[
|
|
961
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
962
|
+
],
|
|
963
|
+
] = None,
|
|
964
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
965
|
+
_content_type: Optional[StrictStr] = None,
|
|
966
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
967
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
968
|
+
) -> V1Task:
|
|
969
|
+
"""Get a task
|
|
970
|
+
|
|
971
|
+
Get a task by id
|
|
972
|
+
|
|
973
|
+
:param task: The task id (required)
|
|
974
|
+
:type task: str
|
|
975
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
976
|
+
number provided, it will be total request
|
|
977
|
+
timeout. It can also be a pair (tuple) of
|
|
978
|
+
(connection, read) timeouts.
|
|
979
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
980
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
981
|
+
request; this effectively ignores the
|
|
982
|
+
authentication in the spec for a single request.
|
|
983
|
+
:type _request_auth: dict, optional
|
|
984
|
+
:param _content_type: force content-type for the request.
|
|
985
|
+
:type _content_type: str, Optional
|
|
986
|
+
:param _headers: set to override the headers for a single
|
|
987
|
+
request; this effectively ignores the headers
|
|
988
|
+
in the spec for a single request.
|
|
989
|
+
:type _headers: dict, optional
|
|
990
|
+
:param _host_index: set to override the host_index for a single
|
|
991
|
+
request; this effectively ignores the host_index
|
|
992
|
+
in the spec for a single request.
|
|
993
|
+
:type _host_index: int, optional
|
|
994
|
+
:return: Returns the result object.
|
|
995
|
+
""" # noqa: E501
|
|
996
|
+
|
|
997
|
+
_param = self._v1_task_get_serialize(
|
|
998
|
+
task=task,
|
|
999
|
+
_request_auth=_request_auth,
|
|
1000
|
+
_content_type=_content_type,
|
|
1001
|
+
_headers=_headers,
|
|
1002
|
+
_host_index=_host_index,
|
|
1003
|
+
)
|
|
1004
|
+
|
|
1005
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1006
|
+
"200": "V1Task",
|
|
1007
|
+
"400": "APIErrors",
|
|
1008
|
+
"403": "APIErrors",
|
|
1009
|
+
"404": "APIErrors",
|
|
1010
|
+
"501": "APIErrors",
|
|
1011
|
+
}
|
|
1012
|
+
response_data = await self.api_client.call_api(
|
|
1013
|
+
*_param, _request_timeout=_request_timeout
|
|
1014
|
+
)
|
|
1015
|
+
await response_data.read()
|
|
1016
|
+
return self.api_client.response_deserialize(
|
|
1017
|
+
response_data=response_data,
|
|
1018
|
+
response_types_map=_response_types_map,
|
|
1019
|
+
).data
|
|
1020
|
+
|
|
1021
|
+
@validate_call
|
|
1022
|
+
async def v1_task_get_with_http_info(
|
|
1023
|
+
self,
|
|
1024
|
+
task: Annotated[
|
|
1025
|
+
str,
|
|
1026
|
+
Field(min_length=36, strict=True, max_length=36, description="The task id"),
|
|
1027
|
+
],
|
|
1028
|
+
_request_timeout: Union[
|
|
1029
|
+
None,
|
|
1030
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1031
|
+
Tuple[
|
|
1032
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1033
|
+
],
|
|
1034
|
+
] = None,
|
|
1035
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1036
|
+
_content_type: Optional[StrictStr] = None,
|
|
1037
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1038
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1039
|
+
) -> ApiResponse[V1Task]:
|
|
1040
|
+
"""Get a task
|
|
1041
|
+
|
|
1042
|
+
Get a task by id
|
|
1043
|
+
|
|
1044
|
+
:param task: The task id (required)
|
|
1045
|
+
:type task: str
|
|
1046
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1047
|
+
number provided, it will be total request
|
|
1048
|
+
timeout. It can also be a pair (tuple) of
|
|
1049
|
+
(connection, read) timeouts.
|
|
1050
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1051
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1052
|
+
request; this effectively ignores the
|
|
1053
|
+
authentication in the spec for a single request.
|
|
1054
|
+
:type _request_auth: dict, optional
|
|
1055
|
+
:param _content_type: force content-type for the request.
|
|
1056
|
+
:type _content_type: str, Optional
|
|
1057
|
+
:param _headers: set to override the headers for a single
|
|
1058
|
+
request; this effectively ignores the headers
|
|
1059
|
+
in the spec for a single request.
|
|
1060
|
+
:type _headers: dict, optional
|
|
1061
|
+
:param _host_index: set to override the host_index for a single
|
|
1062
|
+
request; this effectively ignores the host_index
|
|
1063
|
+
in the spec for a single request.
|
|
1064
|
+
:type _host_index: int, optional
|
|
1065
|
+
:return: Returns the result object.
|
|
1066
|
+
""" # noqa: E501
|
|
1067
|
+
|
|
1068
|
+
_param = self._v1_task_get_serialize(
|
|
1069
|
+
task=task,
|
|
1070
|
+
_request_auth=_request_auth,
|
|
1071
|
+
_content_type=_content_type,
|
|
1072
|
+
_headers=_headers,
|
|
1073
|
+
_host_index=_host_index,
|
|
1074
|
+
)
|
|
1075
|
+
|
|
1076
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1077
|
+
"200": "V1Task",
|
|
1078
|
+
"400": "APIErrors",
|
|
1079
|
+
"403": "APIErrors",
|
|
1080
|
+
"404": "APIErrors",
|
|
1081
|
+
"501": "APIErrors",
|
|
1082
|
+
}
|
|
1083
|
+
response_data = await self.api_client.call_api(
|
|
1084
|
+
*_param, _request_timeout=_request_timeout
|
|
1085
|
+
)
|
|
1086
|
+
await response_data.read()
|
|
1087
|
+
return self.api_client.response_deserialize(
|
|
1088
|
+
response_data=response_data,
|
|
1089
|
+
response_types_map=_response_types_map,
|
|
1090
|
+
)
|
|
1091
|
+
|
|
1092
|
+
@validate_call
|
|
1093
|
+
async def v1_task_get_without_preload_content(
|
|
1094
|
+
self,
|
|
1095
|
+
task: Annotated[
|
|
1096
|
+
str,
|
|
1097
|
+
Field(min_length=36, strict=True, max_length=36, description="The task id"),
|
|
1098
|
+
],
|
|
1099
|
+
_request_timeout: Union[
|
|
1100
|
+
None,
|
|
1101
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1102
|
+
Tuple[
|
|
1103
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1104
|
+
],
|
|
1105
|
+
] = None,
|
|
1106
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1107
|
+
_content_type: Optional[StrictStr] = None,
|
|
1108
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1109
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1110
|
+
) -> RESTResponseType:
|
|
1111
|
+
"""Get a task
|
|
1112
|
+
|
|
1113
|
+
Get a task by id
|
|
1114
|
+
|
|
1115
|
+
:param task: The task id (required)
|
|
1116
|
+
:type task: str
|
|
1117
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1118
|
+
number provided, it will be total request
|
|
1119
|
+
timeout. It can also be a pair (tuple) of
|
|
1120
|
+
(connection, read) timeouts.
|
|
1121
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1122
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1123
|
+
request; this effectively ignores the
|
|
1124
|
+
authentication in the spec for a single request.
|
|
1125
|
+
:type _request_auth: dict, optional
|
|
1126
|
+
:param _content_type: force content-type for the request.
|
|
1127
|
+
:type _content_type: str, Optional
|
|
1128
|
+
:param _headers: set to override the headers for a single
|
|
1129
|
+
request; this effectively ignores the headers
|
|
1130
|
+
in the spec for a single request.
|
|
1131
|
+
:type _headers: dict, optional
|
|
1132
|
+
:param _host_index: set to override the host_index for a single
|
|
1133
|
+
request; this effectively ignores the host_index
|
|
1134
|
+
in the spec for a single request.
|
|
1135
|
+
:type _host_index: int, optional
|
|
1136
|
+
:return: Returns the result object.
|
|
1137
|
+
""" # noqa: E501
|
|
1138
|
+
|
|
1139
|
+
_param = self._v1_task_get_serialize(
|
|
1140
|
+
task=task,
|
|
1141
|
+
_request_auth=_request_auth,
|
|
1142
|
+
_content_type=_content_type,
|
|
1143
|
+
_headers=_headers,
|
|
1144
|
+
_host_index=_host_index,
|
|
1145
|
+
)
|
|
1146
|
+
|
|
1147
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1148
|
+
"200": "V1Task",
|
|
1149
|
+
"400": "APIErrors",
|
|
1150
|
+
"403": "APIErrors",
|
|
1151
|
+
"404": "APIErrors",
|
|
1152
|
+
"501": "APIErrors",
|
|
1153
|
+
}
|
|
1154
|
+
response_data = await self.api_client.call_api(
|
|
1155
|
+
*_param, _request_timeout=_request_timeout
|
|
1156
|
+
)
|
|
1157
|
+
return response_data.response
|
|
1158
|
+
|
|
1159
|
+
def _v1_task_get_serialize(
|
|
1160
|
+
self,
|
|
1161
|
+
task,
|
|
1162
|
+
_request_auth,
|
|
1163
|
+
_content_type,
|
|
1164
|
+
_headers,
|
|
1165
|
+
_host_index,
|
|
1166
|
+
) -> RequestSerialized:
|
|
1167
|
+
|
|
1168
|
+
_host = None
|
|
1169
|
+
|
|
1170
|
+
_collection_formats: Dict[str, str] = {}
|
|
1171
|
+
|
|
1172
|
+
_path_params: Dict[str, str] = {}
|
|
1173
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1174
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1175
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1176
|
+
_files: Dict[
|
|
1177
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1178
|
+
] = {}
|
|
1179
|
+
_body_params: Optional[bytes] = None
|
|
1180
|
+
|
|
1181
|
+
# process the path parameters
|
|
1182
|
+
if task is not None:
|
|
1183
|
+
_path_params["task"] = task
|
|
1184
|
+
# process the query parameters
|
|
1185
|
+
# process the header parameters
|
|
1186
|
+
# process the form parameters
|
|
1187
|
+
# process the body parameter
|
|
1188
|
+
|
|
1189
|
+
# set the HTTP header `Accept`
|
|
1190
|
+
if "Accept" not in _header_params:
|
|
1191
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
1192
|
+
["application/json"]
|
|
1193
|
+
)
|
|
1194
|
+
|
|
1195
|
+
# authentication setting
|
|
1196
|
+
_auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
|
|
1197
|
+
|
|
1198
|
+
return self.api_client.param_serialize(
|
|
1199
|
+
method="GET",
|
|
1200
|
+
resource_path="/api/v1/stable/tasks/{task}",
|
|
1201
|
+
path_params=_path_params,
|
|
1202
|
+
query_params=_query_params,
|
|
1203
|
+
header_params=_header_params,
|
|
1204
|
+
body=_body_params,
|
|
1205
|
+
post_params=_form_params,
|
|
1206
|
+
files=_files,
|
|
1207
|
+
auth_settings=_auth_settings,
|
|
1208
|
+
collection_formats=_collection_formats,
|
|
1209
|
+
_host=_host,
|
|
1210
|
+
_request_auth=_request_auth,
|
|
1211
|
+
)
|
|
1212
|
+
|
|
1213
|
+
@validate_call
|
|
1214
|
+
async def v1_task_get_point_metrics(
|
|
1215
|
+
self,
|
|
1216
|
+
tenant: Annotated[
|
|
1217
|
+
str,
|
|
1218
|
+
Field(
|
|
1219
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
1220
|
+
),
|
|
1221
|
+
],
|
|
1222
|
+
created_after: Annotated[
|
|
1223
|
+
Optional[datetime], Field(description="The time after the task was created")
|
|
1224
|
+
] = None,
|
|
1225
|
+
finished_before: Annotated[
|
|
1226
|
+
Optional[datetime],
|
|
1227
|
+
Field(description="The time before the task was completed"),
|
|
1228
|
+
] = None,
|
|
1229
|
+
_request_timeout: Union[
|
|
1230
|
+
None,
|
|
1231
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1232
|
+
Tuple[
|
|
1233
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1234
|
+
],
|
|
1235
|
+
] = None,
|
|
1236
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1237
|
+
_content_type: Optional[StrictStr] = None,
|
|
1238
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1239
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1240
|
+
) -> V1TaskPointMetrics:
|
|
1241
|
+
"""Get task point metrics
|
|
1242
|
+
|
|
1243
|
+
Get a minute by minute breakdown of task metrics for a tenant
|
|
1244
|
+
|
|
1245
|
+
:param tenant: The tenant id (required)
|
|
1246
|
+
:type tenant: str
|
|
1247
|
+
:param created_after: The time after the task was created
|
|
1248
|
+
:type created_after: datetime
|
|
1249
|
+
:param finished_before: The time before the task was completed
|
|
1250
|
+
:type finished_before: datetime
|
|
1251
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1252
|
+
number provided, it will be total request
|
|
1253
|
+
timeout. It can also be a pair (tuple) of
|
|
1254
|
+
(connection, read) timeouts.
|
|
1255
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1256
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1257
|
+
request; this effectively ignores the
|
|
1258
|
+
authentication in the spec for a single request.
|
|
1259
|
+
:type _request_auth: dict, optional
|
|
1260
|
+
:param _content_type: force content-type for the request.
|
|
1261
|
+
:type _content_type: str, Optional
|
|
1262
|
+
:param _headers: set to override the headers for a single
|
|
1263
|
+
request; this effectively ignores the headers
|
|
1264
|
+
in the spec for a single request.
|
|
1265
|
+
:type _headers: dict, optional
|
|
1266
|
+
:param _host_index: set to override the host_index for a single
|
|
1267
|
+
request; this effectively ignores the host_index
|
|
1268
|
+
in the spec for a single request.
|
|
1269
|
+
:type _host_index: int, optional
|
|
1270
|
+
:return: Returns the result object.
|
|
1271
|
+
""" # noqa: E501
|
|
1272
|
+
|
|
1273
|
+
_param = self._v1_task_get_point_metrics_serialize(
|
|
1274
|
+
tenant=tenant,
|
|
1275
|
+
created_after=created_after,
|
|
1276
|
+
finished_before=finished_before,
|
|
1277
|
+
_request_auth=_request_auth,
|
|
1278
|
+
_content_type=_content_type,
|
|
1279
|
+
_headers=_headers,
|
|
1280
|
+
_host_index=_host_index,
|
|
1281
|
+
)
|
|
1282
|
+
|
|
1283
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1284
|
+
"200": "V1TaskPointMetrics",
|
|
1285
|
+
"400": "APIErrors",
|
|
1286
|
+
"403": "APIErrors",
|
|
1287
|
+
"501": "APIErrors",
|
|
1288
|
+
}
|
|
1289
|
+
response_data = await self.api_client.call_api(
|
|
1290
|
+
*_param, _request_timeout=_request_timeout
|
|
1291
|
+
)
|
|
1292
|
+
await response_data.read()
|
|
1293
|
+
return self.api_client.response_deserialize(
|
|
1294
|
+
response_data=response_data,
|
|
1295
|
+
response_types_map=_response_types_map,
|
|
1296
|
+
).data
|
|
1297
|
+
|
|
1298
|
+
@validate_call
|
|
1299
|
+
async def v1_task_get_point_metrics_with_http_info(
|
|
1300
|
+
self,
|
|
1301
|
+
tenant: Annotated[
|
|
1302
|
+
str,
|
|
1303
|
+
Field(
|
|
1304
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
1305
|
+
),
|
|
1306
|
+
],
|
|
1307
|
+
created_after: Annotated[
|
|
1308
|
+
Optional[datetime], Field(description="The time after the task was created")
|
|
1309
|
+
] = None,
|
|
1310
|
+
finished_before: Annotated[
|
|
1311
|
+
Optional[datetime],
|
|
1312
|
+
Field(description="The time before the task was completed"),
|
|
1313
|
+
] = None,
|
|
1314
|
+
_request_timeout: Union[
|
|
1315
|
+
None,
|
|
1316
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1317
|
+
Tuple[
|
|
1318
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1319
|
+
],
|
|
1320
|
+
] = None,
|
|
1321
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1322
|
+
_content_type: Optional[StrictStr] = None,
|
|
1323
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1324
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1325
|
+
) -> ApiResponse[V1TaskPointMetrics]:
|
|
1326
|
+
"""Get task point metrics
|
|
1327
|
+
|
|
1328
|
+
Get a minute by minute breakdown of task metrics for a tenant
|
|
1329
|
+
|
|
1330
|
+
:param tenant: The tenant id (required)
|
|
1331
|
+
:type tenant: str
|
|
1332
|
+
:param created_after: The time after the task was created
|
|
1333
|
+
:type created_after: datetime
|
|
1334
|
+
:param finished_before: The time before the task was completed
|
|
1335
|
+
:type finished_before: datetime
|
|
1336
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1337
|
+
number provided, it will be total request
|
|
1338
|
+
timeout. It can also be a pair (tuple) of
|
|
1339
|
+
(connection, read) timeouts.
|
|
1340
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1341
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1342
|
+
request; this effectively ignores the
|
|
1343
|
+
authentication in the spec for a single request.
|
|
1344
|
+
:type _request_auth: dict, optional
|
|
1345
|
+
:param _content_type: force content-type for the request.
|
|
1346
|
+
:type _content_type: str, Optional
|
|
1347
|
+
:param _headers: set to override the headers for a single
|
|
1348
|
+
request; this effectively ignores the headers
|
|
1349
|
+
in the spec for a single request.
|
|
1350
|
+
:type _headers: dict, optional
|
|
1351
|
+
:param _host_index: set to override the host_index for a single
|
|
1352
|
+
request; this effectively ignores the host_index
|
|
1353
|
+
in the spec for a single request.
|
|
1354
|
+
:type _host_index: int, optional
|
|
1355
|
+
:return: Returns the result object.
|
|
1356
|
+
""" # noqa: E501
|
|
1357
|
+
|
|
1358
|
+
_param = self._v1_task_get_point_metrics_serialize(
|
|
1359
|
+
tenant=tenant,
|
|
1360
|
+
created_after=created_after,
|
|
1361
|
+
finished_before=finished_before,
|
|
1362
|
+
_request_auth=_request_auth,
|
|
1363
|
+
_content_type=_content_type,
|
|
1364
|
+
_headers=_headers,
|
|
1365
|
+
_host_index=_host_index,
|
|
1366
|
+
)
|
|
1367
|
+
|
|
1368
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1369
|
+
"200": "V1TaskPointMetrics",
|
|
1370
|
+
"400": "APIErrors",
|
|
1371
|
+
"403": "APIErrors",
|
|
1372
|
+
"501": "APIErrors",
|
|
1373
|
+
}
|
|
1374
|
+
response_data = await self.api_client.call_api(
|
|
1375
|
+
*_param, _request_timeout=_request_timeout
|
|
1376
|
+
)
|
|
1377
|
+
await response_data.read()
|
|
1378
|
+
return self.api_client.response_deserialize(
|
|
1379
|
+
response_data=response_data,
|
|
1380
|
+
response_types_map=_response_types_map,
|
|
1381
|
+
)
|
|
1382
|
+
|
|
1383
|
+
@validate_call
|
|
1384
|
+
async def v1_task_get_point_metrics_without_preload_content(
|
|
1385
|
+
self,
|
|
1386
|
+
tenant: Annotated[
|
|
1387
|
+
str,
|
|
1388
|
+
Field(
|
|
1389
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
1390
|
+
),
|
|
1391
|
+
],
|
|
1392
|
+
created_after: Annotated[
|
|
1393
|
+
Optional[datetime], Field(description="The time after the task was created")
|
|
1394
|
+
] = None,
|
|
1395
|
+
finished_before: Annotated[
|
|
1396
|
+
Optional[datetime],
|
|
1397
|
+
Field(description="The time before the task was completed"),
|
|
1398
|
+
] = None,
|
|
1399
|
+
_request_timeout: Union[
|
|
1400
|
+
None,
|
|
1401
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1402
|
+
Tuple[
|
|
1403
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1404
|
+
],
|
|
1405
|
+
] = None,
|
|
1406
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1407
|
+
_content_type: Optional[StrictStr] = None,
|
|
1408
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1409
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1410
|
+
) -> RESTResponseType:
|
|
1411
|
+
"""Get task point metrics
|
|
1412
|
+
|
|
1413
|
+
Get a minute by minute breakdown of task metrics for a tenant
|
|
1414
|
+
|
|
1415
|
+
:param tenant: The tenant id (required)
|
|
1416
|
+
:type tenant: str
|
|
1417
|
+
:param created_after: The time after the task was created
|
|
1418
|
+
:type created_after: datetime
|
|
1419
|
+
:param finished_before: The time before the task was completed
|
|
1420
|
+
:type finished_before: datetime
|
|
1421
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1422
|
+
number provided, it will be total request
|
|
1423
|
+
timeout. It can also be a pair (tuple) of
|
|
1424
|
+
(connection, read) timeouts.
|
|
1425
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1426
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1427
|
+
request; this effectively ignores the
|
|
1428
|
+
authentication in the spec for a single request.
|
|
1429
|
+
:type _request_auth: dict, optional
|
|
1430
|
+
:param _content_type: force content-type for the request.
|
|
1431
|
+
:type _content_type: str, Optional
|
|
1432
|
+
:param _headers: set to override the headers for a single
|
|
1433
|
+
request; this effectively ignores the headers
|
|
1434
|
+
in the spec for a single request.
|
|
1435
|
+
:type _headers: dict, optional
|
|
1436
|
+
:param _host_index: set to override the host_index for a single
|
|
1437
|
+
request; this effectively ignores the host_index
|
|
1438
|
+
in the spec for a single request.
|
|
1439
|
+
:type _host_index: int, optional
|
|
1440
|
+
:return: Returns the result object.
|
|
1441
|
+
""" # noqa: E501
|
|
1442
|
+
|
|
1443
|
+
_param = self._v1_task_get_point_metrics_serialize(
|
|
1444
|
+
tenant=tenant,
|
|
1445
|
+
created_after=created_after,
|
|
1446
|
+
finished_before=finished_before,
|
|
1447
|
+
_request_auth=_request_auth,
|
|
1448
|
+
_content_type=_content_type,
|
|
1449
|
+
_headers=_headers,
|
|
1450
|
+
_host_index=_host_index,
|
|
1451
|
+
)
|
|
1452
|
+
|
|
1453
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1454
|
+
"200": "V1TaskPointMetrics",
|
|
1455
|
+
"400": "APIErrors",
|
|
1456
|
+
"403": "APIErrors",
|
|
1457
|
+
"501": "APIErrors",
|
|
1458
|
+
}
|
|
1459
|
+
response_data = await self.api_client.call_api(
|
|
1460
|
+
*_param, _request_timeout=_request_timeout
|
|
1461
|
+
)
|
|
1462
|
+
return response_data.response
|
|
1463
|
+
|
|
1464
|
+
def _v1_task_get_point_metrics_serialize(
|
|
1465
|
+
self,
|
|
1466
|
+
tenant,
|
|
1467
|
+
created_after,
|
|
1468
|
+
finished_before,
|
|
1469
|
+
_request_auth,
|
|
1470
|
+
_content_type,
|
|
1471
|
+
_headers,
|
|
1472
|
+
_host_index,
|
|
1473
|
+
) -> RequestSerialized:
|
|
1474
|
+
|
|
1475
|
+
_host = None
|
|
1476
|
+
|
|
1477
|
+
_collection_formats: Dict[str, str] = {}
|
|
1478
|
+
|
|
1479
|
+
_path_params: Dict[str, str] = {}
|
|
1480
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1481
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1482
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1483
|
+
_files: Dict[
|
|
1484
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1485
|
+
] = {}
|
|
1486
|
+
_body_params: Optional[bytes] = None
|
|
1487
|
+
|
|
1488
|
+
# process the path parameters
|
|
1489
|
+
if tenant is not None:
|
|
1490
|
+
_path_params["tenant"] = tenant
|
|
1491
|
+
# process the query parameters
|
|
1492
|
+
if created_after is not None:
|
|
1493
|
+
if isinstance(created_after, datetime):
|
|
1494
|
+
_query_params.append(
|
|
1495
|
+
(
|
|
1496
|
+
"createdAfter",
|
|
1497
|
+
created_after.strftime(
|
|
1498
|
+
self.api_client.configuration.datetime_format
|
|
1499
|
+
),
|
|
1500
|
+
)
|
|
1501
|
+
)
|
|
1502
|
+
else:
|
|
1503
|
+
_query_params.append(("createdAfter", created_after))
|
|
1504
|
+
|
|
1505
|
+
if finished_before is not None:
|
|
1506
|
+
if isinstance(finished_before, datetime):
|
|
1507
|
+
_query_params.append(
|
|
1508
|
+
(
|
|
1509
|
+
"finishedBefore",
|
|
1510
|
+
finished_before.strftime(
|
|
1511
|
+
self.api_client.configuration.datetime_format
|
|
1512
|
+
),
|
|
1513
|
+
)
|
|
1514
|
+
)
|
|
1515
|
+
else:
|
|
1516
|
+
_query_params.append(("finishedBefore", finished_before))
|
|
1517
|
+
|
|
1518
|
+
# process the header parameters
|
|
1519
|
+
# process the form parameters
|
|
1520
|
+
# process the body parameter
|
|
1521
|
+
|
|
1522
|
+
# set the HTTP header `Accept`
|
|
1523
|
+
if "Accept" not in _header_params:
|
|
1524
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
1525
|
+
["application/json"]
|
|
1526
|
+
)
|
|
1527
|
+
|
|
1528
|
+
# authentication setting
|
|
1529
|
+
_auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
|
|
1530
|
+
|
|
1531
|
+
return self.api_client.param_serialize(
|
|
1532
|
+
method="GET",
|
|
1533
|
+
resource_path="/api/v1/stable/tenants/{tenant}/task-point-metrics",
|
|
1534
|
+
path_params=_path_params,
|
|
1535
|
+
query_params=_query_params,
|
|
1536
|
+
header_params=_header_params,
|
|
1537
|
+
body=_body_params,
|
|
1538
|
+
post_params=_form_params,
|
|
1539
|
+
files=_files,
|
|
1540
|
+
auth_settings=_auth_settings,
|
|
1541
|
+
collection_formats=_collection_formats,
|
|
1542
|
+
_host=_host,
|
|
1543
|
+
_request_auth=_request_auth,
|
|
1544
|
+
)
|
|
1545
|
+
|
|
1546
|
+
@validate_call
|
|
1547
|
+
async def v1_task_list_status_metrics(
|
|
1548
|
+
self,
|
|
1549
|
+
tenant: Annotated[
|
|
1550
|
+
str,
|
|
1551
|
+
Field(
|
|
1552
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
1553
|
+
),
|
|
1554
|
+
],
|
|
1555
|
+
since: Annotated[
|
|
1556
|
+
datetime, Field(description="The start time to get metrics for")
|
|
1557
|
+
],
|
|
1558
|
+
workflow_ids: Annotated[
|
|
1559
|
+
Optional[
|
|
1560
|
+
List[Annotated[str, Field(min_length=36, strict=True, max_length=36)]]
|
|
1561
|
+
],
|
|
1562
|
+
Field(description="The workflow id to find runs for"),
|
|
1563
|
+
] = None,
|
|
1564
|
+
_request_timeout: Union[
|
|
1565
|
+
None,
|
|
1566
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1567
|
+
Tuple[
|
|
1568
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1569
|
+
],
|
|
1570
|
+
] = None,
|
|
1571
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1572
|
+
_content_type: Optional[StrictStr] = None,
|
|
1573
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1574
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1575
|
+
) -> List[V1TaskRunMetric]:
|
|
1576
|
+
"""Get task metrics
|
|
1577
|
+
|
|
1578
|
+
Get a summary of task run metrics for a tenant
|
|
1579
|
+
|
|
1580
|
+
:param tenant: The tenant id (required)
|
|
1581
|
+
:type tenant: str
|
|
1582
|
+
:param since: The start time to get metrics for (required)
|
|
1583
|
+
:type since: datetime
|
|
1584
|
+
:param workflow_ids: The workflow id to find runs for
|
|
1585
|
+
:type workflow_ids: List[str]
|
|
1586
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1587
|
+
number provided, it will be total request
|
|
1588
|
+
timeout. It can also be a pair (tuple) of
|
|
1589
|
+
(connection, read) timeouts.
|
|
1590
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1591
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1592
|
+
request; this effectively ignores the
|
|
1593
|
+
authentication in the spec for a single request.
|
|
1594
|
+
:type _request_auth: dict, optional
|
|
1595
|
+
:param _content_type: force content-type for the request.
|
|
1596
|
+
:type _content_type: str, Optional
|
|
1597
|
+
:param _headers: set to override the headers for a single
|
|
1598
|
+
request; this effectively ignores the headers
|
|
1599
|
+
in the spec for a single request.
|
|
1600
|
+
:type _headers: dict, optional
|
|
1601
|
+
:param _host_index: set to override the host_index for a single
|
|
1602
|
+
request; this effectively ignores the host_index
|
|
1603
|
+
in the spec for a single request.
|
|
1604
|
+
:type _host_index: int, optional
|
|
1605
|
+
:return: Returns the result object.
|
|
1606
|
+
""" # noqa: E501
|
|
1607
|
+
|
|
1608
|
+
_param = self._v1_task_list_status_metrics_serialize(
|
|
1609
|
+
tenant=tenant,
|
|
1610
|
+
since=since,
|
|
1611
|
+
workflow_ids=workflow_ids,
|
|
1612
|
+
_request_auth=_request_auth,
|
|
1613
|
+
_content_type=_content_type,
|
|
1614
|
+
_headers=_headers,
|
|
1615
|
+
_host_index=_host_index,
|
|
1616
|
+
)
|
|
1617
|
+
|
|
1618
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1619
|
+
"200": "List[V1TaskRunMetric]",
|
|
1620
|
+
"400": "APIErrors",
|
|
1621
|
+
"403": "APIErrors",
|
|
1622
|
+
"501": "APIErrors",
|
|
1623
|
+
}
|
|
1624
|
+
response_data = await self.api_client.call_api(
|
|
1625
|
+
*_param, _request_timeout=_request_timeout
|
|
1626
|
+
)
|
|
1627
|
+
await response_data.read()
|
|
1628
|
+
return self.api_client.response_deserialize(
|
|
1629
|
+
response_data=response_data,
|
|
1630
|
+
response_types_map=_response_types_map,
|
|
1631
|
+
).data
|
|
1632
|
+
|
|
1633
|
+
@validate_call
|
|
1634
|
+
async def v1_task_list_status_metrics_with_http_info(
|
|
1635
|
+
self,
|
|
1636
|
+
tenant: Annotated[
|
|
1637
|
+
str,
|
|
1638
|
+
Field(
|
|
1639
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
1640
|
+
),
|
|
1641
|
+
],
|
|
1642
|
+
since: Annotated[
|
|
1643
|
+
datetime, Field(description="The start time to get metrics for")
|
|
1644
|
+
],
|
|
1645
|
+
workflow_ids: Annotated[
|
|
1646
|
+
Optional[
|
|
1647
|
+
List[Annotated[str, Field(min_length=36, strict=True, max_length=36)]]
|
|
1648
|
+
],
|
|
1649
|
+
Field(description="The workflow id to find runs for"),
|
|
1650
|
+
] = None,
|
|
1651
|
+
_request_timeout: Union[
|
|
1652
|
+
None,
|
|
1653
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1654
|
+
Tuple[
|
|
1655
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1656
|
+
],
|
|
1657
|
+
] = None,
|
|
1658
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1659
|
+
_content_type: Optional[StrictStr] = None,
|
|
1660
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1661
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1662
|
+
) -> ApiResponse[List[V1TaskRunMetric]]:
|
|
1663
|
+
"""Get task metrics
|
|
1664
|
+
|
|
1665
|
+
Get a summary of task run metrics for a tenant
|
|
1666
|
+
|
|
1667
|
+
:param tenant: The tenant id (required)
|
|
1668
|
+
:type tenant: str
|
|
1669
|
+
:param since: The start time to get metrics for (required)
|
|
1670
|
+
:type since: datetime
|
|
1671
|
+
:param workflow_ids: The workflow id to find runs for
|
|
1672
|
+
:type workflow_ids: List[str]
|
|
1673
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1674
|
+
number provided, it will be total request
|
|
1675
|
+
timeout. It can also be a pair (tuple) of
|
|
1676
|
+
(connection, read) timeouts.
|
|
1677
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1678
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1679
|
+
request; this effectively ignores the
|
|
1680
|
+
authentication in the spec for a single request.
|
|
1681
|
+
:type _request_auth: dict, optional
|
|
1682
|
+
:param _content_type: force content-type for the request.
|
|
1683
|
+
:type _content_type: str, Optional
|
|
1684
|
+
:param _headers: set to override the headers for a single
|
|
1685
|
+
request; this effectively ignores the headers
|
|
1686
|
+
in the spec for a single request.
|
|
1687
|
+
:type _headers: dict, optional
|
|
1688
|
+
:param _host_index: set to override the host_index for a single
|
|
1689
|
+
request; this effectively ignores the host_index
|
|
1690
|
+
in the spec for a single request.
|
|
1691
|
+
:type _host_index: int, optional
|
|
1692
|
+
:return: Returns the result object.
|
|
1693
|
+
""" # noqa: E501
|
|
1694
|
+
|
|
1695
|
+
_param = self._v1_task_list_status_metrics_serialize(
|
|
1696
|
+
tenant=tenant,
|
|
1697
|
+
since=since,
|
|
1698
|
+
workflow_ids=workflow_ids,
|
|
1699
|
+
_request_auth=_request_auth,
|
|
1700
|
+
_content_type=_content_type,
|
|
1701
|
+
_headers=_headers,
|
|
1702
|
+
_host_index=_host_index,
|
|
1703
|
+
)
|
|
1704
|
+
|
|
1705
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1706
|
+
"200": "List[V1TaskRunMetric]",
|
|
1707
|
+
"400": "APIErrors",
|
|
1708
|
+
"403": "APIErrors",
|
|
1709
|
+
"501": "APIErrors",
|
|
1710
|
+
}
|
|
1711
|
+
response_data = await self.api_client.call_api(
|
|
1712
|
+
*_param, _request_timeout=_request_timeout
|
|
1713
|
+
)
|
|
1714
|
+
await response_data.read()
|
|
1715
|
+
return self.api_client.response_deserialize(
|
|
1716
|
+
response_data=response_data,
|
|
1717
|
+
response_types_map=_response_types_map,
|
|
1718
|
+
)
|
|
1719
|
+
|
|
1720
|
+
@validate_call
|
|
1721
|
+
async def v1_task_list_status_metrics_without_preload_content(
|
|
1722
|
+
self,
|
|
1723
|
+
tenant: Annotated[
|
|
1724
|
+
str,
|
|
1725
|
+
Field(
|
|
1726
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
1727
|
+
),
|
|
1728
|
+
],
|
|
1729
|
+
since: Annotated[
|
|
1730
|
+
datetime, Field(description="The start time to get metrics for")
|
|
1731
|
+
],
|
|
1732
|
+
workflow_ids: Annotated[
|
|
1733
|
+
Optional[
|
|
1734
|
+
List[Annotated[str, Field(min_length=36, strict=True, max_length=36)]]
|
|
1735
|
+
],
|
|
1736
|
+
Field(description="The workflow id to find runs for"),
|
|
1737
|
+
] = None,
|
|
1738
|
+
_request_timeout: Union[
|
|
1739
|
+
None,
|
|
1740
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1741
|
+
Tuple[
|
|
1742
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1743
|
+
],
|
|
1744
|
+
] = None,
|
|
1745
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1746
|
+
_content_type: Optional[StrictStr] = None,
|
|
1747
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1748
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1749
|
+
) -> RESTResponseType:
|
|
1750
|
+
"""Get task metrics
|
|
1751
|
+
|
|
1752
|
+
Get a summary of task run metrics for a tenant
|
|
1753
|
+
|
|
1754
|
+
:param tenant: The tenant id (required)
|
|
1755
|
+
:type tenant: str
|
|
1756
|
+
:param since: The start time to get metrics for (required)
|
|
1757
|
+
:type since: datetime
|
|
1758
|
+
:param workflow_ids: The workflow id to find runs for
|
|
1759
|
+
:type workflow_ids: List[str]
|
|
1760
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1761
|
+
number provided, it will be total request
|
|
1762
|
+
timeout. It can also be a pair (tuple) of
|
|
1763
|
+
(connection, read) timeouts.
|
|
1764
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1765
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1766
|
+
request; this effectively ignores the
|
|
1767
|
+
authentication in the spec for a single request.
|
|
1768
|
+
:type _request_auth: dict, optional
|
|
1769
|
+
:param _content_type: force content-type for the request.
|
|
1770
|
+
:type _content_type: str, Optional
|
|
1771
|
+
:param _headers: set to override the headers for a single
|
|
1772
|
+
request; this effectively ignores the headers
|
|
1773
|
+
in the spec for a single request.
|
|
1774
|
+
:type _headers: dict, optional
|
|
1775
|
+
:param _host_index: set to override the host_index for a single
|
|
1776
|
+
request; this effectively ignores the host_index
|
|
1777
|
+
in the spec for a single request.
|
|
1778
|
+
:type _host_index: int, optional
|
|
1779
|
+
:return: Returns the result object.
|
|
1780
|
+
""" # noqa: E501
|
|
1781
|
+
|
|
1782
|
+
_param = self._v1_task_list_status_metrics_serialize(
|
|
1783
|
+
tenant=tenant,
|
|
1784
|
+
since=since,
|
|
1785
|
+
workflow_ids=workflow_ids,
|
|
1786
|
+
_request_auth=_request_auth,
|
|
1787
|
+
_content_type=_content_type,
|
|
1788
|
+
_headers=_headers,
|
|
1789
|
+
_host_index=_host_index,
|
|
1790
|
+
)
|
|
1791
|
+
|
|
1792
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1793
|
+
"200": "List[V1TaskRunMetric]",
|
|
1794
|
+
"400": "APIErrors",
|
|
1795
|
+
"403": "APIErrors",
|
|
1796
|
+
"501": "APIErrors",
|
|
1797
|
+
}
|
|
1798
|
+
response_data = await self.api_client.call_api(
|
|
1799
|
+
*_param, _request_timeout=_request_timeout
|
|
1800
|
+
)
|
|
1801
|
+
return response_data.response
|
|
1802
|
+
|
|
1803
|
+
def _v1_task_list_status_metrics_serialize(
|
|
1804
|
+
self,
|
|
1805
|
+
tenant,
|
|
1806
|
+
since,
|
|
1807
|
+
workflow_ids,
|
|
1808
|
+
_request_auth,
|
|
1809
|
+
_content_type,
|
|
1810
|
+
_headers,
|
|
1811
|
+
_host_index,
|
|
1812
|
+
) -> RequestSerialized:
|
|
1813
|
+
|
|
1814
|
+
_host = None
|
|
1815
|
+
|
|
1816
|
+
_collection_formats: Dict[str, str] = {
|
|
1817
|
+
"workflow_ids": "multi",
|
|
1818
|
+
}
|
|
1819
|
+
|
|
1820
|
+
_path_params: Dict[str, str] = {}
|
|
1821
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1822
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1823
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1824
|
+
_files: Dict[
|
|
1825
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1826
|
+
] = {}
|
|
1827
|
+
_body_params: Optional[bytes] = None
|
|
1828
|
+
|
|
1829
|
+
# process the path parameters
|
|
1830
|
+
if tenant is not None:
|
|
1831
|
+
_path_params["tenant"] = tenant
|
|
1832
|
+
# process the query parameters
|
|
1833
|
+
if since is not None:
|
|
1834
|
+
if isinstance(since, datetime):
|
|
1835
|
+
_query_params.append(
|
|
1836
|
+
(
|
|
1837
|
+
"since",
|
|
1838
|
+
since.strftime(self.api_client.configuration.datetime_format),
|
|
1839
|
+
)
|
|
1840
|
+
)
|
|
1841
|
+
else:
|
|
1842
|
+
_query_params.append(("since", since))
|
|
1843
|
+
|
|
1844
|
+
if workflow_ids is not None:
|
|
1845
|
+
|
|
1846
|
+
_query_params.append(("workflow_ids", workflow_ids))
|
|
1847
|
+
|
|
1848
|
+
# process the header parameters
|
|
1849
|
+
# process the form parameters
|
|
1850
|
+
# process the body parameter
|
|
1851
|
+
|
|
1852
|
+
# set the HTTP header `Accept`
|
|
1853
|
+
if "Accept" not in _header_params:
|
|
1854
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
1855
|
+
["application/json"]
|
|
1856
|
+
)
|
|
1857
|
+
|
|
1858
|
+
# authentication setting
|
|
1859
|
+
_auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
|
|
1860
|
+
|
|
1861
|
+
return self.api_client.param_serialize(
|
|
1862
|
+
method="GET",
|
|
1863
|
+
resource_path="/api/v1/stable/tenants/{tenant}/task-metrics",
|
|
1864
|
+
path_params=_path_params,
|
|
1865
|
+
query_params=_query_params,
|
|
1866
|
+
header_params=_header_params,
|
|
1867
|
+
body=_body_params,
|
|
1868
|
+
post_params=_form_params,
|
|
1869
|
+
files=_files,
|
|
1870
|
+
auth_settings=_auth_settings,
|
|
1871
|
+
collection_formats=_collection_formats,
|
|
1872
|
+
_host=_host,
|
|
1873
|
+
_request_auth=_request_auth,
|
|
1874
|
+
)
|
|
1875
|
+
|
|
1876
|
+
@validate_call
|
|
1877
|
+
async def v1_task_replay(
|
|
1878
|
+
self,
|
|
1879
|
+
tenant: Annotated[
|
|
1880
|
+
str,
|
|
1881
|
+
Field(
|
|
1882
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
1883
|
+
),
|
|
1884
|
+
],
|
|
1885
|
+
v1_replay_task_request: Annotated[
|
|
1886
|
+
V1ReplayTaskRequest, Field(description="The tasks to replay")
|
|
1887
|
+
],
|
|
1888
|
+
_request_timeout: Union[
|
|
1889
|
+
None,
|
|
1890
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1891
|
+
Tuple[
|
|
1892
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1893
|
+
],
|
|
1894
|
+
] = None,
|
|
1895
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1896
|
+
_content_type: Optional[StrictStr] = None,
|
|
1897
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1898
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1899
|
+
) -> None:
|
|
1900
|
+
"""Replay tasks
|
|
1901
|
+
|
|
1902
|
+
Replay tasks
|
|
1903
|
+
|
|
1904
|
+
:param tenant: The tenant id (required)
|
|
1905
|
+
:type tenant: str
|
|
1906
|
+
:param v1_replay_task_request: The tasks to replay (required)
|
|
1907
|
+
:type v1_replay_task_request: V1ReplayTaskRequest
|
|
1908
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1909
|
+
number provided, it will be total request
|
|
1910
|
+
timeout. It can also be a pair (tuple) of
|
|
1911
|
+
(connection, read) timeouts.
|
|
1912
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1913
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1914
|
+
request; this effectively ignores the
|
|
1915
|
+
authentication in the spec for a single request.
|
|
1916
|
+
:type _request_auth: dict, optional
|
|
1917
|
+
:param _content_type: force content-type for the request.
|
|
1918
|
+
:type _content_type: str, Optional
|
|
1919
|
+
:param _headers: set to override the headers for a single
|
|
1920
|
+
request; this effectively ignores the headers
|
|
1921
|
+
in the spec for a single request.
|
|
1922
|
+
:type _headers: dict, optional
|
|
1923
|
+
:param _host_index: set to override the host_index for a single
|
|
1924
|
+
request; this effectively ignores the host_index
|
|
1925
|
+
in the spec for a single request.
|
|
1926
|
+
:type _host_index: int, optional
|
|
1927
|
+
:return: Returns the result object.
|
|
1928
|
+
""" # noqa: E501
|
|
1929
|
+
|
|
1930
|
+
_param = self._v1_task_replay_serialize(
|
|
1931
|
+
tenant=tenant,
|
|
1932
|
+
v1_replay_task_request=v1_replay_task_request,
|
|
1933
|
+
_request_auth=_request_auth,
|
|
1934
|
+
_content_type=_content_type,
|
|
1935
|
+
_headers=_headers,
|
|
1936
|
+
_host_index=_host_index,
|
|
1937
|
+
)
|
|
1938
|
+
|
|
1939
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1940
|
+
"200": None,
|
|
1941
|
+
"400": "APIErrors",
|
|
1942
|
+
"403": "APIErrors",
|
|
1943
|
+
"404": "APIErrors",
|
|
1944
|
+
"501": "APIErrors",
|
|
1945
|
+
}
|
|
1946
|
+
response_data = await self.api_client.call_api(
|
|
1947
|
+
*_param, _request_timeout=_request_timeout
|
|
1948
|
+
)
|
|
1949
|
+
await response_data.read()
|
|
1950
|
+
return self.api_client.response_deserialize(
|
|
1951
|
+
response_data=response_data,
|
|
1952
|
+
response_types_map=_response_types_map,
|
|
1953
|
+
).data
|
|
1954
|
+
|
|
1955
|
+
@validate_call
|
|
1956
|
+
async def v1_task_replay_with_http_info(
|
|
1957
|
+
self,
|
|
1958
|
+
tenant: Annotated[
|
|
1959
|
+
str,
|
|
1960
|
+
Field(
|
|
1961
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
1962
|
+
),
|
|
1963
|
+
],
|
|
1964
|
+
v1_replay_task_request: Annotated[
|
|
1965
|
+
V1ReplayTaskRequest, Field(description="The tasks to replay")
|
|
1966
|
+
],
|
|
1967
|
+
_request_timeout: Union[
|
|
1968
|
+
None,
|
|
1969
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1970
|
+
Tuple[
|
|
1971
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1972
|
+
],
|
|
1973
|
+
] = None,
|
|
1974
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1975
|
+
_content_type: Optional[StrictStr] = None,
|
|
1976
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1977
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1978
|
+
) -> ApiResponse[None]:
|
|
1979
|
+
"""Replay tasks
|
|
1980
|
+
|
|
1981
|
+
Replay tasks
|
|
1982
|
+
|
|
1983
|
+
:param tenant: The tenant id (required)
|
|
1984
|
+
:type tenant: str
|
|
1985
|
+
:param v1_replay_task_request: The tasks to replay (required)
|
|
1986
|
+
:type v1_replay_task_request: V1ReplayTaskRequest
|
|
1987
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1988
|
+
number provided, it will be total request
|
|
1989
|
+
timeout. It can also be a pair (tuple) of
|
|
1990
|
+
(connection, read) timeouts.
|
|
1991
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1992
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1993
|
+
request; this effectively ignores the
|
|
1994
|
+
authentication in the spec for a single request.
|
|
1995
|
+
:type _request_auth: dict, optional
|
|
1996
|
+
:param _content_type: force content-type for the request.
|
|
1997
|
+
:type _content_type: str, Optional
|
|
1998
|
+
:param _headers: set to override the headers for a single
|
|
1999
|
+
request; this effectively ignores the headers
|
|
2000
|
+
in the spec for a single request.
|
|
2001
|
+
:type _headers: dict, optional
|
|
2002
|
+
:param _host_index: set to override the host_index for a single
|
|
2003
|
+
request; this effectively ignores the host_index
|
|
2004
|
+
in the spec for a single request.
|
|
2005
|
+
:type _host_index: int, optional
|
|
2006
|
+
:return: Returns the result object.
|
|
2007
|
+
""" # noqa: E501
|
|
2008
|
+
|
|
2009
|
+
_param = self._v1_task_replay_serialize(
|
|
2010
|
+
tenant=tenant,
|
|
2011
|
+
v1_replay_task_request=v1_replay_task_request,
|
|
2012
|
+
_request_auth=_request_auth,
|
|
2013
|
+
_content_type=_content_type,
|
|
2014
|
+
_headers=_headers,
|
|
2015
|
+
_host_index=_host_index,
|
|
2016
|
+
)
|
|
2017
|
+
|
|
2018
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2019
|
+
"200": None,
|
|
2020
|
+
"400": "APIErrors",
|
|
2021
|
+
"403": "APIErrors",
|
|
2022
|
+
"404": "APIErrors",
|
|
2023
|
+
"501": "APIErrors",
|
|
2024
|
+
}
|
|
2025
|
+
response_data = await self.api_client.call_api(
|
|
2026
|
+
*_param, _request_timeout=_request_timeout
|
|
2027
|
+
)
|
|
2028
|
+
await response_data.read()
|
|
2029
|
+
return self.api_client.response_deserialize(
|
|
2030
|
+
response_data=response_data,
|
|
2031
|
+
response_types_map=_response_types_map,
|
|
2032
|
+
)
|
|
2033
|
+
|
|
2034
|
+
@validate_call
|
|
2035
|
+
async def v1_task_replay_without_preload_content(
|
|
2036
|
+
self,
|
|
2037
|
+
tenant: Annotated[
|
|
2038
|
+
str,
|
|
2039
|
+
Field(
|
|
2040
|
+
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
2041
|
+
),
|
|
2042
|
+
],
|
|
2043
|
+
v1_replay_task_request: Annotated[
|
|
2044
|
+
V1ReplayTaskRequest, Field(description="The tasks to replay")
|
|
2045
|
+
],
|
|
2046
|
+
_request_timeout: Union[
|
|
2047
|
+
None,
|
|
2048
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2049
|
+
Tuple[
|
|
2050
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
2051
|
+
],
|
|
2052
|
+
] = None,
|
|
2053
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2054
|
+
_content_type: Optional[StrictStr] = None,
|
|
2055
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2056
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2057
|
+
) -> RESTResponseType:
|
|
2058
|
+
"""Replay tasks
|
|
2059
|
+
|
|
2060
|
+
Replay tasks
|
|
2061
|
+
|
|
2062
|
+
:param tenant: The tenant id (required)
|
|
2063
|
+
:type tenant: str
|
|
2064
|
+
:param v1_replay_task_request: The tasks to replay (required)
|
|
2065
|
+
:type v1_replay_task_request: V1ReplayTaskRequest
|
|
2066
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2067
|
+
number provided, it will be total request
|
|
2068
|
+
timeout. It can also be a pair (tuple) of
|
|
2069
|
+
(connection, read) timeouts.
|
|
2070
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2071
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2072
|
+
request; this effectively ignores the
|
|
2073
|
+
authentication in the spec for a single request.
|
|
2074
|
+
:type _request_auth: dict, optional
|
|
2075
|
+
:param _content_type: force content-type for the request.
|
|
2076
|
+
:type _content_type: str, Optional
|
|
2077
|
+
:param _headers: set to override the headers for a single
|
|
2078
|
+
request; this effectively ignores the headers
|
|
2079
|
+
in the spec for a single request.
|
|
2080
|
+
:type _headers: dict, optional
|
|
2081
|
+
:param _host_index: set to override the host_index for a single
|
|
2082
|
+
request; this effectively ignores the host_index
|
|
2083
|
+
in the spec for a single request.
|
|
2084
|
+
:type _host_index: int, optional
|
|
2085
|
+
:return: Returns the result object.
|
|
2086
|
+
""" # noqa: E501
|
|
2087
|
+
|
|
2088
|
+
_param = self._v1_task_replay_serialize(
|
|
2089
|
+
tenant=tenant,
|
|
2090
|
+
v1_replay_task_request=v1_replay_task_request,
|
|
2091
|
+
_request_auth=_request_auth,
|
|
2092
|
+
_content_type=_content_type,
|
|
2093
|
+
_headers=_headers,
|
|
2094
|
+
_host_index=_host_index,
|
|
2095
|
+
)
|
|
2096
|
+
|
|
2097
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2098
|
+
"200": None,
|
|
2099
|
+
"400": "APIErrors",
|
|
2100
|
+
"403": "APIErrors",
|
|
2101
|
+
"404": "APIErrors",
|
|
2102
|
+
"501": "APIErrors",
|
|
2103
|
+
}
|
|
2104
|
+
response_data = await self.api_client.call_api(
|
|
2105
|
+
*_param, _request_timeout=_request_timeout
|
|
2106
|
+
)
|
|
2107
|
+
return response_data.response
|
|
2108
|
+
|
|
2109
|
+
def _v1_task_replay_serialize(
|
|
2110
|
+
self,
|
|
2111
|
+
tenant,
|
|
2112
|
+
v1_replay_task_request,
|
|
2113
|
+
_request_auth,
|
|
2114
|
+
_content_type,
|
|
2115
|
+
_headers,
|
|
2116
|
+
_host_index,
|
|
2117
|
+
) -> RequestSerialized:
|
|
2118
|
+
|
|
2119
|
+
_host = None
|
|
2120
|
+
|
|
2121
|
+
_collection_formats: Dict[str, str] = {}
|
|
2122
|
+
|
|
2123
|
+
_path_params: Dict[str, str] = {}
|
|
2124
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2125
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2126
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2127
|
+
_files: Dict[
|
|
2128
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2129
|
+
] = {}
|
|
2130
|
+
_body_params: Optional[bytes] = None
|
|
2131
|
+
|
|
2132
|
+
# process the path parameters
|
|
2133
|
+
if tenant is not None:
|
|
2134
|
+
_path_params["tenant"] = tenant
|
|
2135
|
+
# process the query parameters
|
|
2136
|
+
# process the header parameters
|
|
2137
|
+
# process the form parameters
|
|
2138
|
+
# process the body parameter
|
|
2139
|
+
if v1_replay_task_request is not None:
|
|
2140
|
+
_body_params = v1_replay_task_request
|
|
2141
|
+
|
|
2142
|
+
# set the HTTP header `Accept`
|
|
2143
|
+
if "Accept" not in _header_params:
|
|
2144
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
2145
|
+
["application/json"]
|
|
2146
|
+
)
|
|
2147
|
+
|
|
2148
|
+
# set the HTTP header `Content-Type`
|
|
2149
|
+
if _content_type:
|
|
2150
|
+
_header_params["Content-Type"] = _content_type
|
|
2151
|
+
else:
|
|
2152
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
2153
|
+
["application/json"]
|
|
2154
|
+
)
|
|
2155
|
+
if _default_content_type is not None:
|
|
2156
|
+
_header_params["Content-Type"] = _default_content_type
|
|
2157
|
+
|
|
2158
|
+
# authentication setting
|
|
2159
|
+
_auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
|
|
2160
|
+
|
|
2161
|
+
return self.api_client.param_serialize(
|
|
2162
|
+
method="POST",
|
|
2163
|
+
resource_path="/api/v1/stable/tenants/{tenant}/tasks/replay",
|
|
2164
|
+
path_params=_path_params,
|
|
2165
|
+
query_params=_query_params,
|
|
2166
|
+
header_params=_header_params,
|
|
2167
|
+
body=_body_params,
|
|
2168
|
+
post_params=_form_params,
|
|
2169
|
+
files=_files,
|
|
2170
|
+
auth_settings=_auth_settings,
|
|
2171
|
+
collection_formats=_collection_formats,
|
|
2172
|
+
_host=_host,
|
|
2173
|
+
_request_auth=_request_auth,
|
|
2174
|
+
)
|